summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2015-06-26 02:15:04 +0000
committerManuel Klimek <klimek@google.com>2015-06-26 02:15:04 +0000
commit5eb6039f160db9e236bcb83c3bf897c4fe87bd9e (patch)
tree83aec155f0a6f04173075d3185c44a73f1fd26a2 /clang/test/SemaTemplate
parent1c1e0c9e71d09581b93b4e0d13fafd06cb28fe64 (diff)
downloadbcm5719-llvm-5eb6039f160db9e236bcb83c3bf897c4fe87bd9e.tar.gz
bcm5719-llvm-5eb6039f160db9e236bcb83c3bf897c4fe87bd9e.zip
Fix crash-on-invalid bug in template instantiation.
Get rid of code-path that (according to Richard Smith) is not needed but leads to a crasher bug when assuming a template has been fully instantiated and thus has a definition. llvm-svn: 240752
Diffstat (limited to 'clang/test/SemaTemplate')
-rw-r--r--clang/test/SemaTemplate/instantiate-explicitly-after-fatal.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-explicitly-after-fatal.cpp b/clang/test/SemaTemplate/instantiate-explicitly-after-fatal.cpp
new file mode 100644
index 00000000000..9693d2fc6c0
--- /dev/null
+++ b/clang/test/SemaTemplate/instantiate-explicitly-after-fatal.cpp
@@ -0,0 +1,9 @@
+// RUN: not %clang_cc1 -fsyntax-only -std=c++11 -ferror-limit 1 %s 2>&1 | FileCheck %s
+unknown_type foo(unknown_type);
+// CHECK: fatal error: too many errors emitted, stopping now
+
+template <typename>
+class Bar {};
+
+extern template class Bar<int>;
+template class Bar<int>;
OpenPOWER on IntegriCloud