summaryrefslogtreecommitdiffstats
path: root/lib/AST/DumpXML.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2012-02-29 10:24:19 +0000
committerJames Molloy <james.molloy@arm.com>2012-02-29 10:24:19 +0000
commit16f1f717af196b1448258857b2e6dcfe144b39d0 (patch)
tree931424cf36ea32c824895fc76e378e277cd0ceed /lib/AST/DumpXML.cpp
parent4fafeb6452a79794726a1adc53fb5e2a5887c5f9 (diff)
Reapply r151638 and r151641.
The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation. These are now fixed, with regression tests added to catch them both (not Darwin-specific). Original log: ==================== Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. ==================== git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DumpXML.cpp')
-rw-r--r--lib/AST/DumpXML.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp
index b4038ddaf9..b180e808ab 100644
--- a/lib/AST/DumpXML.cpp
+++ b/lib/AST/DumpXML.cpp
@@ -497,6 +497,10 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>,
for (FunctionDecl::param_iterator
I = D->param_begin(), E = D->param_end(); I != E; ++I)
dispatch(*I);
+ for (llvm::ArrayRef<NamedDecl*>::iterator
+ I = D->getDeclsInPrototypeScope().begin(), E = D->getDeclsInPrototypeScope().end();
+ I != E; ++I)
+ dispatch(*I);
if (D->doesThisDeclarationHaveABody())
dispatch(D->getBody());
}