diff options
author | Kaelyn Takata <rikka@google.com> | 2015-01-28 00:46:09 +0000 |
---|---|---|
committer | Kaelyn Takata <rikka@google.com> | 2015-01-28 00:46:09 +0000 |
commit | 20deb1d78ccaaeb680582e9506e9dfed2914f9fc (patch) | |
tree | ae11b0326de29a5b41382bfbebd43041a4e54f2a /clang/test/FixIt/typo-location-bugs.cpp | |
parent | 3842b9ff8dba65330065d71443b88d9e4a975aab (diff) | |
download | bcm5719-llvm-20deb1d78ccaaeb680582e9506e9dfed2914f9fc.tar.gz bcm5719-llvm-20deb1d78ccaaeb680582e9506e9dfed2914f9fc.zip |
Use the real CXXScopeSpec when setting the correction SourceRange.
Otherwise, in the most important case and the only case where SS and
TempSS are different (which is when the CXXScopeSpec should be dropped,
and TempSS is NULL) the wrong SourceRange will be used in the fixit for
the typo correction. Fixes the remaining issue in PR20626.
llvm-svn: 227278
Diffstat (limited to 'clang/test/FixIt/typo-location-bugs.cpp')
-rw-r--r-- | clang/test/FixIt/typo-location-bugs.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/FixIt/typo-location-bugs.cpp b/clang/test/FixIt/typo-location-bugs.cpp index e44664d49ad..c7111a80106 100644 --- a/clang/test/FixIt/typo-location-bugs.cpp +++ b/clang/test/FixIt/typo-location-bugs.cpp @@ -34,3 +34,16 @@ void test(B b) { b.f(1); // expected-error{{too many arguments to function call, expected 0, have 1; did you mean 'A::f'?}} } } + +namespace PR20626 { +class A { +public: + void Foo(){}; // expected-note{{'Foo' declared here}} +}; +class B {}; +class C : public A, public B { + void Run() { + B::Foo(); // expected-error{{no member named 'Foo' in 'PR20626::B'; did you mean simply 'Foo'?}} + } +}; +} |