Szelethus added inline comments.

================
Comment at: 
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:223
+  // int*).
+  while (auto Tmp = V.getAs<loc::MemRegionVal>()) {
+    // We can't reason about symbolic regions, assume its initialized.
----------------
NoQ wrote:
> Hmm, i still have concerns about things like `int *x = (int *)&x;`. Why not 
> just check the type to terminate the loop? Type hierarchy is guaranteed to be 
> finite.
There actually is a testcase for that -- it would create a 
nonloc::LocAsInteger, not a loc::MemRegionVal.

I'll add a TODO to revisit this loop condition (again :) ).


https://reviews.llvm.org/D50509



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to