cor3ntin wrote:
@azmat-y I spent some time looking into this. because `?:` is never valid in a
fold expression, we parse it as a conditional expression - so far so good. but
we never check that the expressions involve don't contain packs.
So a proper fix would be something like:
```diff
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9200,6 +9200,12 @@ ExprResult Sema::ActOnConditionalOp(SourceLocation
QuestionLoc,
SourceLocation ColonLoc,
Expr *CondExpr, Expr *LHSExpr,
Expr *RHSExpr) {
+
+ if(DiagnoseUnexpandedParameterPack(CondExpr) ||
+ (LHSExpr && DiagnoseUnexpandedParameterPack(LHSExpr))
+ || DiagnoseUnexpandedParameterPack(RHSExpr))
+ return ExprError();
+
```
Can you modify your patch? thanks!
https://github.com/llvm/llvm-project/pull/164019
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits