summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/recovery-crash.cpp
diff options
context:
space:
mode:
authorCharles Li <charles_li@playstation.sony.com>2016-04-14 23:47:07 +0000
committerCharles Li <charles_li@playstation.sony.com>2016-04-14 23:47:07 +0000
commit1a88adbb27a21e7728253c2f932b41009e314985 (patch)
tree7dafdd87f8d899c1dd638dcd2bc171df4ad58706 /clang/test/SemaTemplate/recovery-crash.cpp
parent4960fbf391360ae04c5815fca2fd647567a977f3 (diff)
downloadbcm5719-llvm-1a88adbb27a21e7728253c2f932b41009e314985.tar.gz
bcm5719-llvm-1a88adbb27a21e7728253c2f932b41009e314985.zip
Lit C++11 Compatibility Patch #8
24 tests have been updated for C++11 compatibility. llvm-svn: 266387
Diffstat (limited to 'clang/test/SemaTemplate/recovery-crash.cpp')
-rw-r--r--clang/test/SemaTemplate/recovery-crash.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/recovery-crash.cpp b/clang/test/SemaTemplate/recovery-crash.cpp
index 02f80495bb9..c8e783f47b4 100644
--- a/clang/test/SemaTemplate/recovery-crash.cpp
+++ b/clang/test/SemaTemplate/recovery-crash.cpp
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// Clang used to crash trying to recover while adding 'this->' before Work(x);
@@ -25,14 +27,20 @@ namespace PR16134 {
namespace PR16225 {
template <typename T> void f();
- template<typename C> void g(C*) {
+ template <typename C> void g(C*) {
struct LocalStruct : UnknownBase<Mumble, C> { }; // expected-error {{unknown template name 'UnknownBase'}} \
// expected-error {{use of undeclared identifier 'Mumble'}}
- f<LocalStruct>(); // expected-warning {{template argument uses local type 'LocalStruct'}}
+ f<LocalStruct>();
+#if __cplusplus <= 199711L
+ // expected-warning@-2 {{template argument uses local type 'LocalStruct'}}
+#endif
}
struct S;
void h() {
- g<S>(0); // expected-note {{in instantiation of function template specialization}}
+ g<S>(0);
+#if __cplusplus <= 199711L
+ // expected-note@-2 {{in instantiation of function template specialization}}
+#endif
}
}
OpenPOWER on IntegriCloud