} else if (getLangOpts().CPlusPlus && D.getDecl()) {
// Look for a declaration that's lexically in a record.
const FunctionDecl *FD = cast<FunctionDecl>(D.getDecl());
+ FD = FD->getMostRecentDecl();
do {
if (isa<CXXRecordDecl>(FD->getLexicalDeclContext())) {
if (FD->isImplicit() && !ForVTable) {
c.func();
}
}
+
+// PR13252
+namespace test2 {
+ struct A;
+ void f(const A& a);
+ struct A {
+ friend void f(const A& a) { }
+ };
+ void g() {
+ A a;
+ f(a);
+ }
+ // CHECK: define linkonce_odr void @_ZN5test21fERKNS_1AE
+}