diff options
Diffstat (limited to 'clang-tools-extra/clang-include-fixer/IncludeFixer.cpp')
| -rw-r--r-- | clang-tools-extra/clang-include-fixer/IncludeFixer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp b/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp index c4173426277..c07add2c760 100644 --- a/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp +++ b/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp @@ -306,8 +306,7 @@ std::string IncludeFixerSemaSource::minimizeInclude( // Get the FileEntry for the include. StringRef StrippedInclude = Include.trim("\"<>"); - const FileEntry *Entry = - SourceManager.getFileManager().getFile(StrippedInclude); + auto Entry = SourceManager.getFileManager().getFile(StrippedInclude); // If the file doesn't exist return the path from the database. // FIXME: This should never happen. @@ -316,7 +315,7 @@ std::string IncludeFixerSemaSource::minimizeInclude( bool IsSystem = false; std::string Suggestion = - HeaderSearch.suggestPathToFileForDiagnostics(Entry, "", &IsSystem); + HeaderSearch.suggestPathToFileForDiagnostics(*Entry, "", &IsSystem); return IsSystem ? '<' + Suggestion + '>' : '"' + Suggestion + '"'; } |

