From 583e75cce441388bc562fa225d23499261a0091e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 20 Apr 2017 21:20:51 +0000 Subject: Vendor import of clang trunk r300890: https://llvm.org/svn/llvm-project/cfe/trunk@300890 --- lib/Sema/JumpDiagnostics.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/Sema/JumpDiagnostics.cpp') diff --git a/lib/Sema/JumpDiagnostics.cpp b/lib/Sema/JumpDiagnostics.cpp index 899d3fa83cc3c..865aea9e2284c 100644 --- a/lib/Sema/JumpDiagnostics.cpp +++ b/lib/Sema/JumpDiagnostics.cpp @@ -287,6 +287,15 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, IndirectJumpTargets.push_back(cast(S)->getLabel()); break; + case Stmt::ObjCForCollectionStmtClass: { + auto *CS = cast(S); + unsigned Diag = diag::note_protected_by_objc_fast_enumeration; + unsigned NewParentScope = Scopes.size(); + Scopes.push_back(GotoScope(ParentScope, Diag, 0, S->getLocStart())); + BuildScopeInformation(CS->getBody(), NewParentScope); + return; + } + case Stmt::IndirectGotoStmtClass: // "goto *&&lbl;" is a special case which we treat as equivalent // to a normal goto. In addition, we don't calculate scope in the -- cgit v1.2.3