Avoid some noisy const_casts by making ContentCache::SourceLineCache
and SourceManager::LastLineNoContentCache both mutable.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Note that this was in response to Shafik's comment in https://reviews.llvm.org/D89554.
Comment Actions
LGTM, this feels cleaner.
clang/include/clang/Basic/SourceManager.h | ||
---|---|---|
721 | 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. |
Maybe to clarify that the mutable applies to the pointer and not the const SrcMgr::ContentCache:
debatable.