Skip to content

Commit 2c00ae9

Browse files
committed
[cxx-interop] Adjust a concepts test for rebranch
Clang now includes concepts in the mangled names of C++ functions: swiftlang/llvm-project@4b163e3 This adjusts the test to verify that we don't transitively emit the symbols referenced from the requires expression. Those symbols shouldn't be emitted because they are not executed. rdar://127263407
1 parent 71c81d5 commit 2c00ae9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/Interop/Cxx/concepts/Inputs/method-requires.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
inline void calledFromConceptBody(int x) {}
1+
inline void shouldNotBeCalledOrEmitted(int) {}
2+
3+
inline void calledFromConceptBody(int x) { shouldNotBeCalledOrEmitted(x); }
24
inline void calledFromMethodBody(int x) {}
35

46
struct MyStruct {

test/Interop/Cxx/concepts/method-requires.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import MethodRequires
44

55
var s = MyStruct()
66
s.foo(123)
7-
// CHECK-NOT: calledFromConceptBody
7+
// CHECK-NOT: shouldNotBeCalledOrEmitted
88
// CHECK: calledFromMethodBody

0 commit comments

Comments
 (0)