Skip to content

Commit a097cdd

Browse files
committed
Fixed a crash when the body of a templated function contains references to non-functions.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent f8f11d2 commit a097cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CppParser/Parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3003,7 +3003,7 @@ static bool IsInvalid(clang::Stmt* Body, std::unordered_set<clang::Stmt*>& Bodie
30033003
{
30043004
if (D->isInvalidDecl())
30053005
return true;
3006-
if (auto F = cast<FunctionDecl>(D))
3006+
if (auto F = dyn_cast<FunctionDecl>(D))
30073007
if (IsInvalid(F->getBody(), Bodies))
30083008
return true;
30093009
}

0 commit comments

Comments
 (0)