diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-01 20:41:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-01 20:41:53 +0000 |
commit | be996931274f1965b4da7ab06a94b141841c4c8f (patch) | |
tree | 457b791bfd2a1f7836cb7edf3d4298c6112a974b /clang/test/Index/load-decls.c | |
parent | 026cb58a441c15822411f0cdf94da501b1e24cd6 (diff) | |
download | bcm5719-llvm-be996931274f1965b4da7ab06a94b141841c4c8f.tar.gz bcm5719-llvm-be996931274f1965b4da7ab06a94b141841c4c8f.zip |
Fix the source-range information for an EnumConstantDecl; previously,
it did not include the initializer expression.
llvm-svn: 112739
Diffstat (limited to 'clang/test/Index/load-decls.c')
-rw-r--r-- | clang/test/Index/load-decls.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Index/load-decls.c b/clang/test/Index/load-decls.c new file mode 100644 index 00000000000..cf88f4285c6 --- /dev/null +++ b/clang/test/Index/load-decls.c @@ -0,0 +1,16 @@ +enum Color { + Red, + Green, + Blue, + + Rouge = Red +}; + +// RUN: c-index-test -test-load-source all %s | FileCheck %s +// CHECK: load-decls.c:1:6: EnumDecl=Color:1:6 (Definition) Extent=[1:1 - 7:2] +// CHECK: load-decls.c:2:3: EnumConstantDecl=Red:2:3 (Definition) Extent=[2:3 - 2:6] +// CHECK: load-decls.c:3:3: EnumConstantDecl=Green:3:3 (Definition) Extent=[3:3 - 3:8] +// CHECK: load-decls.c:4:3: EnumConstantDecl=Blue:4:3 (Definition) Extent=[4:3 - 4:7] +// CHECK: load-decls.c:6:3: EnumConstantDecl=Rouge:6:3 (Definition) Extent=[6:3 - 6:14] +// CHECK: load-decls.c:6:11: UnexposedExpr=Red:2:3 Extent=[6:11 - 6:14] +// CHECK: load-decls.c:6:11: DeclRefExpr=Red:2:3 Extent=[6:11 - 6:14] |