Douglas Gregor | 94d9629 | 2011-01-19 20:34:17 +0000 | [diff] [blame] | 1 | template<typename ...Args> |
| 2 | int f(Args ...args) { |
| 3 | return sizeof...(args) + sizeof...(Args); |
| 4 | } |
| 5 | |
Argyrios Kyrtzidis | 427964e | 2011-08-15 22:40:24 +0000 | [diff] [blame] | 6 | void test() { |
| 7 | int a; |
| 8 | decltype(a) b; |
| 9 | } |
| 10 | |
Douglas Gregor | 94d9629 | 2011-01-19 20:34:17 +0000 | [diff] [blame] | 11 | // RUN: c-index-test -test-annotate-tokens=%s:1:1:5:1 -std=c++0x %s | FileCheck %s |
| 12 | // CHECK: Identifier: "args" [3:20 - 3:24] UnexposedExpr=args:2:15 |
| 13 | // CHECK: Identifier: "Args" [3:38 - 3:42] TypeRef=Args:1:22 |
Argyrios Kyrtzidis | 427964e | 2011-08-15 22:40:24 +0000 | [diff] [blame] | 14 | |
| 15 | // RUN: c-index-test -test-annotate-tokens=%s:8:1:9:1 -std=c++0x %s | FileCheck -check-prefix=CHECK-DECLTYPE %s |
| 16 | // CHECK-DECLTYPE: Identifier: "a" [8:12 - 8:13] DeclRefExpr=a:7:7 |