aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-09-04 15:46:51 +0000
committerAlexander Kornienko <alexfh@google.com>2015-09-04 15:46:51 +0000
commit13f0bb8b3aaf160459e56c4809a627de258549a6 (patch)
tree825ed31f19ac83c33f7cc1ede32c2a7e4163e62f /clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
parentdfe3d56d8783090c779abf7b8c33f0fdda1095ac (diff)
downloadllvm-13f0bb8b3aaf160459e56c4809a627de258549a6.zip
llvm-13f0bb8b3aaf160459e56c4809a627de258549a6.tar.gz
llvm-13f0bb8b3aaf160459e56c4809a627de258549a6.tar.bz2
[clang-tidy] Fix llvm-include-order check on Windows.
IncludeDirectives struct used a StringRef that pointed to a stack variable (SmallString<128> FilenameBuffer from PPDirectives.cpp:1513). http://reviews.llvm.org/D12632 Patch by Marek Kurdej! llvm-svn: 246856
Diffstat (limited to 'clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
index b5064da..e6d5bc3 100644
--- a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
+++ b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
@@ -33,7 +33,7 @@ private:
struct IncludeDirective {
SourceLocation Loc; ///< '#' location in the include directive
CharSourceRange Range; ///< SourceRange for the file name
- StringRef Filename; ///< Filename as a string
+ std::string Filename; ///< Filename as a string
bool IsAngled; ///< true if this was an include with angle brackets
bool IsMainModule; ///< true if this was the first include in a file
};