[PATCH] D48205: [analyzer] Assert that nonloc::SymbolVal always wraps a non-Loc-type symbol.

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 15 09:32:36 PDT 2018


george.karpenkov accepted this revision.
george.karpenkov added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1241
       if (const llvm::APSInt *I =
-              SVB.getKnownValue(State, nonloc::SymbolVal(S)))
+              SVB.getKnownValue(State, SVB.makeSymbolVal(S)))
         return Loc::isLocType(S->getType()) ? (SVal)SVB.makeIntLocVal(*I)
----------------
So what is the difference here? That `SVB.makeSymbolVal` is not always a nonloc?


Repository:
  rC Clang

https://reviews.llvm.org/D48205





More information about the cfe-commits mailing list