[clang] [Clang] Do not perform integral promotion if operands of expression `x ? : y` have the same type (PR #108837)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 11:21:56 PDT 2024
================
@@ -8785,14 +8785,11 @@ ExprResult Sema::ActOnConditionalOp(SourceLocation QuestionLoc,
commonExpr = result.get();
}
// We usually want to apply unary conversions *before* saving, except
- // in the special case of a C++ l-value conditional.
- if (!(getLangOpts().CPlusPlus
- && !commonExpr->isTypeDependent()
- && commonExpr->getValueKind() == RHSExpr->getValueKind()
- && commonExpr->isGLValue()
----------------
erichkeane wrote:
So I don't see how losing the above two value kind exceptions fix this? Can you explain this better?
https://github.com/llvm/llvm-project/pull/108837
More information about the cfe-commits
mailing list