freebsd-dev/contrib/llvm-project
Dimitry Andric 56f2446575 Apply clang fix for assertion building emulators/rpcs3
Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva):

  [clang] Fix crash when handling nested immediate invocations

  Before this patch it was expected that if there was several immediate
  invocations they all belong to the same expression evaluation context.
  During parsing of non local variable initializer a new evaluation context is
  pushed, so code like this
  ```
  namespace scope {
  struct channel {
      consteval channel(const char* name) noexcept { }
  };
  consteval const char* make_channel_name(const char* name) { return name;}

  channel rsx_log(make_channel_name("rsx_log"));
  }
  ```
  produced a nested immediate invocation whose subexpressions are attached
  to different expression evaluation contexts. The constructor call
  belongs to TU context and `make_channel_name` call to context of
  variable initializer.

  This patch removes this assumption and adds tracking of previously
  failed immediate invocations, so it is possible when handling an
  immediate invocation th check that its subexpressions from possibly another
  evaluation context contains errors and not produce duplicate
  diagnostics.

  Fixes https://github.com/llvm/llvm-project/issues/58207

  Reviewed By: aaron.ballman, shafik

  Differential Revision: https://reviews.llvm.org/D146234

PR:		269489
MFC after:	3 days
2023-04-28 16:09:45 +02:00
..
clang Apply clang fix for assertion building emulators/rpcs3 2023-04-28 16:09:45 +02:00
compiler-rt Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a 2023-02-08 20:05:19 +01:00
libcxx Reapply: <type_traits>: Avoid instantiating a pointer type in std::decay<> 2023-02-09 17:28:32 +01:00
libunwind Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b 2023-02-08 20:04:38 +01:00
lld Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a 2023-02-08 20:05:19 +01:00
lldb Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a 2023-02-08 20:05:19 +01:00
llvm llvm/lld: damage control threading 2023-04-03 16:05:42 +00:00
openmp Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d 2023-02-08 20:04:56 +01:00
FREEBSD-Xlist Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787 2023-02-08 20:02:26 +01:00