[PATCH] D132941: [DO NOT SUBMIT] [Sema] Delay evaluation of std::source_location::current() in default arguments

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 04:08:55 PDT 2022


ilya-biryukov added a subscriber: rsmith.
ilya-biryukov added a comment.

In D132941#3826398 <https://reviews.llvm.org/D132941#3826398>, @cor3ntin wrote:

> I think this is superseded by https://cplusplus.github.io/CWG/issues/2631.html and its resolution.
> Which I'm looking into implementing - I'll let you know if I manage to get it working (I still have a number of failing tests). 
> The idea is the same though, we keep a rewritten Expr in `CXXDefaultArgExpr`.

LG, thanks for taking this over.
We chatted with @rsmith about this and one of the seemingly important optimizations that Richard suggested is to try avoiding the extra rewriting of expressions that don't have any immediate function calls.
Not sure how important this ends being for performance of compiling real code, but may be worth exploring.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132941



More information about the cfe-commits mailing list