diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/c-linkage.cpp | 8 | ||||
-rw-r--r-- | clang/test/SemaCXX/linkage2.cpp | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/clang/test/CodeGenCXX/c-linkage.cpp b/clang/test/CodeGenCXX/c-linkage.cpp index cec9e282f69..f6e64d9e741 100644 --- a/clang/test/CodeGenCXX/c-linkage.cpp +++ b/clang/test/CodeGenCXX/c-linkage.cpp @@ -15,11 +15,13 @@ extern "C" { extern "C" { static void test2_f() { } - // This is not required by the standard, but users assume they know - // the mangling of static functions in extern "C" contexts. - // CHECK: define internal void @test2_f( + // CHECK: define internal void @_Z7test2_fv + static void test2_f(int x) { + } + // CHECK: define internal void @_Z7test2_fi void test2_use() { test2_f(); + test2_f(42); } } diff --git a/clang/test/SemaCXX/linkage2.cpp b/clang/test/SemaCXX/linkage2.cpp index 744741b7ca6..2cee581b49c 100644 --- a/clang/test/SemaCXX/linkage2.cpp +++ b/clang/test/SemaCXX/linkage2.cpp @@ -12,12 +12,12 @@ namespace test1 { } } -// FIXME: This should be OK. Both test2_f don't have language linkage since they -// have internal linkage. +// This is OK. Both test2_f don't have language linkage since they have +// internal linkage. extern "C" { - static void test2_f() { // expected-note {{previous definition is here}} + static void test2_f() { } - static void test2_f(int x) { // expected-error {{conflicting types for 'test2_f'}} + static void test2_f(int x) { } } |