summaryrefslogtreecommitdiffstats
path: root/test/FixIt
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2015-01-28 00:46:09 +0000
committerKaelyn Takata <rikka@google.com>2015-01-28 00:46:09 +0000
commit00ba123e1d1cc9ac0ed463fde6442e11ca08cff8 (patch)
treed36763170efa2b36c73fd95e619d0f1c69ba5169 /test/FixIt
parent50bb4d8b9710e6b8b560f522f399bf2c3242fabf (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt')
-rw-r--r--test/FixIt/typo-location-bugs.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/FixIt/typo-location-bugs.cpp b/test/FixIt/typo-location-bugs.cpp
index e44664d49a..c7111a8010 100644
--- a/test/FixIt/typo-location-bugs.cpp
+++ b/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'?}}
+ }
+};
+}