<div class="gmail_quote">A few comments inline...</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Jan 11, 2012 at 11:37 AM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com">rikka@google.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=147962&r1=147961&r2=147962&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=147962&r1=147961&r2=147962&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Jan 11 13:37:46 2012<br>
@@ -1745,6 +1745,30 @@<br>
                              EllipsisLoc);<br>
 }<br>
<br>
+namespace {<br>
+<br>
+// Callback to only accept typo corrections that are namespaces.<br></blockquote><div><br></div><div>I think this comment was cut/pasted from the other callback.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Modified: cfe/trunk/test/SemaCXX/typo-correction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/typo-correction.cpp?rev=147962&r1=147961&r2=147962&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/typo-correction.cpp?rev=147962&r1=147961&r2=147962&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/test/SemaCXX/typo-correction.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/typo-correction.cpp Wed Jan 11 13:37:46 2012<br>
@@ -29,3 +29,14 @@<br>
 inline error_condition make_error_condition(errc _e) {<br>
   return error_condition(static_cast<int>(_e));<br>
 }<br>
+<br>
+<br>
+// Prior to the introduction of a callback object to further filter possible<br>
+// typo corrections, this example would not trigger a suggestion as "base_type"<br>
+// is a closer match to "basetype" than is "BaseType" but "base_type" does not<br>
+// refer to a base class or non-static data member.<br>
+struct BaseType { };<br>
+struct Derived : public BaseType { // expected-note {{base class 'BaseType' specified here}}<br>
+  static int base_type;<br>
+  Derived() : basetype() {} // expected-error{{initializer 'basetype' does not name a non-static data member or base class; did you mean the base class 'BaseType'?}}<br>
+};</blockquote><div><br></div><div>It would be good to try to add similar examples for the other two code paths you switched to the callback mechanism. </div></div>