[PATCH] D129488: [Sema] Fix evaluation context of immediate functions in default arguments

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 11 07:58:53 PDT 2022


ilya-biryukov created this revision.
ilya-biryukov added a reviewer: jyknight.
Herald added a project: All.
ilya-biryukov requested review of this revision.
Herald added a project: clang.

They must be evaluated in the context where default argument is actually
used during a call, not in a parameter list where default argument is specified.
This affects correctness of `std::source_location`.

Fixes #56379.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129488

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaExpr.cpp
  clang/test/SemaCXX/source_location.cpp
  clang/test/SemaCXX/source_location_consteval.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129488.443642.patch
Type: text/x-patch
Size: 4280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220711/f522aada/attachment.bin>


More information about the cfe-commits mailing list