Index: cfe/trunk/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp =================================================================== --- cfe/trunk/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp +++ cfe/trunk/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp @@ -73,9 +73,9 @@ return; ProgramStateRef State = C.getState(); - SVal V = State->getSVal(location.castAs()); if (isGlobalConstString(location)) { + SVal V = State->getSVal(location.castAs()); Optional Constr = V.getAs(); if (Constr) { Index: cfe/trunk/test/Analysis/novoidtypecrash.c =================================================================== --- cfe/trunk/test/Analysis/novoidtypecrash.c +++ cfe/trunk/test/Analysis/novoidtypecrash.c @@ -0,0 +1,8 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core %s +a; +b(void **c) { // no-crash + *c = a; + int *d; + b(&d); + *d; +}