Index: lib/StaticAnalyzer/Core/SVals.cpp =================================================================== --- lib/StaticAnalyzer/Core/SVals.cpp +++ lib/StaticAnalyzer/Core/SVals.cpp @@ -85,7 +85,7 @@ SymbolRef SVal::getAsLocSymbol(bool IncludeBaseRegions) const { // FIXME: should we consider SymbolRef wrapped in CodeTextRegion? if (Optional X = getAs()) - return X->getLoc().getAsLocSymbol(); + return X->getLoc().getAsLocSymbol(IncludeBaseRegions); if (Optional X = getAs()) { const MemRegion *R = X->getRegion(); Index: test/Analysis/symbol-reaper.c =================================================================== --- test/Analysis/symbol-reaper.c +++ test/Analysis/symbol-reaper.c @@ -85,8 +85,7 @@ x = (int)&(s->field); ptr = &arr[x]; if (s) {} - // FIXME: Should not warn. The symbol is still alive within the ptr's index. - } while (0); // expected-warning{{SYMBOL DEAD}} + } while (0); } // Test below checks lifetime of SymbolRegionValue in certain conditions.