Home

[-Wunreachable-code] Don't warn about dead code guarded by a "configuration…

Press ? to show keyboard shortcuts.
Committed
kremenekMar 4 2014, 4:01 PM
Parents
rL202911: Headers: Provide an ABI compatible max_align_t when _MSC_VER is defined
Branches
Unknown
Tags
Unknown
Subscribers
None
Projects
None
Description

[-Wunreachable-code] Don't warn about dead code guarded by a "configuration value".

Some unreachable code is only "sometimes unreachable" because it
is guarded by a configuration value that is determined at compile
time and is always constant. Sometimes those represent real bugs,
but often they do not. This patch causes the reachability analysis
to cover such branches even if they are technically unreachable
in the CFG itself. There are some conservative heuristics at
play here to determine a "configuration value"; these are intended
to be refined over time.

rL202912

cfe/trunk/lib/Analysis/ReachableCode.cpp

Loading...

cfe/trunk/test/Sema/warn-unreachable.c

Loading...

Add Comment