Skip to content

Commit aa127f7

Browse files
committed
[Type refinement context] Don't recurse into macro expansions.
Macro expansion buffers will have their type refinement contexts built lazily, associated with the source file for the macro expansion buffer. By not recursing into macro expansions, we break false reference cycles among different files. Fixes rdar://107394143
1 parent 0725367 commit aa127f7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ class TypeRefinementContextBuilder : private ASTWalker {
473473

474474
private:
475475
MacroWalking getMacroWalkingBehavior() const override {
476-
return MacroWalking::ArgumentsAndExpansion;
476+
return MacroWalking::Arguments;
477477
}
478478

479479
PreWalkAction walkToDeclPre(Decl *D) override {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
// FIXME(rdar://107394143): Circular reference bug
2-
// #anonymousTypes { "hello2" }
1+
#anonymousTypes { "hello2" }

0 commit comments

Comments
 (0)