================ @@ -10,8 +10,10 @@ void testRValueOutput() { int &ref = global; ref = 1; __asm__("" : "=r"(((int)(global)))); // don't crash on rvalue output operand - clang_analyzer_eval(global == 1); // expected-warning{{UNKNOWN}} - clang_analyzer_eval(ref == 1); // expected-warning{{UNKNOWN}} + clang_analyzer_eval(global == 1); // expected-warning{{FALSE}} + // expected-warning@-1{{TRUE}} + clang_analyzer_eval(ref == 1); // expected-warning{{FALSE}} + // expected-warning@-1{{TRUE}} ---------------- steakhal wrote:
Here global and ref always refers to the same underlying storage, thus we don't need to test both. ```suggestion int origVal = global; __asm__("" : "=r"(((int)(global)))); // don't crash on rvalue output operand int newVal = global; // Value "after" the invalidation. clang_analyzer_eval(origVal == newVal); // expected-warning{{TRUE}} expected-warning{{FALSE}} ``` https://github.com/llvm/llvm-project/pull/109838 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits