r356623 - Revert "[clangd] Print arguments in template specializations"
Jordan Rupprecht via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 20 15:51:56 PDT 2019
Author: rupprecht
Date: Wed Mar 20 15:51:56 2019
New Revision: 356623
URL: http://llvm.org/viewvc/llvm-project?rev=356623&view=rev
Log:
Revert "[clangd] Print arguments in template specializations"
This reverts commit 44a63f6a150dec72dea43730d2a89d292e58bd6f. It segfaults on an internal test case (will follow up off thread).
Modified:
cfe/trunk/lib/AST/TypePrinter.cpp
Modified: cfe/trunk/lib/AST/TypePrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TypePrinter.cpp?rev=356623&r1=356622&r2=356623&view=diff
==============================================================================
--- cfe/trunk/lib/AST/TypePrinter.cpp (original)
+++ cfe/trunk/lib/AST/TypePrinter.cpp Wed Mar 20 15:51:56 2019
@@ -1632,21 +1632,6 @@ static const TemplateArgument &getArgume
return A.getArgument();
}
-static void printArgument(const TemplateArgument &A, const PrintingPolicy &PP,
- llvm::raw_ostream &OS) {
- A.print(PP, OS);
-}
-
-static void printArgument(const TemplateArgumentLoc &A,
- const PrintingPolicy &PP, llvm::raw_ostream &OS) {
- const auto &Kind = A.getArgument().getKind();
- assert(Kind != TemplateArgument::Null &&
- "TemplateArgumentKind can not be null!");
- if (Kind == TemplateArgument::ArgKind::Type)
- return A.getTypeSourceInfo()->getType().print(OS, PP);
- return A.getArgument().print(PP, OS);
-}
-
template<typename TA>
static void printTo(raw_ostream &OS, ArrayRef<TA> Args,
const PrintingPolicy &Policy, bool SkipBrackets) {
@@ -1668,7 +1653,7 @@ static void printTo(raw_ostream &OS, Arr
} else {
if (!FirstArg)
OS << Comma;
- printArgument(Arg, Policy, ArgOS);
+ Argument.print(Policy, ArgOS);
}
StringRef ArgString = ArgOS.str();
More information about the cfe-commits
mailing list