From 13f0bb8b3aaf160459e56c4809a627de258549a6 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Fri, 4 Sep 2015 15:46:51 +0000 Subject: [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 --- clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp') diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp index b5064da6199..e6d5bc3f4d9 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 }; -- cgit v1.2.3