aaron.ballman added a comment.
LGTM, thank you @thakis!
Comment at: clang/lib/Analysis/CFG.cpp:2407
+ return hasSpecificAttr(A->getAttrs()) &&
+ isa(A->getSubStmt());
+}
hans wrote:
> thakis wrote:
> > hans wrote:
> > > Can fallthrough statements ever
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc74ab84ea23f: [clang] Omit most AttributedStatements from
the CFG (authored by thakis).
Herald added a project: clang.
Repository:
rG LLVM Github
thakis updated this revision to Diff 378996.
thakis added a comment.
rename param; assert isa
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111568/new/
https://reviews.llvm.org/D111568
Files:
clang/lib/Analysis/CFG.cpp
clang/test/SemaCXX/switch-implicit-fallthrough.cpp
clang/test
hans accepted this revision.
hans added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Analysis/CFG.cpp:2407
+ return hasSpecificAttr(A->getAttrs()) &&
+ isa(A->getSubStmt());
+}
thakis wrote:
> hans wrote:
> > Ca
thakis marked an inline comment as done.
thakis added inline comments.
Comment at: clang/lib/Analysis/CFG.cpp:2407
+ return hasSpecificAttr(A->getAttrs()) &&
+ isa(A->getSubStmt());
+}
hans wrote:
> Can fallthrough statements ever have children? If not,
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 a
thakis added inline comments.
Comment at: clang/lib/Analysis/CFG.cpp:2418-2420
+ // also no children, and omit the others. None of the other current StmtAttrs
+ // have semantic meaning for the CFG.
+ if (isFallthroughStatement(A) && asc.alwaysAdd(*this, A)) {
aaron.ballman added a comment.
Thank you for the fix to this!
Comment at: clang/lib/Analysis/CFG.cpp:2418-2420
+ // also no children, and omit the others. None of the other current StmtAttrs
+ // have semantic meaning for the CFG.
+ if (isFallthroughStatement(A) && asc.alway
thakis added inline comments.
Comment at: clang/lib/Analysis/CFG.cpp:2410
+
+CFGBlock *CFGBuilder::VisitAttributedStmt(AttributedStmt *A,
+ AddStmtChoice asc) {
(Compare this function to `CFGBuilder::VisitStmt` in this fil
thakis created this revision.
thakis added reviewers: hans, aaron.ballman.
thakis requested review of this revision.
`[[clang::fallthrough]]` has meaning for the CFG, but all other
StmtAttrs we currently have don't. So omit them, as AttributedStatements
with children cause several issues and there
10 matches
Mail list logo