]> granicus.if.org Git - clang/commit
alpha.core.UnreachableCode - don't warn about unreachable code inside macro
authorDaniel Marjamaki <daniel.marjamaki@evidente.se>
Tue, 18 Oct 2016 13:16:53 +0000 (13:16 +0000)
committerDaniel Marjamaki <daniel.marjamaki@evidente.se>
Tue, 18 Oct 2016 13:16:53 +0000 (13:16 +0000)
commita56684f9d508e1d4c80eb238f712762f23247a27
tree84e4b79d270b47d376e49e0fa7852d960519f928
parent56e3495af2ef262e7fcfc0a027024a7b314a823b
alpha.core.UnreachableCode - don't warn about unreachable code inside macro

In macros, 'do {...} while (0)' is often used. Don't warn about the condition 0 when it is unreachable.

Differential Revision: https://reviews.llvm.org/D25606

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284477 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
test/Analysis/unreachable-code-path.c