[PATCH] D111568: [clang] Omit most AttributedStatements from the CFG

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 12 04:40:45 PDT 2021


hans added inline comments.


================
Comment at: clang/lib/Analysis/CFG.cpp:545
   CFGBlock *VisitAddrLabelExpr(AddrLabelExpr *A, AddStmtChoice asc);
+  CFGBlock *VisitAttributedStmt(AttributedStmt *C, AddStmtChoice asc);
   CFGBlock *VisitBinaryOperator(BinaryOperator *B, AddStmtChoice asc);
----------------
Change param name C -> A as in the function definition?


================
Comment at: clang/lib/Analysis/CFG.cpp:2407
+  return hasSpecificAttr<FallThroughAttr>(A->getAttrs()) &&
+         isa<NullStmt>(A->getSubStmt());
+}
----------------
Can fallthrough statements ever have children? If not, should it be an assert instead of a check here?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111568/new/

https://reviews.llvm.org/D111568



More information about the cfe-commits mailing list