================
@@ -24,6 +24,22 @@ using namespace clang::index;
 // USR generation.
 
//===----------------------------------------------------------------------===//
 
+/// Print only the offset part of \p Loc
+/// \returns true on error.
+static bool printLocOffset(llvm::raw_ostream &OS, SourceLocation Loc,
+                           const SourceManager &SM) {
+  if (Loc.isInvalid())
+    return true;
+  Loc = SM.getExpansionLoc(Loc);
----------------
ziqingluo-90 wrote:

You are right. Even though having the same expansion but different spelling 
locations for decls seems to be a rare case to me, it is worth fixing.

https://github.com/llvm/llvm-project/pull/205430
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to