<div dir="ltr">This is a trivial enough fix it should probably be merged into the release branch to avoid spurious bug reports. ;)<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 27, 2015 at 4:46 PM, Kaelyn Takata <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=rikka@google.com&cc=&bcc=&su=&body=','_blank');return false;" class="cremed">rikka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rikka<br>
Date: Tue Jan 27 18:46:09 2015<br>
New Revision: 227278<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=227278&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=227278&view=rev</a><br>
Log:<br>
Use the real CXXScopeSpec when setting the correction SourceRange.<br>
<br>
Otherwise, in the most important case and the only case where SS and<br>
TempSS are different (which is when the CXXScopeSpec should be dropped,<br>
and TempSS is NULL) the wrong SourceRange will be used in the fixit for<br>
the typo correction. Fixes the remaining issue in PR20626.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaLookup.cpp<br>
    cfe/trunk/test/FixIt/typo-location-bugs.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=227278&r1=227277&r2=227278&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=227278&r1=227277&r2=227278&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Tue Jan 27 18:46:09 2015<br>
@@ -3587,7 +3587,7 @@ retry_lookup:<br>
         QualifiedResults.push_back(Candidate);<br>
       break;<br>
     }<br>
-    Candidate.setCorrectionRange(TempSS, Result.getLookupNameInfo());<br>
+    Candidate.setCorrectionRange(SS.get(), Result.getLookupNameInfo());<br>
     return true;<br>
   }<br>
   return false;<br>
<br>
Modified: cfe/trunk/test/FixIt/typo-location-bugs.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/typo-location-bugs.cpp?rev=227278&r1=227277&r2=227278&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/typo-location-bugs.cpp?rev=227278&r1=227277&r2=227278&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/FixIt/typo-location-bugs.cpp (original)<br>
+++ cfe/trunk/test/FixIt/typo-location-bugs.cpp Tue Jan 27 18:46:09 2015<br>
@@ -34,3 +34,16 @@ void test(B b) {<br>
   b.f(1);  // expected-error{{too many arguments to function call, expected 0, have 1; did you mean 'A::f'?}}<br>
 }<br>
 }<br>
+<br>
+namespace PR20626 {<br>
+class A {<br>
+public:<br>
+  void Foo(){};  // expected-note{{'Foo' declared here}}<br>
+};<br>
+class B {};<br>
+class C : public A, public B {<br>
+  void Run() {<br>
+    B::Foo();  // expected-error{{no member named 'Foo' in 'PR20626::B'; did you mean simply 'Foo'?}}<br>
+  }<br>
+};<br>
+}<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cfe-commits@cs.uiuc.edu&cc=&bcc=&su=&body=','_blank');return false;" class="cremed">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" rel="noreferrer" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>