-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang] call HandleImmediateInvocation before checking for immediate …
…escacalating expressions (#124414) HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and should always be called before CheckImmediateEscalatingFunctionDefinition. However, we were not doing that in `ActFunctionBody`. We simply move CheckImmediateEscalatingFunctionDefinition to PopExpressionEvaluationContext. Fixes #119046
- Loading branch information
Showing
6 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// RUN: %clang_cc1 -std=c++2a -triple x86_64-elf-gnu %s -emit-llvm -o - | FileCheck %s | ||
|
||
struct S { | ||
consteval void operator()() {} | ||
}; | ||
|
||
template <class Fn> | ||
constexpr void dispatch(Fn fn) { | ||
fn(); | ||
} | ||
|
||
template <class Visitor> | ||
struct value_visitor { | ||
constexpr void operator()() { visitor(); } | ||
Visitor&& visitor; | ||
}; | ||
|
||
template <class Visitor> | ||
constexpr auto make_dispatch() { | ||
return dispatch<value_visitor<S>>; | ||
} | ||
|
||
template <class Visitor> | ||
constexpr void visit(Visitor&&) { | ||
make_dispatch<Visitor>(); | ||
} | ||
|
||
void f() { visit(S{}); } | ||
|
||
// CHECK: define {{.*}} @_Z1fv | ||
// CHECK-NOT: define {{.*}} @_Z5visitI1SEvOT_ | ||
// CHECK-NOT: define {{.*}} @_Z13make_dispatchI1SEDav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters