From a097cdd4372134adbdcc43f2c186e2c9f80e3821 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sun, 3 Dec 2017 15:36:05 +0200 Subject: [PATCH] Fixed a crash when the body of a templated function contains references to non-functions. Signed-off-by: Dimitar Dobrev --- src/CppParser/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 820b29b3..fec84dec 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -3003,7 +3003,7 @@ static bool IsInvalid(clang::Stmt* Body, std::unordered_set& Bodie { if (D->isInvalidDecl()) return true; - if (auto F = cast(D)) + if (auto F = dyn_cast(D)) if (IsInvalid(F->getBody(), Bodies)) return true; }