Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."
There were many additional tests that had the bad behavior baked in.
llvm-svn: 202174
diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp
index 570a807..34739f7 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -549,8 +549,7 @@
" operator int();"
"};",
methodDecl(ofClass(hasName("A"))).bind("id"),
- "int operator int()"));
- // WRONG; Should be: "operator int();"
+ "operator int()"));
}
TEST(DeclPrinter, TestCXXConversionDecl2) {
@@ -559,8 +558,7 @@
" operator bool();"
"};",
methodDecl(ofClass(hasName("A"))).bind("id"),
- "bool operator _Bool()"));
- // WRONG; Should be: "operator bool();"
+ "operator bool()"));
}
TEST(DeclPrinter, TestCXXConversionDecl3) {
@@ -570,8 +568,7 @@
" operator Z();"
"};",
methodDecl(ofClass(hasName("A"))).bind("id"),
- "Z operator Z()"));
- // WRONG; Should be: "operator Z();"
+ "operator Z()"));
}
TEST(DeclPrinter, TestCXXMethodDecl_AllocationFunction1) {