================
@@ -28,6 +28,18 @@ template <typename T> bool isTypedefAnonRecord(const T *D) {
   return false;
 }
 
+Location MapASTVisitor::getDeclLocation(const NamedDecl *D) const {
+  bool IsFileInRootDir;
+  llvm::SmallString<128> File =
+      getFile(D, D->getASTContext(), CDCtx.SourceRoot, IsFileInRootDir);
+  ASTContext &Context = D->getASTContext();
+  int Start =
+      Context.getSourceManager().getPresumedLoc(D->getBeginLoc()).getLine();
----------------
mysterymath wrote:

nit: Extracting out a source manager reference would make the difference 
between these two lines clearer.

https://github.com/llvm/llvm-project/pull/135081
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to