When libclang visits a translation unit via clang_visitChildren(),
walk the preprocessing record *before* walking the declarations, so
they we pretend that we actually respect the phases of translation.
We still walk the preprocessing record after the declarations when
performing token annotation or finding the cursor at a location, since
those routines depend on those semantics.
Fixes <rdar://problem/9137195>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127776 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/load-exprs.c b/test/Index/load-exprs.c
index 62df2a7..a4723d8 100644
--- a/test/Index/load-exprs.c
+++ b/test/Index/load-exprs.c
@@ -32,7 +32,7 @@
}
// RUN: c-index-test -test-load-source all %s -fblocks | FileCheck %s
-
+// CHECK: macro definition=__clang__
// CHECK: load-exprs.c:1:13: TypedefDecl=T:1:13 (Definition) Extent=[1:1 - 1:14]
// CHECK: load-exprs.c:2:8: StructDecl=X:2:8 (Definition) Extent=[2:1 - 2:23]
// CHECK: load-exprs.c:2:16: FieldDecl=a:2:16 (Definition) Extent=[2:12 - 2:17]