[PATCH] D89914: SourceManager: Make LastLineNoContentCache and ContentCache::SourceLineCache mutable, NFC
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 20:32:16 PDT 2020
shafik accepted this revision.
shafik added a comment.
This revision is now accepted and ready to land.
LGTM, this feels cleaner.
================
Comment at: clang/include/clang/Basic/SourceManager.h:721
mutable FileID LastLineNoFileIDQuery;
- mutable SrcMgr::ContentCache *LastLineNoContentCache;
+ mutable const SrcMgr::ContentCache *LastLineNoContentCache;
mutable unsigned LastLineNoFilePos;
----------------
Maybe to clarify that the mutable applies to the pointer and not the `const SrcMgr::ContentCache`:
```
using ConstContentCache = const SrcMgr::ContentCache;
mutable ConstContentCache *LastLineNoContentCache;
```
debatable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89914/new/
https://reviews.llvm.org/D89914
More information about the cfe-commits
mailing list