
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
16 lines
300 B
C
16 lines
300 B
C
|
|
// Use an internal, implicitly defined type, called by
|
|
// a function imported for CTU. This should not crash.
|
|
int foo(void);
|
|
int foobar(int skip) {
|
|
__NSConstantString str = {.flags = 1};
|
|
|
|
if (str.flags >= 0)
|
|
str.flags = 0;
|
|
return 4;
|
|
}
|
|
|
|
int testStaticImplicit(void) {
|
|
return foobar(3);
|
|
}
|