Index: cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp =================================================================== --- cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp +++ cfe/trunk/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp @@ -112,7 +112,7 @@ continue; // Check for false positives - if (CB->size() > 0 && isInvalidPath(CB, *PM)) + if (isInvalidPath(CB, *PM)) continue; // It is good practice to always have a "default" label in a "switch", even Index: cfe/trunk/test/Analysis/unreachable-code-path.c =================================================================== --- cfe/trunk/test/Analysis/unreachable-code-path.c +++ cfe/trunk/test/Analysis/unreachable-code-path.c @@ -213,3 +213,13 @@ RETURN(1); // no-warning } +// Avoid FP when macro argument is known +void writeSomething(int *x); +#define MACRO(C) \ + if (!C) { \ + static int x; \ + writeSomething(&x); \ + } +void macro2(void) { + MACRO(1); +}