Index: cfe/trunk/lib/Frontend/ASTConsumers.cpp =================================================================== --- cfe/trunk/lib/Frontend/ASTConsumers.cpp +++ cfe/trunk/lib/Frontend/ASTConsumers.cpp @@ -478,6 +478,13 @@ Out << " " << '"' << I << "\"\n"; break; } + case Decl::Friend: { + Out << ""; + if (const NamedDecl *ND = cast(I)->getFriendDecl()) + Out << ' ' << *ND; + Out << "\n"; + break; + } default: Out << "DeclKind: " << DK << '"' << I << "\"\n"; llvm_unreachable("decl unhandled"); Index: cfe/trunk/test/Coverage/cxx-language-features.inc =================================================================== --- cfe/trunk/test/Coverage/cxx-language-features.inc +++ cfe/trunk/test/Coverage/cxx-language-features.inc @@ -25,3 +25,11 @@ template class C1 {}; template C1 f1() { return C1(); } void f2() { f1(); } + +// Friend declarations +struct FriendlyStruct { + friend bool operator==(FriendlyStruct, FriendlyStruct) { return true; } + friend struct FriendedStruct; +}; + +struct FriendedStruct { };