[clang] Omit most AttributedStatements from the CFG
authorNico Weber <thakis@chromium.org>
Mon, 11 Oct 2021 18:19:21 +0000 (14:19 -0400)
committerNico Weber <thakis@chromium.org>
Tue, 12 Oct 2021 13:15:45 +0000 (09:15 -0400)
commitc74ab84ea23f497ac83501473220cd9cfefe81e8
tree07aa6795993020909f1aa40ef931f3e50a8f89aa
parent0a7f81a4518ef88d897322985483c2dd48fa577e
[clang] Omit most AttributedStatements from the CFG

`[[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's no benefit in including
them.

Fixes PR52103 and PR49454. See PR52103 for details.

Differential Revision: https://reviews.llvm.org/D111568
clang/lib/Analysis/CFG.cpp
clang/test/SemaCXX/switch-implicit-fallthrough.cpp
clang/test/SemaCXX/unreachable-code.cpp