From: Argyrios Kyrtzidis Date: Thu, 17 Jun 2010 10:52:11 +0000 (+0000) Subject: Don't ast-print the builtin __[u]int128_t. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2574f6f35a54c1c1b5bcef1e69417fe58f566c11;p=clang Don't ast-print the builtin __[u]int128_t. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106212 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 2fb6cb1d31..c72401c96d 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -202,10 +202,15 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { // Skip over implicit declarations in pretty-printing mode. if (D->isImplicit()) continue; // FIXME: Ugly hack so we don't pretty-print the builtin declaration - // of __builtin_va_list. There should be some other way to check that. - if (isa(*D) && cast(*D)->getNameAsString() == - "__builtin_va_list") - continue; + // of __builtin_va_list or __[u]int128_t. There should be some other way + // to check that. + if (NamedDecl *ND = dyn_cast(*D)) { + if (IdentifierInfo *II = ND->getIdentifier()) { + if (II->isStr("__builtin_va_list") || + II->isStr("__int128_t") || II->isStr("__uint128_t")) + continue; + } + } } // The next bits of code handles stuff like "struct {int x;} a,b"; we're