[clang] [Clang][Sema] Do not perform type conversion before computing result type of `x ? : y` in C++ (PR #108837)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 12 03:52:30 PST 2025
================
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
----------------
zwuis wrote:
> I think this test should go in `clang/test/Sema/conditional-expr.c` and we should add a section of the GNU extension there.
>
> I am also a bit concerned that we don't have a specific set of sema tests for the GNU form of the conditional expression. So it makes me much left confident that we will catch any breaks with this change.
I copied most test cases from 'clang/test/Sema/conditional-expr.c' and 'clang/test/SemaCXX/conditional-expr.cpp' to new files, and modified them to FNU extension form.
Please let me know if the test cases still should be merged into one file or we need other test cases.
https://github.com/llvm/llvm-project/pull/108837
More information about the cfe-commits
mailing list