Fix for-loops without inits counting as branching
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eb640e513a
commit
021a270e08
@ -120,7 +120,8 @@ bool OperationFinderAstVisitor::dataTraverseStmtPost(clang::Stmt* stmt)
|
|||||||
|
|
||||||
clang::Stmt* OperationFinderAstVisitor::_isBranchEntry(clang::Stmt* stmt)
|
clang::Stmt* OperationFinderAstVisitor::_isBranchEntry(clang::Stmt* stmt)
|
||||||
{
|
{
|
||||||
if (auto* loop = clang::dyn_cast<clang::ForStmt>(stmt))
|
if (auto* loop = clang::dyn_cast<clang::ForStmt>(stmt);
|
||||||
|
loop && loop->getInit())
|
||||||
{
|
{
|
||||||
_loop_header.init = loop->getInit();
|
_loop_header.init = loop->getInit();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user