cor3ntin marked 8 inline comments as done.
cor3ntin added inline comments.

================
Comment at: clang/include/clang/Sema/Sema.h:9602-9604
+    return Ctx.Context ==
+               ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed ||
+           Ctx.IsCheckingDefaultArgumentOrInitializer;
----------------
shafik wrote:
> aaron.ballman wrote:
> > Hmm, it'd be nice to not name this with the same identifier as the `bool` 
> > member on line 1333, that surprised me a little bit when I ran into it 
> > below.
> Why are we logically ORing an enumerator w/ a `bool`?
I added parentheses here to make that clearer!


================
Comment at: clang/lib/Sema/SemaExpr.cpp:5918
+    if (const FunctionDecl *FD = E->getDirectCallee())
+      HasImmediateCalls |= FD->isConsteval();
+    return RecursiveASTVisitor<ImmediateCallVisitor>::VisitStmt(E);
----------------
@shafk 


================
Comment at: clang/test/SemaCXX/cxx2a-consteval-default-params.cpp:10
+    {
+        return undefined();  // expected-error {{not a constant expression}} \
+                             // expected-note  {{undefined function 
'undefined'}}
----------------
cor3ntin wrote:
> shafik wrote:
> > I don't think we expect a diagnostic here since `check_lambdas_unused` is 
> > never called.
> We do because the body of a lambda is not considered a subexpression. I 
> confirmed that with core.
> 
> See https://lists.isocpp.org/core/2022/10/13364.php
I added a comment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136554

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to