summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp3
-rw-r--r--clang/test/FixIt/typo.cpp9
-rw-r--r--clang/test/SemaCXX/PR9459.cpp6
-rw-r--r--clang/test/SemaTemplate/deduction-crash.cpp2
4 files changed, 13 insertions, 7 deletions
diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp
index c00d4b70230..09245cfd200 100644
--- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp
+++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp
@@ -43,8 +43,7 @@ void j() {
(void)sizeof(auto); // expected-error{{'auto' not allowed here}}
(void)__alignof(auto); // expected-error{{'auto' not allowed here}}
- // FIXME: don't issue the second diagnostic for this error.
- U<auto> v; // expected-error{{'auto' not allowed in template argument}} unexpected-error{{C++ requires a type specifier}}
+ U<auto> v; // expected-error{{'auto' not allowed in template argument}}
int n;
(void)dynamic_cast<auto&>(S()); // expected-error{{'auto' not allowed here}}
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp
index 440db455189..f8b5352374f 100644
--- a/clang/test/FixIt/typo.cpp
+++ b/clang/test/FixIt/typo.cpp
@@ -65,3 +65,12 @@ struct Derived : public Base { // expected-note{{base class 'Base' specified her
int &Derived::getMember() {
return ember; // expected-error{{use of undeclared identifier 'ember'; did you mean 'member'?}}
}
+
+typedef int Integer; // expected-note{{'Integer' declared here}}
+int global_value; // expected-note{{'global_value' declared here}}
+
+int foo() {
+ integer * i = 0; // expected-error{{unknown type name 'integer'; did you mean 'Integer'?}}
+ unsinged *ptr = 0; // expected-error{{use of undeclared identifier 'unsinged'; did you mean 'unsigned'?}}
+ return *i + *ptr + global_val; // expected-error{{use of undeclared identifier 'global_val'; did you mean 'global_value'?}}
+}
diff --git a/clang/test/SemaCXX/PR9459.cpp b/clang/test/SemaCXX/PR9459.cpp
index 33cb2e5bc29..dfb242dc595 100644
--- a/clang/test/SemaCXX/PR9459.cpp
+++ b/clang/test/SemaCXX/PR9459.cpp
@@ -2,8 +2,6 @@
// Don't crash.
-template<typename>struct ae_same; // expected-note {{declared here}}
+template<typename>struct ae_same;
template<typename>struct ts{}ap()
-{ts<a>::ap<ae_same<int>::&ae_same<>>::p(a); }; // expected-error 2 {{undeclared identifier}} \
- // expected-error 2 {{expected}} expected-error {{a space is required}} \
- // expected-error 2 {{global}} expected-error {{too few}}
+{ts<a>::ap<ae_same<int>::&ae_same<>>::p(a); }; // expected-error {{use of undeclared identifier 'a'}}
diff --git a/clang/test/SemaTemplate/deduction-crash.cpp b/clang/test/SemaTemplate/deduction-crash.cpp
index 8a15605734c..ec97311e5d7 100644
--- a/clang/test/SemaTemplate/deduction-crash.cpp
+++ b/clang/test/SemaTemplate/deduction-crash.cpp
@@ -4,7 +4,7 @@
// Note that the error count below doesn't matter. We just want to
// make sure that the parser doesn't crash.
-// CHECK: 14 errors
+// CHECK: 13 errors
template<a>
struct int_;
OpenPOWER on IntegriCloud