aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/HeaderSearch.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2023-06-01 13:57:02 +0200
committerHaojian Wu <hokein.wu@gmail.com>2023-06-01 14:42:16 +0200
commitfca2109047964ea884fcd86efe24bc4c4bfb940e (patch)
tree3097bad44315d626b48462d56e84c5ce617fea7b /clang/lib/Lex/HeaderSearch.cpp
parent9694e0fcbac1554b619130d712c0dd1b04435e21 (diff)
downloadllvm-fca2109047964ea884fcd86efe24bc4c4bfb940e.zip
llvm-fca2109047964ea884fcd86efe24bc4c4bfb940e.tar.gz
llvm-fca2109047964ea884fcd86efe24bc4c4bfb940e.tar.bz2
[clang][NFC] Make HeaderSearch::suggestPathToFileForDiagnostics method const.
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r--clang/lib/Lex/HeaderSearch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index db7e531..33b2592 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -1919,7 +1919,7 @@ void HeaderSearch::loadSubdirectoryModuleMaps(DirectoryLookup &SearchDir) {
}
std::string HeaderSearch::suggestPathToFileForDiagnostics(
- const FileEntry *File, llvm::StringRef MainFile, bool *IsSystem) {
+ const FileEntry *File, llvm::StringRef MainFile, bool *IsSystem) const {
// FIXME: We assume that the path name currently cached in the FileEntry is
// the most appropriate one for this analysis (and that it's spelled the
// same way as the corresponding header search path).
@@ -1929,7 +1929,7 @@ std::string HeaderSearch::suggestPathToFileForDiagnostics(
std::string HeaderSearch::suggestPathToFileForDiagnostics(
llvm::StringRef File, llvm::StringRef WorkingDir, llvm::StringRef MainFile,
- bool *IsSystem) {
+ bool *IsSystem) const {
using namespace llvm::sys;
llvm::SmallString<32> FilePath = File;