================
@@ -4958,33 +4958,42 @@ SourceLocation DesignatedInitUpdateExpr::getEndLoc() 
const {
 }
 
 ParenListExpr::ParenListExpr(SourceLocation LParenLoc, ArrayRef<Expr *> Exprs,
-                             SourceLocation RParenLoc)
+                             SourceLocation RParenLoc,
+                             ArrayRef<SourceLocation> CommaLocs)
     : Expr(ParenListExprClass, QualType(), VK_PRValue, OK_Ordinary),
-      LParenLoc(LParenLoc), RParenLoc(RParenLoc) {
+      LParenLoc(LParenLoc), RParenLoc(RParenLoc), NumCommas(CommaLocs.size()) {
+  assert((CommaLocs.empty() || CommaLocs.size() + 1 == Exprs.size()) &&
----------------
erichkeane wrote:

Why do we need the 1st condition in this assert?  Can we have a case of no 
commas, but >1 expressions?

That said, this confirms to me we dont need to separately store the number of 
commas.

https://github.com/llvm/llvm-project/pull/199411
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to