From 7873de0cf65f48e6c8169691ee7eb203b89bfac5 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 11 Aug 2016 22:25:46 +0000 Subject: P0217R3: Perform semantic checks and initialization for the bindings in a decomposition declaration for arrays, aggregate-like structs, tuple-like types, and (as an extension) for complex and vector types. llvm-svn: 278435 --- clang/lib/AST/Decl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/Decl.cpp') diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 813a20a9f52..4486cb89404 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1395,6 +1395,10 @@ static LinkageInfo getLVForDecl(const NamedDecl *D, return clang::LinkageComputer::getLVForDecl(D, computation); } +void NamedDecl::printName(raw_ostream &os) const { + os << Name; +} + std::string NamedDecl::getQualifiedNameAsString() const { std::string QualName; llvm::raw_string_ostream OS(QualName); @@ -1481,7 +1485,7 @@ void NamedDecl::printQualifiedName(raw_ostream &OS, OS << "::"; } - if (getDeclName()) + if (getDeclName() || isa(this)) OS << *this; else OS << "(anonymous)"; -- cgit v1.2.3