diff options
Diffstat (limited to 'lib/AST/TypePrinter.cpp')
-rw-r--r-- | lib/AST/TypePrinter.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 7d30b7ff8b..664a658160 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -672,8 +672,14 @@ void TypePrinter::printTag(TagDecl *D, std::string &InnerString) { // Make an unambiguous representation for anonymous types, e.g. // <anonymous enum at /usr/include/string.h:120:9> llvm::raw_string_ostream OS(Buffer); - OS << "<anonymous"; - + + if (isa<CXXRecordDecl>(D) && cast<CXXRecordDecl>(D)->isLambda()) { + OS << "<lambda"; + HasKindDecoration = true; + } else { + OS << "<anonymous"; + } + if (Policy.AnonymousTagLocations) { // Suppress the redundant tag keyword if we just printed one. // We don't have to worry about ElaboratedTypes here because you can't |