diff options
author | Kaelyn Uhrain <rikka@google.com> | 2013-10-19 00:05:00 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2013-10-19 00:05:00 +0000 |
commit | 8aa8da85ca60f2c7d88c47a67a4252bd032d1eb9 (patch) | |
tree | 481dd4d4b8137bf847d34fcc4a42c9043aa01bce /clang/test/SemaCXX/typo-correction.cpp | |
parent | f7b63e3e18601459d95849e6fbc776b718d12515 (diff) | |
download | bcm5719-llvm-8aa8da85ca60f2c7d88c47a67a4252bd032d1eb9.tar.gz bcm5719-llvm-8aa8da85ca60f2c7d88c47a67a4252bd032d1eb9.zip |
Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes.
Now that CorrectTypo knows how to correctly search classes for typo
correction candidates, there is no good reason to only replace an
existing CXXScopeSpecifier if it refers to a namespace. While the actual
enablement was a matter of changing a single comparison, the fallout
from enabling the functionality required a lot more code changes
(including my two previous commits).
llvm-svn: 193020
Diffstat (limited to 'clang/test/SemaCXX/typo-correction.cpp')
-rw-r--r-- | clang/test/SemaCXX/typo-correction.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/typo-correction.cpp b/clang/test/SemaCXX/typo-correction.cpp index d779e2a4480..4047e6a18ce 100644 --- a/clang/test/SemaCXX/typo-correction.cpp +++ b/clang/test/SemaCXX/typo-correction.cpp @@ -217,10 +217,14 @@ namespace PR13051 { operator bool() const; }; - void f() { - f(&S<int>::tempalte f<int>); // expected-error{{did you mean 'template'?}} - f(&S<int>::opeartor bool); // expected-error{{did you mean 'operator'?}} - f(&S<int>::foo); // expected-error-re{{no member named 'foo' in 'PR13051::S<int>'$}} + void foo(); // expected-note{{'foo' declared here}} + void g(void(*)()); + void g(bool(S<int>::*)() const); + + void test() { + g(&S<int>::tempalte f<int>); // expected-error{{did you mean 'template'?}} + g(&S<int>::opeartor bool); // expected-error{{did you mean 'operator'?}} + g(&S<int>::foo); // expected-error{{no member named 'foo' in 'PR13051::S<int>'; did you mean simply 'foo'?}} } } |