omtcyfz added a comment.
In https://reviews.llvm.org/D22881#498919, @alexshap wrote:
> i took a look at handleNestedNameSpecifierLoc:
>
> const auto *Decl = NameLoc.getNestedNameSpecifier()->getAsNamespace();
> if (Decl) {
>setResult(Decl, NameLoc.getLocalBeginLoc(), NameLoc.getLocalEndLo
alexshap added a comment.
i took a look at handleNestedNameSpecifierLoc:
const auto *Decl = NameLoc.getNestedNameSpecifier()->getAsNamespace();
if (Decl) {
setResult(Decl, NameLoc.getLocalBeginLoc(), NameLoc.getLocalEndLoc());
}
and added this check to VisitTypeLoc.
the other Visit* methods ar
omtcyfz added a comment.
In https://reviews.llvm.org/D22881#498911, @alexshap wrote:
> inside setResult Decl->getQualifiedNameAsString() is used
> so RD should not be nullptr there.
> we get there in the newly added test.
It is used, but then we should add this check to setResult, don't we?
alexshap added a comment.
inside setResult Decl->getQualifiedNameAsString() is used
so RD should not be nullptr there.
we get there in the newly added test.
https://reviews.llvm.org/D22881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
omtcyfz added a comment.
if (auto *RD = Loc.getType()->getAsCXXRecordDecl())
return setResult(RD, TypeBeginLoc, TypeEndLoc);
This isn't needed, too...
https://reviews.llvm.org/D22881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
omtcyfz added a comment.
*please don't accept patches so fast
https://reviews.llvm.org/D22881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
omtcyfz added a comment.
Well, in this case `SourceMgr` should be removed...
Please accept patches so fast; at least let the others take a look at it.
https://reviews.llvm.org/D22881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://li
compnerd closed this revision.
compnerd added a comment.
SVN r276948
https://reviews.llvm.org/D22881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexshap created this revision.
alexshap added reviewers: klimek, omtcyfz.
alexshap added subscribers: compnerd, cfe-commits.
alexshap changed the visibility of this Differential Revision from "Public (No
Login Required)" to "All Users".
Properly initialize the field Context in NamedDeclFindingAS