summaryrefslogtreecommitdiff
path: root/test/SemaCXX/typo-correction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/typo-correction.cpp')
-rw-r--r--test/SemaCXX/typo-correction.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/SemaCXX/typo-correction.cpp b/test/SemaCXX/typo-correction.cpp
index 893f08a422ca5..c21ef51a7da59 100644
--- a/test/SemaCXX/typo-correction.cpp
+++ b/test/SemaCXX/typo-correction.cpp
@@ -116,14 +116,14 @@ void TestRedecl::add_in(int i) {} // expected-error{{out-of-line definition of '
// Test the improved typo correction for the Parser::ParseCastExpr =>
// Sema::ActOnIdExpression => Sema::DiagnoseEmptyLookup call path.
-class SomeNetMessage;
+class SomeNetMessage; // expected-note 2{{'SomeNetMessage'}}
class Message {};
void foo(Message&);
void foo(SomeNetMessage&);
void doit(void *data) {
Message somenetmsg; // expected-note{{'somenetmsg' declared here}}
foo(somenetmessage); // expected-error{{use of undeclared identifier 'somenetmessage'; did you mean 'somenetmsg'?}}
- foo((somenetmessage)data); // expected-error{{use of undeclared identifier 'somenetmessage'; did you mean 'SomeNetMessage'?}}
+ foo((somenetmessage)data); // expected-error{{unknown type name 'somenetmessage'; did you mean 'SomeNetMessage'?}} expected-error{{incomplete type}}
}
// Test the typo-correction callback in BuildRecoveryCallExpr.
@@ -155,7 +155,7 @@ void Test3() {
struct R {};
bool begun(R);
void RangeTest() {
- for (auto b : R()) {} // expected-error {{use of undeclared identifier 'begin'}} expected-note {{range has type}}
+ for (auto b : R()) {} // expected-error {{invalid range expression of type 'R'}}
}
// PR 12019 - Avoid infinite mutual recursion in DiagnoseInvalidRedeclaration
@@ -172,7 +172,7 @@ void Child::add_types(int value) {} // expected-error{{out-of-line definition of
// Sema::ActOnIdExpression by Parser::ParseCastExpression to allow type names as
// potential corrections for template arguments.
namespace clash {
-class ConstructExpr {}; // expected-note{{'clash::ConstructExpr' declared here}}
+class ConstructExpr {}; // expected-note 2{{'clash::ConstructExpr' declared here}}
}
class ClashTool {
bool HaveConstructExpr();
@@ -180,7 +180,7 @@ class ClashTool {
void test() {
ConstructExpr *expr = // expected-error{{unknown type name 'ConstructExpr'; did you mean 'clash::ConstructExpr'?}}
- getExprAs<ConstructExpr>(); // expected-error{{use of undeclared identifier 'ConstructExpr'; did you mean 'clash::ConstructExpr'?}}
+ getExprAs<ConstructExpr>(); // expected-error{{unknown type name 'ConstructExpr'; did you mean 'clash::ConstructExpr'?}}
}
};
@@ -220,6 +220,8 @@ namespace PR13051 {
}
}
+inf f(doulbe); // expected-error{{'int'}} expected-error{{'double'}}
+
namespace PR6325 {
class foo { }; // expected-note{{'foo' declared here}}
// Note that for this example (pulled from the PR), if keywords are not excluded