llvm-project/clang/test/Modules/Inputs/redecl-merge-bottom.h
Douglas Gregor dcf2508791 [Modules] Cope better with top-level declarations loaded after being declared in the current translation unit <rdar://problem/13189985>.
These two related tweaks to keep the information associated with a
given identifier correct when the identifier has been given some
top-level information (say, a top-level declaration) and more
information is then loaded from a module. The first ensures that an
identifier that was "interesting" before being loaded from an AST is
considered to be different from its on-disk counterpart. Otherwise, we
lose such changes when writing the current translation unit as a
module.

Second, teach the code that injects AST-loaded names into the
identifier chain for name lookup to keep the most recent declaration,
so that we don't end up confusing our declaration chains by having a
different declaration in there.

llvm-svn: 174895
2013-02-11 18:16:18 +00:00

26 lines
308 B
Objective-C

@import redecl_merge_left;
@class C4;
@class C4;
@protocol P4;
@protocol P4;
@protocol P4;
@import redecl_merge_right;
@class B;
@class A;
@protocol P1;
struct S1;
struct S3;
void refers_to_C4(C4*);
@interface UnrelatedToDeclaredThenLoaded
- declaredThenLoadedMethod;
@end
@class DeclaredThenLoaded;