[clang-tools-extra] r212042 - Initialize ClangTidyMessage::FileOffset field to avoid unitialized variable access when sorting errors on output.
Alexander Kornienko
alexfh at google.com
Mon Jun 30 07:29:03 PDT 2014
Author: alexfh
Date: Mon Jun 30 09:29:03 2014
New Revision: 212042
URL: http://llvm.org/viewvc/llvm-project?rev=212042&view=rev
Log:
Initialize ClangTidyMessage::FileOffset field to avoid unitialized variable access when sorting errors on output.
Modified:
clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp?rev=212042&r1=212041&r2=212042&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Mon Jun 30 09:29:03 2014
@@ -94,7 +94,8 @@ private:
};
} // end anonymous namespace
-ClangTidyMessage::ClangTidyMessage(StringRef Message) : Message(Message) {}
+ClangTidyMessage::ClangTidyMessage(StringRef Message)
+ : Message(Message), FileOffset(0) {}
ClangTidyMessage::ClangTidyMessage(StringRef Message,
const SourceManager &Sources,
More information about the cfe-commits
mailing list