a.sidorin added inline comments.

================
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:3082
+    if (X.isUnknown()) {
+      // The value being casted to rvalue can be garbage-collected after
+      // the cast is modeled. Try to recover the memory region being casted
----------------
george.karpenkov wrote:
> From my understanding, the code inside the if-block is not tested below
> 
It is tested: without this code, "TRUE" will be printed. The reason is that the 
lvalue of 'global' is removed from Environment after the cast happens so `X` 
becomes Unknown.  But the way of retrieving the value is definitely not the 
best so if you have any suggestions on improvement - they are welcome.


Repository:
  rC Clang

https://reviews.llvm.org/D45416



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

Reply via email to