diff options
Diffstat (limited to 'test/SemaCXX/linkage2.cpp')
-rw-r--r-- | test/SemaCXX/linkage2.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/linkage2.cpp b/test/SemaCXX/linkage2.cpp index ddf4064..3cfa981 100644 --- a/test/SemaCXX/linkage2.cpp +++ b/test/SemaCXX/linkage2.cpp @@ -152,3 +152,15 @@ namespace test15 { const int a = 5; // expected-note {{previous definition is here}} static const int a; // expected-error {{redefinition of 'a'}} } + +namespace test16 { + extern "C" { + class Foo { + int x; + friend int bar(Foo *y); + }; + int bar(Foo *y) { + return y->x; + } + } +} |