Browse Source

Fixed a crash when the body of a templated function contains references to non-functions.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1014/head
Dimitar Dobrev 8 years ago
parent
commit
a097cdd437
  1. 2
      src/CppParser/Parser.cpp

2
src/CppParser/Parser.cpp

@ -3003,7 +3003,7 @@ static bool IsInvalid(clang::Stmt* Body, std::unordered_set<clang::Stmt*>& Bodie @@ -3003,7 +3003,7 @@ static bool IsInvalid(clang::Stmt* Body, std::unordered_set<clang::Stmt*>& Bodie
{
if (D->isInvalidDecl())
return true;
if (auto F = cast<FunctionDecl>(D))
if (auto F = dyn_cast<FunctionDecl>(D))
if (IsInvalid(F->getBody(), Bodies))
return true;
}

Loading…
Cancel
Save