diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-11 22:25:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-11 22:25:46 +0000 |
commit | 7873de0cf65f48e6c8169691ee7eb203b89bfac5 (patch) | |
tree | 361febace1eab46aacfef2f710bf7720448f7f3a /clang/lib/AST/Decl.cpp | |
parent | fa7ae4f3b6316e60de4e3d9f4dd1f355889f970c (diff) | |
download | bcm5719-llvm-7873de0cf65f48e6c8169691ee7eb203b89bfac5.tar.gz bcm5719-llvm-7873de0cf65f48e6c8169691ee7eb203b89bfac5.zip |
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
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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<DecompositionDecl>(this)) OS << *this; else OS << "(anonymous)"; |