From: Eli Friedman Date: Thu, 18 Oct 2012 20:58:58 +0000 (+0000) Subject: Remove check which incorrectly suppressed printing an identifier in type printing... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eafa9d4d0d8b97f006dbd19c1e51d14663c8c5c3;p=clang Remove check which incorrectly suppressed printing an identifier in type printing. Patch by Benoit Perrot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166227 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 2c00246301..4cf4b1847f 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -141,9 +141,6 @@ void TypePrinter::print(const Type *T, Qualifiers Quals, raw_ostream &OS, OS << "NULL TYPE"; return; } - - if (Policy.SuppressSpecifiers && T->isSpecifierType()) - return; SaveAndRestore PHVal(HasEmptyPlaceHolder, PlaceHolder.empty()); diff --git a/test/SemaCXX/ast-print.cpp b/test/SemaCXX/ast-print.cpp index 46b99e0d61..15fdabfe32 100644 --- a/test/SemaCXX/ast-print.cpp +++ b/test/SemaCXX/ast-print.cpp @@ -41,3 +41,8 @@ struct X { void *operator new (typeof(sizeof(1)), int = 2); }; void f2() { new X; } + +// CHECK: for (int i = 2097, j = 42; false;) +void forInit() { + for (int i = 2097, j = 42; false;) {} +}