summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2014-11-21 18:47:58 +0000
committerKaelyn Takata <rikka@google.com>2014-11-21 18:47:58 +0000
commit7f0ea0ae7a555c89a598434b1ad147dfcd4f1e3b (patch)
tree434326f0366fdf978d4a9eb3a46fc9b83cc83eed /test/SemaCXX/typo-correction-delayed.cpp
parentb643cf9daa35f3540a4420d93d7cc6f48cffb735 (diff)
Use the full-Expr filter to disambiguate equidistant correction
candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--test/SemaCXX/typo-correction-delayed.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp
index 984d68b6b9..c82f865a86 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/test/SemaCXX/typo-correction-delayed.cpp
@@ -48,3 +48,14 @@ void testNoCandidates() {
callee(xxxxxx, // expected-error-re {{use of undeclared identifier 'xxxxxx'{{$}}}}
zzzzzz); // expected-error-re {{use of undeclared identifier 'zzzzzz'{{$}}}}
}
+
+class string {};
+struct Item {
+ void Nest();
+ string text();
+ Item* next(); // expected-note {{'next' declared here}}
+};
+void testExprFilter(Item *i) {
+ Item *j;
+ j = i->Next(); // expected-error {{no member named 'Next' in 'Item'; did you mean 'next'?}}
+}