Manuel Klimek | 016c024 | 2016-03-01 10:56:19 +0000 | [diff] [blame] | 1 | #include "missing1.h" |
| 2 | |
| 3 | template<class T> |
| 4 | class A { T a; }; |
| 5 | |
| 6 | class B : public A<int> { }; |
| 7 | |
| 8 | #include "missing2.h" |
| 9 | |
| 10 | class C : public A<float> { }; |
| 11 | |
Manuel Klimek | 0000eec | 2016-03-01 12:53:18 +0000 | [diff] [blame] | 12 | // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_KEEP_GOING=1 c-index-test -test-print-type %s -std=c++03 2> %t.stderr.txt | FileCheck %s |
Manuel Klimek | 016c024 | 2016-03-01 10:56:19 +0000 | [diff] [blame] | 13 | // RUN: FileCheck -check-prefix CHECK-DIAG %s < %t.stderr.txt |
| 14 | |
| 15 | // CHECK: inclusion directive=missing1.h ((null)) [type=] [typekind=Invalid] [isPOD=0] |
| 16 | // CHECK: inclusion directive=missing2.h ((null)) [type=] [typekind=Invalid] [isPOD=0] |
| 17 | // CHECK: ClassTemplate=A:4:7 (Definition) [type=] [typekind=Invalid] [isPOD=0] |
| 18 | // CHECK: TemplateTypeParameter=T:3:16 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] |
| 19 | // CHECK: FieldDecl=a:4:13 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] |
| 20 | // CHECK: TypeRef=T:3:16 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0] |
| 21 | // CHECK: ClassDecl=B:6:7 (Definition) [type=B] [typekind=Record] [isPOD=0] |
Argyrios Kyrtzidis | 18b7d82 | 2016-12-16 21:40:16 +0000 | [diff] [blame] | 22 | // CHECK: C++ base class specifier=A<int>:4:7 [access=public isVirtual=false] [type=A<int>] [typekind=Unexposed] [templateargs/1= [type=int] [typekind=Int]] [canonicaltype=A<int>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=int] [typekind=Int]] [isPOD=0] [nbFields=1] |
Manuel Klimek | 016c024 | 2016-03-01 10:56:19 +0000 | [diff] [blame] | 23 | // CHECK: TemplateRef=A:4:7 [type=] [typekind=Invalid] [isPOD=0] |
| 24 | // CHECK: ClassDecl=C:10:7 (Definition) [type=C] [typekind=Record] [isPOD=0] |
Argyrios Kyrtzidis | 18b7d82 | 2016-12-16 21:40:16 +0000 | [diff] [blame] | 25 | // CHECK: C++ base class specifier=A<float>:4:7 [access=public isVirtual=false] [type=A<float>] [typekind=Unexposed] [templateargs/1= [type=float] [typekind=Float]] [canonicaltype=A<float>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=float] [typekind=Float]] [isPOD=0] [nbFields=1] |
Manuel Klimek | 016c024 | 2016-03-01 10:56:19 +0000 | [diff] [blame] | 26 | // CHECK: TemplateRef=A:4:7 [type=] [typekind=Invalid] [isPOD=0] |
| 27 | |
| 28 | // CHECK-DIAG: keep-going.cpp:1:10: error: 'missing1.h' file not found |
| 29 | // CHECK-DIAG: keep-going.cpp:8:10: error: 'missing2.h' file not found |