[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
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 @@
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
};