summaryrefslogtreecommitdiff
path: root/test/Coverage
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-01-03 12:14:59 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-01-03 12:14:59 +0000
commitd26625b4e9cc5f08c673a98cd0e0e7296379282b (patch)
tree6d895afecd5ea775ab7feb2c0fd537545db227d0 /test/Coverage
parent44df50df1f5458b0d1b59d5e0654986d0d5720d8 (diff)
Handle VarTemplateDecl in DeclContextPrinter
This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Coverage')
-rw-r--r--test/Coverage/ast-printing.cpp12
-rw-r--r--test/Coverage/cxx-language-features.inc3
2 files changed, 9 insertions, 6 deletions
diff --git a/test/Coverage/ast-printing.cpp b/test/Coverage/ast-printing.cpp
index 5cff09defc..e03c517353 100644
--- a/test/Coverage/ast-printing.cpp
+++ b/test/Coverage/ast-printing.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -fsyntax-only %s
-// RUN: %clang_cc1 -ast-print %s -o %t.1.cpp
-// RUN: %clang_cc1 -ast-print %t.1.cpp -o %t.2.cpp
+// RUN: %clang_cc1 -std=c++14 -fsyntax-only %s
+// RUN: %clang_cc1 -std=c++14 -ast-print %s -o %t.1.cpp
+// RUN: %clang_cc1 -std=c++14 -ast-print %t.1.cpp -o %t.2.cpp
// RUN: diff %t.1.cpp %t.2.cpp
-// RUN: %clang_cc1 -ast-dump %s
-// RUN: %clang_cc1 -print-decl-contexts %s
-// RUN: %clang_cc1 -fdump-record-layouts %s
+// RUN: %clang_cc1 -std=c++14 -ast-dump %s
+// RUN: %clang_cc1 -std=c++14 -print-decl-contexts %s
+// RUN: %clang_cc1 -std=c++14 -fdump-record-layouts %s
#include "cxx-language-features.inc"
diff --git a/test/Coverage/cxx-language-features.inc b/test/Coverage/cxx-language-features.inc
index be99eece79..17a4476067 100644
--- a/test/Coverage/cxx-language-features.inc
+++ b/test/Coverage/cxx-language-features.inc
@@ -60,3 +60,6 @@ struct ClassTemplatePartialSpecialization<T, true> { };
struct AccessSpec {
private:
};
+
+// Variable template
+template <typename T> T varTemplate = 0;