mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 18:46:04 +00:00

We found a case where Typedef Name Declarations were not being added correctly when importing builtin types. This exposed the need for a TypedefNameDecl visitor so these types can be added by RecordDecl and fields. This code is covered by the ASTImporterTest cases that use the implicit struct __NSConstantString_tag definitions. Thanks to @martong for the debugging assist! Depends on D83970. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D83992
21 lines
738 B
C
21 lines
738 B
C
// RUN: rm -rf %t && mkdir %t
|
|
// RUN: mkdir -p %t/ctudir2
|
|
// RUN: %clang_cc1 \
|
|
// RUN: -emit-pch -o %t/ctudir2/ctu-import.c.ast %S/Inputs/ctu-import.c
|
|
// RUN: cp %S/Inputs/ctu-import.c.externalDefMap.ast-dump.txt %t/ctudir2/externalDefMap.txt
|
|
// RUN: %clang_cc1 -analyze \
|
|
// RUN: -analyzer-checker=core,debug.ExprInspection \
|
|
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
|
|
// RUN: -analyzer-config display-ctu-progress=true \
|
|
// RUN: -analyzer-config ctu-dir=%t/ctudir2 \
|
|
// RUN: -verify %s
|
|
|
|
void clang_analyzer_eval(int);
|
|
|
|
int testStaticImplicit(void);
|
|
int func(void) {
|
|
int ret = testStaticImplicit();
|
|
clang_analyzer_eval(ret == 4); // expected-warning{{TRUE}}
|
|
return testStaticImplicit();
|
|
}
|