[PATCH] D45416: [analyzer] ExprEngine: model GCC inline asm rvalue cast outputs

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 27 17:17:55 PDT 2018


rsmith added inline comments.


================
Comment at: test/Analysis/asm.cpp:9
+  ref = 1;
+  __asm__("" : "=r"((int)global));  // don't crash on rvalue output operand
+  clang_analyzer_eval(global == 1); // expected-warning{{UNKNOWN}}
----------------
Ugh, do we really need to support this nonsense? :(

If so, it'd seem reasonable to me to do the cleanup when building the AST rather than in the CFG builder (that is, convert the LValueToRValue cast here to a NoOp lvalue cast node, since that matches its actual semantics).


Repository:
  rC Clang

https://reviews.llvm.org/D45416





More information about the cfe-commits mailing list