diff options
| author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2024-11-01 11:49:43 -0400 |
|---|---|---|
| committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2024-11-04 17:21:38 -0500 |
| commit | 9694b56ee570a5376d232971996db8f9acded7c6 (patch) | |
| tree | ce1aa713a9dc884e0f1c7a3ce7b0e2cf2c6895b0 | |
| parent | 4c3366aa829aabfc5b630617aeb32427e99f35a7 (diff) | |
Fix test; use workaround for type canonicalizationusers/hubert-reinterpretcast/ItaniumMangle-cpVersusClManglingAtBlockScope
The context-dependent nature of the mangling is broken under the status
quo due because "equivalent" dependent types need different mangling.
CWG 2946 has been opened to clarify such cases as being not equivalent.
| -rw-r--r-- | clang/test/CodeGenCXX/mangle-exprs.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/mangle-exprs.cpp b/clang/test/CodeGenCXX/mangle-exprs.cpp index f9583c46598f..ca30de6fa668 100644 --- a/clang/test/CodeGenCXX/mangle-exprs.cpp +++ b/clang/test/CodeGenCXX/mangle-exprs.cpp @@ -118,20 +118,22 @@ namespace test1 { // CHECK-LABEL: define linkonce_odr noundef signext i16 @_ZN5test11bIsEEDTcp3foocvT__EEES1_( template <class T> auto b(T t) -> decltype((foo)(T())) { return (foo)(t); } + // CHECK-LABEL: define {{.*}} @_ZN5test11cEs( inline short *c(short s) { using test1::foo; void *foo(void *); - // CHECK-LABEL: define {{.*}} @_ZZN5test11cEsENKUlT_E_clIsEEPDTcl3foofp_EES0_( + // CHECK: = call {{.*}} @_ZZN5test11cEsENKUlT_E_clIsEEPDTcl3foofp_EES0_( return [](auto t) -> decltype((foo)(t)) * { static auto x = (foo)(t); return &x; }(s); } + // CHECK-LABEL: define {{.*}} @_ZN5test11dEs( inline short *d(short s) { using test1::foo; - // CHECK-LABEL: define {{.*}} @_ZZN5test11dEsENKUlT_E_clIsEEPDTcp3foofp_EES0_( - return [](auto t) -> decltype((foo)(t)) * { + // CHECK: = call {{.*}} @_ZZN5test11dEsENKUlT_E_clIsEEPDTcp3foodeadfp_EES0_( + return [](auto t) -> decltype((foo)(*&t)) * { static auto x = (foo)(t); return &x; }(s); |
