summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp2
-rw-r--r--clang/test/Parser/cxx-decl.cpp5
-rw-r--r--clang/test/SemaTemplate/ms-delayed-default-template-args.cpp2
-rw-r--r--clang/test/SemaTemplate/rdar9173693.cpp9
4 files changed, 8 insertions, 10 deletions
diff --git a/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp b/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp
index 68a41c7184c..6c0df1aff23 100644
--- a/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp
+++ b/clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp
@@ -16,6 +16,6 @@ template<int n> struct T {
typename S<k>::T check3; // ok, u is value-dependent
const int &i = k;
- typename S<i>::T check4; // expected-error {{not an integral constant expression}} expected-error {{qualified name}}
+ typename S<i>::T check4; // expected-error {{not an integral constant expression}}
}
};
diff --git a/clang/test/Parser/cxx-decl.cpp b/clang/test/Parser/cxx-decl.cpp
index a868904bb36..1914f347d9d 100644
--- a/clang/test/Parser/cxx-decl.cpp
+++ b/clang/test/Parser/cxx-decl.cpp
@@ -238,12 +238,11 @@ namespace PR5066 {
namespace PR17255 {
void foo() {
- typename A::template B<>; // expected-error {{use of undeclared identifier 'A'}}
- // expected-error@-1 {{'template' keyword not permitted here}}
+ typename A::template B<> c; // expected-error {{use of undeclared identifier 'A'}}
#if __cplusplus <= 199711L
+ // expected-error@-2 {{'typename' occurs outside of a template}}
// expected-error@-3 {{'template' keyword outside of a template}}
#endif
- // expected-error@-5 {{expected a qualified name after 'typename'}}
}
}
diff --git a/clang/test/SemaTemplate/ms-delayed-default-template-args.cpp b/clang/test/SemaTemplate/ms-delayed-default-template-args.cpp
index beb64f8273d..27646487534 100644
--- a/clang/test/SemaTemplate/ms-delayed-default-template-args.cpp
+++ b/clang/test/SemaTemplate/ms-delayed-default-template-args.cpp
@@ -93,7 +93,7 @@ namespace test_undeclared_nontype_parm_arg {
// template parameter.
template <typename T> struct Bar { T x; };
-template <Bar<Xylophone> *P> // expected-error {{use of undeclared identifier 'Xylophone'}}
+template <Bar<Xylophone> *P> // expected-error {{use of undeclared identifier 'Xylophone'}} expected-note {{declared here}}
struct Foo { };
typedef int Xylophone;
diff --git a/clang/test/SemaTemplate/rdar9173693.cpp b/clang/test/SemaTemplate/rdar9173693.cpp
index ed09a64a0dd..76919e265fd 100644
--- a/clang/test/SemaTemplate/rdar9173693.cpp
+++ b/clang/test/SemaTemplate/rdar9173693.cpp
@@ -2,8 +2,7 @@
// <rdar://problem/9173693>
template< bool C > struct assert { };
-// FIXME: We diagnose the same problem multiple times here because we have no
-// way to indicate in the token stream that we already tried to annotate a
-// template-id and we failed.
-template< bool > struct assert_arg_pred_impl { }; // expected-note 4 {{declared here}}
-template< typename Pred > assert<false> assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ); // expected-error 6 {{}}
+template< bool > struct assert_arg_pred_impl { }; // expected-note 2 {{declared here}}
+template< typename Pred > assert<false> assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
+// expected-error@-1 {{did you mean 'assert_arg_pred_impl'}}
+// expected-error@-2 {{template argument for non-type template parameter must be an expression}}
OpenPOWER on IntegriCloud