================
@@ -1275,43 +1275,24 @@ class SourceManager : public 
RefCountedBase<SourceManager> {
   /// start of the buffer of the location.
   FileIDAndOffset getDecomposedLoc(SourceLocation Loc) const {
     FileID FID = getFileID(Loc);
-    auto *Entry = getSLocEntryOrNull(FID);
-    if (!Entry)
-      return std::make_pair(FileID(), 0);
-    return std::make_pair(FID, Loc.getOffset() - Entry->getOffset());
+    const SrcMgr::SLocEntry &Entry = getSLocEntry(FID);
----------------
SergejSalnikov wrote:

I think you are right. Reverted back.

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

Reply via email to