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)
commitfa1bf447d904bdcbe8e78812d27f50c580e49c43
tree8cc82060cfee320f80653c715400ce0c3834ccc9
parent6b6291aa9b25580a92b76abd8c8dad960ad75237
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

llvm-svn: 284477
clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
clang/test/Analysis/unreachable-code-path.c