diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-02 15:28:46 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-02 15:28:46 +0000 |
commit | 3a7cc81d52f9b7a6e7e94c9efcd1113f1aeb8c9a (patch) | |
tree | bb87867caf62a9f09f5be714b37c5d7815cd2168 /clang/test/Index/load-decls.c | |
parent | 59999a32b3367f3187845b66e91cdf35c3d1c596 (diff) | |
download | bcm5719-llvm-3a7cc81d52f9b7a6e7e94c9efcd1113f1aeb8c9a.tar.gz bcm5719-llvm-3a7cc81d52f9b7a6e7e94c9efcd1113f1aeb8c9a.zip |
Report a correct end location for nameless parameters.
Ranges before:
void test(void (*)(int), int, float);
~~~~~~~~~~~~~ ~~~~ ~~~~~~
Ranges after:
void test(void (*)(int), int, float);
~~~~~~~~~~~~~ ~~~ ~~~~~
This does not change the actual location of the ParmVarDecl, it still
points to the location where the name would be. PR17970.
llvm-svn: 200640
Diffstat (limited to 'clang/test/Index/load-decls.c')
-rw-r--r-- | clang/test/Index/load-decls.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Index/load-decls.c b/clang/test/Index/load-decls.c index e0617c07df4..8d50134b58a 100644 --- a/clang/test/Index/load-decls.c +++ b/clang/test/Index/load-decls.c @@ -6,6 +6,8 @@ enum Color { Rouge = Red }; +void PR17970(void (*)(int), float); + // 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] @@ -13,3 +15,8 @@ enum Color { // 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: DeclRefExpr=Red:2:3 Extent=[6:11 - 6:14] +// +// CHECK: load-decls.c:9:6: FunctionDecl=PR17970:9:6 Extent=[9:1 - 9:35] +// CHECK: load-decls.c:9:21: ParmDecl=:9:21 (Definition) Extent=[9:14 - 9:27] +// CHECK: load-decls.c:9:26: ParmDecl=:9:26 (Definition) Extent=[9:23 - 9:26] +// CHECK: load-decls.c:9:34: ParmDecl=:9:34 (Definition) Extent=[9:29 - 9:34] |