summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-15 10:36:26 +0000
committerAlp Toker <alp@nuanti.com>2013-12-15 10:36:26 +0000
commit56b5cc91afcbc1eeb9c84cae83d2d50beba391f0 (patch)
tree9bd1d6b9fa26a2e7a07ccb3811db0a5404223850 /clang/lib/AST/DeclPrinter.cpp
parente31b486cddf7fa069f56882319400c5003425095 (diff)
downloadbcm5719-llvm-56b5cc91afcbc1eeb9c84cae83d2d50beba391f0.tar.gz
bcm5719-llvm-56b5cc91afcbc1eeb9c84cae83d2d50beba391f0.zip
ASTContext: Declare builtin types implicitly
__builtin_va_list and friends have been showing up where they shouldn't for way to long, making unwanted appearences in -ast-print, tooling and source level visitors and even the hello world tutorial on the clang website. This commit factors down the implicit typedef and record creation facilities to ensure they're marked implicit. Also fixes a unit test that was testing incorrect behaviour, and removes old hacks in the DeclPrinter that tried to skip implicit declarations manually. llvm-svn: 197336
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index f024f4593ba..26e2cdacad4 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -238,17 +238,6 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
if (D->isImplicit())
continue;
- // FIXME: Ugly hack so we don't pretty-print the builtin declaration
- // of __builtin_va_list or __[u]int128_t. There should be some other way
- // to check that.
- if (NamedDecl *ND = dyn_cast<NamedDecl>(*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
// forced to merge the declarations because there's no other way to
// refer to the struct in question. This limited merging is safe without
OpenPOWER on IntegriCloud