]> granicus.if.org Git - clang/commit
[StaticAnalyzer] Fix false positives for unreachable code in macros.
authorDaniel Marjamaki <daniel.marjamaki@evidente.se>
Wed, 2 Aug 2017 08:26:56 +0000 (08:26 +0000)
committerDaniel Marjamaki <daniel.marjamaki@evidente.se>
Wed, 2 Aug 2017 08:26:56 +0000 (08:26 +0000)
commit5ef8aefaba448c0833e34737c2a25d9aaaff0f36
treeb830167301bb1f7bbac2a58982d3a3991f832ddc
parentd7be359ae9ef18903ff36837e5a9c6caab69a1b4
[StaticAnalyzer] Fix false positives for unreachable code in macros.

Example:

#define MACRO(C)   if (C) { static int x; .. }
void foo() {
MACRO(0);
}

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

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