diff options
| author | Reid Kleckner <rnk@google.com> | 2017-02-14 18:38:40 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-02-14 18:38:40 +0000 |
| commit | 273895bbc960288c950c7f3d571d3c868018d9f9 (patch) | |
| tree | ec97d69f6fb470dcd8d833e51ae0a6fc5ccb7204 /clang/lib/Lex | |
| parent | 2a02c2e33129017d41b751921e27909ee97e0719 (diff) | |
| download | bcm5719-llvm-273895bbc960288c950c7f3d571d3c868018d9f9.tar.gz bcm5719-llvm-273895bbc960288c950c7f3d571d3c868018d9f9.zip | |
Remove unnecessary std::string construction
llvm-svn: 295083
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 322c5809cd2..811f7ff9542 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1983,14 +1983,13 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, Path.size() <= Filename.size() ? Filename[Path.size()-1] : (isAngled ? '>' : '"')); } - auto Replacement = Path.str().str(); // For user files and known standard headers, by default we issue a diagnostic. // For other system headers, we don't. They can be controlled separately. auto DiagId = (FileCharacter == SrcMgr::C_User || warnByDefaultOnWrongCase(Name)) ? diag::pp_nonportable_path : diag::pp_nonportable_system_path; SourceRange Range(FilenameTok.getLocation(), CharEnd); - Diag(FilenameTok, DiagId) << Replacement << - FixItHint::CreateReplacement(Range, Replacement); + Diag(FilenameTok, DiagId) << Path << + FixItHint::CreateReplacement(Range, Path); } } |

