diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-03-27 18:06:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-03-27 18:06:49 +0000 |
commit | 978fc9c485d21ee89b4f0bc77ce1ea55c65c7f12 (patch) | |
tree | 095bfa39f4cd57fa4612a8d4b783dde00a80b572 /test/Misc | |
parent | 2610f90135571be7bf983c80a1cf7bfa0844dc57 (diff) |
Introduce a -cc1-level option -pubnames-dump, which simply dumps the
list of identifiers that that 'public' names at the end of the
translation unit, e.g., defined macros or identifiers with top-level
names, in sorted order. Meant to support <rdar://problem/10921596>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Misc')
-rw-r--r-- | test/Misc/pubnames.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Misc/pubnames.c b/test/Misc/pubnames.c new file mode 100644 index 0000000000..03048972c0 --- /dev/null +++ b/test/Misc/pubnames.c @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -pubnames-dump %s | FileCheck %s +#define FOO +#define BAR +#undef FOO +#define WIBBLE + +int foo(); +int bar(float); +int wibble; + +// CHECK: BAR +// CHECK-NOT: FOO +// CHECK: WIBBLE +// CHECK-NOT: __clang_major__ +// CHECK: bar +// CHECK: foo +// CHECK: wibble + + |