Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Kirill Bobyrev via cfe-commits
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(),

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Alexander Shaposhnikov via cfe-commits
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

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Kirill Bobyrev via cfe-commits
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?

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Alexander Shaposhnikov via cfe-commits
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

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Kirill Bobyrev via cfe-commits
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

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Kirill Bobyrev via cfe-commits
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

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-28 Thread Kirill Bobyrev via 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

Re: [PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-27 Thread Saleem Abdulrasool via cfe-commits
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

[PATCH] D22881: Fix NamedDeclFindingASTVisitor

2016-07-27 Thread Alexander Shaposhnikov via 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