[cfe-commits] r111238 - in /cfe/trunk: lib/AST/Decl.cpp test/SemaCXX/linkage-spec.cpp
Douglas Gregor
dgregor at apple.com
Tue Aug 17 09:09:23 PDT 2010
Author: dgregor
Date: Tue Aug 17 11:09:23 2010
New Revision: 111238
URL: http://llvm.org/viewvc/llvm-project?rev=111238&view=rev
Log:
A member function never has "C" linkage. Fixes <rdar://problem/8318976>.
Modified:
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/test/SemaCXX/linkage-spec.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=111238&r1=111237&r2=111238&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Tue Aug 17 11:09:23 2010
@@ -989,6 +989,9 @@
break;
}
+
+ if (DC->isRecord())
+ break;
}
return false;
Modified: cfe/trunk/test/SemaCXX/linkage-spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/linkage-spec.cpp?rev=111238&r1=111237&r2=111238&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/linkage-spec.cpp (original)
+++ cfe/trunk/test/SemaCXX/linkage-spec.cpp Tue Aug 17 11:09:23 2010
@@ -68,3 +68,12 @@
extern "C" void pr7859_c(short) {} // expected-note {{previous definition}}
extern "C" void pr7859_c(int) {} // expected-error {{conflicting}}
+
+// <rdar://problem/8318976>
+extern "C" {
+ struct s0 {
+ private:
+ s0();
+ s0(const s0 &);
+ };
+}
More information about the cfe-commits
mailing list