summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/FixIt/typo-crash.cpp11
-rw-r--r--clang/test/SemaCXX/function-overload-typo-crash.cpp4
2 files changed, 8 insertions, 7 deletions
diff --git a/clang/test/FixIt/typo-crash.cpp b/clang/test/FixIt/typo-crash.cpp
index b156e1b44c4..8f0c989cce1 100644
--- a/clang/test/FixIt/typo-crash.cpp
+++ b/clang/test/FixIt/typo-crash.cpp
@@ -3,9 +3,10 @@
// FIXME: The diagnostics and recovery here are very, very poor.
// PR10355
-template<typename T> void template_id1() {
- template_id2<> t; // expected-error 2{{use of undeclared identifier 'template_id2'; did you mean 'template_id1'?}} \
- // expected-error{{expected expression}} \
- // expected-error{{use of undeclared identifier 't'}}
+template<typename T> void template_id1() { // expected-note {{'template_id1' declared here}} \
+ // expected-note {{candidate function}}
+ template_id2<> t; // expected-error {{no template named 'template_id2'; did you mean 'template_id1'?}} \
+ // expected-error {{expected ';' after expression}} \
+ // expected-error {{cannot resolve overloaded function 'template_id1' from context}} \
+ // expected-error {{use of undeclared identifier 't'}}
}
-
diff --git a/clang/test/SemaCXX/function-overload-typo-crash.cpp b/clang/test/SemaCXX/function-overload-typo-crash.cpp
index 0fea312a97f..580f27a12af 100644
--- a/clang/test/SemaCXX/function-overload-typo-crash.cpp
+++ b/clang/test/SemaCXX/function-overload-typo-crash.cpp
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR10283
-void min();
+void min(); //expected-note {{'min' declared here}}
void min(int);
-template <typename T> void max(T);
+template <typename T> void max(T); //expected-note {{'max' declared here}}
void f() {
fin(); //expected-error {{use of undeclared identifier 'fin'; did you mean 'min'}}
OpenPOWER on IntegriCloud