Skip to content

Commit f5a46b8

Browse files
committed
Better detect invalid specialized functions
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 9f7098b commit f5a46b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CppParser/Parser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,6 +3114,10 @@ static bool IsInvalid(clang::Stmt* Body, std::unordered_set<clang::Stmt*>& Bodie
31143114
return false;
31153115
Bodies.insert(Body);
31163116

3117+
if (auto E = dyn_cast<clang::Expr>(Body))
3118+
if (E->containsErrors())
3119+
return true;
3120+
31173121
Decl* D = 0;
31183122
switch (Body->getStmtClass())
31193123
{

0 commit comments

Comments
 (0)