Author: Macro Terra Date: 2026-11-12T20:14:28+08:00 New Revision: 041eb01e544d2452f02b74006e3a713a86529540
URL: https://github.com/llvm/llvm-project/commit/041eb01e544d2452f02b74006e3a713a86529540 DIFF: https://github.com/llvm/llvm-project/commit/041eb01e544d2452f02b74006e3a713a86529540.diff LOG: [Clang][NFC] Re-enable consumed analysis test for chained logical OR (#240849) Re-enable the three-way logical OR test in `testComplexConditionals1` by removing its `#if 0` guard and stale FIXME. The operands start in the unknown consumed state. Keep all six existing expected warnings in the true and false branches unchanged. Prepared with assistance from Codex. Added: Modified: clang/test/SemaCXX/warn-consumed-analysis.cpp Removed: ################################################################################ diff --git a/clang/test/SemaCXX/warn-consumed-analysis.cpp b/clang/test/SemaCXX/warn-consumed-analysis.cpp index 8e09779e64404..114025fb525aa 100644 --- a/clang/test/SemaCXX/warn-consumed-analysis.cpp +++ b/clang/test/SemaCXX/warn-consumed-analysis.cpp @@ -382,8 +382,6 @@ void testComplexConditionals1() { *var2; // expected-warning {{invalid invocation of method 'operator*' on object 'var2' while it is in the 'unknown' state}} } -#if 0 - // FIXME: Get this test to pass. if (var0 || var1 || var2) { *var0; // expected-warning {{invalid invocation of method 'operator*' on object 'var0' while it is in the 'unknown' state}} *var1; // expected-warning {{invalid invocation of method 'operator*' on object 'var1' while it is in the 'unknown' state}} @@ -394,7 +392,6 @@ void testComplexConditionals1() { *var1; // expected-warning {{invalid invocation of method 'operator*' on object 'var1' while it is in the 'consumed' state}} *var2; // expected-warning {{invalid invocation of method 'operator*' on object 'var2' while it is in the 'consumed' state}} } -#endif } void testStateChangeInBranch() { _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
