diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-30 19:14:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-30 19:14:50 +0000 |
commit | a082a49d9e71a61a6ba02809ee00625efed62821 (patch) | |
tree | c602557b6790e322b8b9a07576006c53b46c0e37 /clang/test/ASTMerge/class-template.cpp | |
parent | 78b4efb472ef0da5903ae06d00b9ab7afc57dfcb (diff) | |
download | bcm5719-llvm-a082a49d9e71a61a6ba02809ee00625efed62821.tar.gz bcm5719-llvm-a082a49d9e71a61a6ba02809ee00625efed62821.zip |
Implement basic AST importing and merging support for class template
declarations.
llvm-svn: 120448
Diffstat (limited to 'clang/test/ASTMerge/class-template.cpp')
-rw-r--r-- | clang/test/ASTMerge/class-template.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/ASTMerge/class-template.cpp b/clang/test/ASTMerge/class-template.cpp new file mode 100644 index 00000000000..847c9569e55 --- /dev/null +++ b/clang/test/ASTMerge/class-template.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/class-template1.cpp +// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/class-template2.cpp +// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s + +// CHECK: class-template1.cpp:7:14: error: non-type template parameter declared with incompatible types in different translation units ('int' vs. 'long') +// CHECK: class-template2.cpp:7:15: note: declared here with type 'long' + +// CHECK: class-template1.cpp:10:14: error: template parameter has different kinds in different translation units +// CHECK: class-template2.cpp:10:10: note: template parameter declared here + +// CHECK: class-template1.cpp:16:23: error: non-type template parameter declared with incompatible types in different translation units ('long' vs. 'int') +// CHECK: class-template2.cpp:16:23: note: declared here with type 'int' + +// CHECK: class-template1.cpp:19:10: error: template parameter has different kinds in different translation units +// CHECK: class-template2.cpp:19:10: note: template parameter declared here |