diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-25 17:39:16 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-25 17:39:16 +0000 |
commit | 8e38871865530e38c1a9740443a73ac07957e7dc (patch) | |
tree | 0d2337c453557f07a7478b0697692e88d4abadaf /clang/lib/AST/DeclPrinter.cpp | |
parent | 50e3b7f759d2087e426a6f67927c025ed0de7c36 (diff) | |
download | bcm5719-llvm-8e38871865530e38c1a9740443a73ac07957e7dc.tar.gz bcm5719-llvm-8e38871865530e38c1a9740443a73ac07957e7dc.zip |
Revert "Pretty Printer: Fix printing of conversion operator decls and calls."
This reverts commit r202167.
It broke Analysis/auto-obj-dtors-cfg-output.cpp
llvm-svn: 202173
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 05701a5b061..aa753887a21 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -385,7 +385,6 @@ void DeclPrinter::VisitEnumConstantDecl(EnumConstantDecl *D) { void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { CXXConstructorDecl *CDecl = dyn_cast<CXXConstructorDecl>(D); - CXXConversionDecl *ConversionDecl = dyn_cast<CXXConversionDecl>(D); if (!Policy.SuppressSpecifiers) { switch (D->getStorageClass()) { case SC_None: break; @@ -399,8 +398,7 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { if (D->isInlineSpecified()) Out << "inline "; if (D->isVirtualAsWritten()) Out << "virtual "; if (D->isModulePrivate()) Out << "__module_private__ "; - if ((CDecl && CDecl->isExplicitSpecified()) || - (ConversionDecl && ConversionDecl->isExplicit())) + if (CDecl && CDecl->isExplicitSpecified()) Out << "explicit "; } @@ -538,15 +536,15 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { } Out << ")"; } - } else if (!ConversionDecl) { + if (!Proto.empty()) + Out << Proto; + } else { if (FT && FT->hasTrailingReturn()) { Out << "auto " << Proto << " -> "; Proto.clear(); } AFT->getReturnType().print(Out, Policy, Proto); - Proto.clear(); } - Out << Proto; } else { Ty.print(Out, Policy, Proto); } |