summaryrefslogtreecommitdiffstats
path: root/clang/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
commit5ca2ecd2b200360ae33e047e3da418c8852564c2 (patch)
treeab5ce9280c5ec9e4e35ee605b9e2f0b7703d3aaa /clang/test/SemaCXX/typo-correction-delayed.cpp
parenta126e462c2ab30eb985e95bfada8bd881145a7d2 (diff)
downloadbcm5719-llvm-5ca2ecd2b200360ae33e047e3da418c8852564c2.tar.gz
bcm5719-llvm-5ca2ecd2b200360ae33e047e3da418c8852564c2.zip
Use the full-Expr filter to disambiguate equidistant correction
candidates. llvm-svn: 222549
Diffstat (limited to 'clang/test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--clang/test/SemaCXX/typo-correction-delayed.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/typo-correction-delayed.cpp b/clang/test/SemaCXX/typo-correction-delayed.cpp
index 984d68b6b92..c82f865a863 100644
--- a/clang/test/SemaCXX/typo-correction-delayed.cpp
+++ b/clang/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'?}}
+}
OpenPOWER on IntegriCloud