Kaydet (Commit) 9a9d4079 authored tarafından Noel Grandin's avatar Noel Grandin

prevent crashes when running the global-analysis plugins

Change-Id: Ib50583289afd6212d5d5aedd3d6b7ede75902052
Reviewed-on: https://gerrit.libreoffice.org/60277
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8e4e0bf8
......@@ -217,6 +217,10 @@ const FunctionDecl* Plugin::getParentFunctionDecl( const Stmt* stmt )
StringRef Plugin::getFileNameOfSpellingLoc(SourceLocation spellingLocation) const
{
// prevent crashes when running the global-analysis plugins
if (!spellingLocation.isValid())
return "";
static enum { NOINIT, STDIN, GOOD } s_Mode(NOINIT);
if (s_Mode == GOOD)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment