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();