From 5929ef2ee7c94dba046007065a198003bfcadd40 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 28 Feb 2012 23:39:14 +0000 Subject: 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. llvm-svn: 151667 --- clang/lib/Sema/Scope.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'clang/lib/Sema/Scope.cpp') diff --git a/clang/lib/Sema/Scope.cpp b/clang/lib/Sema/Scope.cpp index 10f12ce844f..c76f61af6c7 100644 --- a/clang/lib/Sema/Scope.cpp +++ b/clang/lib/Sema/Scope.cpp @@ -59,13 +59,3 @@ void Scope::Init(Scope *parent, unsigned flags) { Entity = 0; ErrorTrap.reset(); } - -bool Scope::containedInPrototypeScope() const { - const Scope *S = this; - while (S) { - if (S->isFunctionPrototypeScope()) - return true; - S = S->getParent(); - } - return false; -} -- cgit v1.2.3