aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp b/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
index 0b67cba..81bb8de 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
+++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
@@ -69,7 +69,7 @@ IncludeSorter &IncludeInserter::getOrCreate(FileID FileID) {
std::optional<FixItHint>
IncludeInserter::createIncludeInsertion(FileID FileID, llvm::StringRef Header) {
- bool IsAngled = Header.consume_front("<");
+ const bool IsAngled = Header.consume_front("<");
if (IsAngled != Header.consume_back(">"))
return std::nullopt;
// We assume the same Header will never be included both angled and not
@@ -94,7 +94,7 @@ void IncludeInserter::addInclude(StringRef FileName, bool IsAngled,
SourceLocation EndLocation) {
assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call "
"registerPreprocessor()?");
- FileID FileID = SourceMgr->getFileID(HashLocation);
+ const FileID FileID = SourceMgr->getFileID(HashLocation);
getOrCreate(FileID).addInclude(FileName, IsAngled, HashLocation, EndLocation);
}