[PATCH] D89580: SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef

Jonas Devlieghere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 22:40:50 PDT 2020


JDevlieghere added inline comments.


================
Comment at: clang/include/clang/Basic/SourceManager.h:293
       X.ContentAndKind.setInt(FileCharacter);
-      X.Filename = Filename;
+      const_cast<ContentCache &>(Con).Filename = Filename;
       return X;
----------------
Would it possibly make more sense to drop the `const` qualifier from the argument? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89580/new/

https://reviews.llvm.org/D89580



More information about the cfe-commits mailing list