<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 15, 2014 at 1:25 PM, Olivier Goffart <span dir="ltr"><<a href="mailto:ogoffart@kde.org" target="_blank">ogoffart@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
This fixes <a href="http://llvm.org/bugs/show_bug.cgi?id=15125" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=15125</a><br>
The problem is that destructor->getNameInfo().getSourceRange() only contains<br>
the '~' and not the class name after it.<br>
<br>
This is why for example the destructor name is not highlighted in my code<br>
browser, only the '~' has a tooltip.<br>
<a href="http://code.woboq.org/userspace/llvm/tools/clang/include/clang/AST/DeclarationName.h.html#_ZN5clang20DeclarationNameTableD1Ev" target="_blank">http://code.woboq.org/userspace/llvm/tools/clang/include/clang/AST/DeclarationName.h.html#_ZN5clang20Declarationisn'tNameTableD1Ev</a></blockquote>
<div><br></div><div>+            return CreateParsedType(MemberOfType,<br></div><div><div>+                    Context.getTrivialTypeSourceInfo(MemberOfType, NameLoc));</div><div>             return ParsedType::make(MemberOfType);</div>
</div><div><br></div><div>Please delete the unreachable 'return' statement here.</div><div><br></div><div>There are 3 other 'return ParsedType::make(...);' calls in this function, and they all seem to have the same issue; do these need changes too? Also, you aren't including the location information from the CXXScopeSpec in the produced TypeSourceInfo, so this still doesn't look exactly right (for p->X::Y::~Y(), you probably won't be able to provide an appropriate tooltip for the 'X', even with this fix, for instance).</div>
<div><br></div><div>The changes to DeclarationName.cpp and to DeclPrinterTest.cpp look unrelated to this fix (right?), and the fix itself seems to be missing a test.</div></div></div></div>