diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-24 21:27:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-24 21:27:34 +0000 |
commit | 851c75a279bb4441bc6802d0258ceb4ab64738d4 (patch) | |
tree | 5df49171adc9505b03a6497b7a00abc079352266 /test/Modules/lookup.cpp | |
parent | bba43efdec3b2aa483b55d4287ba1c48c55935d4 (diff) |
Introduce a depth-first search of modules into the module manager,
which supports both pre-order and post-order traversal via a visitor
mechanism. Use this depth-first search with a post-order traversal to
give predictable ordering semantics when walking all of the lexical
declarations in the translation unit.
Eventually, module imports will occur in the source code rather than
at the beginning, and we'll have to revisit this walk.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/lookup.cpp')
-rw-r--r-- | test/Modules/lookup.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/Modules/lookup.cpp b/test/Modules/lookup.cpp index 4d8184f6ce..ca12a281af 100644 --- a/test/Modules/lookup.cpp +++ b/test/Modules/lookup.cpp @@ -9,6 +9,12 @@ void test(int i, float f) { ::f0(&f); } -// RUN: %clang_cc1 -emit-pch -o %t_lookup_left.h.pch %S/Inputs/lookup_left.hpp -// RUN: %clang_cc1 -emit-pch -o %t_lookup_right.h.pch %S/Inputs/lookup_right.hpp -// RUN: %clang_cc1 -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch -verify %s +// RUN: %clang_cc1 -emit-pch -x c++ -o %t_lookup_left.h.pch %S/Inputs/lookup_left.hpp +// RUN: %clang_cc1 -emit-pch -x c++ -o %t_lookup_right.h.pch %S/Inputs/lookup_right.hpp +// RUN: %clang_cc1 -x c++ -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch -verify %s +// RUN: %clang_cc1 -ast-print -x c++ -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch %s | FileCheck -check-prefix=CHECK-PRINT %s + +// CHECK-PRINT: int *f0(int *); +// CHECK-PRINT: float *f0(float *); +// CHECK-PRINT: void test(int i, float f) + |