[PATCH] D112159: Relax assert in ExprConstant to a return None.

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 20 11:31:19 PDT 2021


JonChesterfield added inline comments.


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:2137
     //
     // Let's see if this is a constant < 0. If so, we reject it out of hand,
     // per CWG1464. Otherwise, if it's not a constant, we must have an
----------------
Shame about the whitespace noise. getIntegerConstantExpr guards the block and is dominated by isValueDependent.


================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:2171
 
               Expr *ArgExpr = (ArgDepMatrix->*GetArgDimensionExpr)();
+              if (Optional<llvm::APSInt> ArgConst =
----------------
this parses as `!ArgExpr->isValueDependent() && ArgExpr->getIntegerConstantExpr(S.Context) && ...`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112159/new/

https://reviews.llvm.org/D112159



More information about the cfe-commits mailing list