Index: lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp =================================================================== --- lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp +++ 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: test/Analysis/novoidtypecrash.c =================================================================== --- /dev/null +++ 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; +}