Hello, While running some private CSA checkers on a recent checkout of clang (dev), I found the following fix to be necessary to prevent a null pointer error in lib/StaticAnalyzer/Core/IssueHash.cpp
— Mathieu
diff --git a/lib/StaticAnalyzer/Core/IssueHash.cpp b/lib/StaticAnalyzer/Core/IssueHash.cpp --- a/lib/StaticAnalyzer/Core/IssueHash.cpp +++ b/lib/StaticAnalyzer/Core/IssueHash.cpp @@ -128,6 +128,9 @@ static StringRef GetNthLineOfFile(llvm::MemoryBuffer *Buffer, int Line) { static std::string NormalizeLine(const SourceManager &SM, FullSourceLoc &L, const Decl *D) { + if (!D) + return ""; + static StringRef Whitespaces = " \t\n"; const LangOptions &Opts = D->getASTContext().getLangOpts();
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits