]> granicus.if.org Git - clang/commitdiff
Add a hack to prevent us from printing out the __builtin_va_list
authorEli Friedman <eli.friedman@gmail.com>
Sat, 30 May 2009 06:35:22 +0000 (06:35 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 30 May 2009 06:35:22 +0000 (06:35 +0000)
declaration in -ast-print mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72615 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclPrinter.cpp

index bfd3dca3e6d3260d03c740bd38dd0802d705a822..01cbee4d637059a967ae7ccf1113185032d23efe 100644 (file)
@@ -178,6 +178,11 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
     if (!Policy.Dump) {
       // 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<NamedDecl>(*D) && cast<NamedDecl>(*D)->getNameAsString() ==
+          "__builtin_va_list")
+        continue;
     }
 
     // The next bits of code handles stuff like "struct {int x;} a,b"; we're