diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index f277f1fac739b872d9226e4ddba2d8b73f7805f1..857a26621b8fc44553d562a324cd277d2a7abeb3 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -1122,7 +1122,7 @@ DeclPrinter::VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D) { void DeclPrinter::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) { Out << "using "; D->getQualifier()->print(Out, Policy); - Out << D->getDeclName(); + Out << D->getName(); } void DeclPrinter::VisitUsingShadowDecl(UsingShadowDecl *D) { diff --git a/clang/test/Index/comment-cplus-template-decls.cpp b/clang/test/Index/comment-cplus-template-decls.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c942d18211ebae31dde0728491cae974ca27bbe5 --- /dev/null +++ b/clang/test/Index/comment-cplus-template-decls.cpp @@ -0,0 +1,44 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 std=c++11 %s > %t/out +// RUN: FileCheck %s < %t/out + +// Ensure that XML we generate is not invalid. +// RUN: FileCheck %s -check-prefix=WRONG < %t/out +// WRONG-NOT: CommentXMLInvalid +// rdar://12378714 + +/** + * \brief Aaa +*/ +template struct A { +/** + * \brief Bbb +*/ + A(); +/** + * \brief Ccc +*/ + ~A(); +/** + * \brief Ddd +*/ + void f() { } +}; +// CHECK: template <typename T> struct A {\n} +// CHECL: A<T>() +// CHECK: void ~A<T>() + +/** + * \Brief Eee +*/ +template struct D : A { +/** + * \brief +*/ + using A::f; + + void f(); +}; +// CHECK: template <typename T> struct D : A<T> {\n} +// CHECK: using A<T>::f