diff options
| author | Kaelyn Uhrain <rikka@google.com> | 2012-11-19 18:49:53 +0000 |
|---|---|---|
| committer | Kaelyn Uhrain <rikka@google.com> | 2012-11-19 18:49:53 +0000 |
| commit | f60b55ae49037d03934e5dc56dfbf1511ab0f576 (patch) | |
| tree | f9368cb649a4fc0b01c4eb06d9c4365016f225c0 /clang/test/SemaCXX | |
| parent | 26786bacd131d8b2b349749e55eefb7fc1e1e557 (diff) | |
| download | bcm5719-llvm-f60b55ae49037d03934e5dc56dfbf1511ab0f576.tar.gz bcm5719-llvm-f60b55ae49037d03934e5dc56dfbf1511ab0f576.zip | |
When adding a NamedDecl to a correction, add the underlying Decl (via
getUnderlyingDecl()) so that derivatives of
CorrectionCandidateCallback::ValidateCandidate(...) don't have to worry
about being thrown by UsingDecls and such.
llvm-svn: 168317
Diffstat (limited to 'clang/test/SemaCXX')
| -rw-r--r-- | clang/test/SemaCXX/typo-correction.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/typo-correction.cpp b/clang/test/SemaCXX/typo-correction.cpp index c21ef51a7da..4a3f0f6b294 100644 --- a/clang/test/SemaCXX/typo-correction.cpp +++ b/clang/test/SemaCXX/typo-correction.cpp @@ -236,3 +236,17 @@ void test() { return status; // expected-error-re{{use of undeclared identifier 'status'$}} } } + +namespace PR13387 { +struct A { + void CreateFoo(float, float); // expected-note {{'CreateFoo' declared here}} + void CreateBar(float, float); +}; +struct B : A { + using A::CreateFoo; + void CreateFoo(int, int); +}; +void f(B &x) { + x.Createfoo(0,0); // expected-error {{no member named 'Createfoo' in 'PR13387::B'; did you mean 'CreateFoo'?}} +} +} |

