aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-01 20:59:53 +0000
committerChris Lattner <sabre@nondot.org>2010-03-01 20:59:53 +0000
commit6d97e5e4b7abdae710c2548b51f4ed0298e86d80 (patch)
tree1bfd4ca64b65979839394efe939d3310598c81e9 /lib/Sema/SemaDeclObjC.cpp
parent632c9d26925f9aa8179607956c83ee348930b6d7 (diff)
Implement jump checking for initialized c++ variables, implementing
a fixme and PR6451. Only perform jump checking if the containing function has no errors, and add the infrastructure needed to do this. On the testcase in the PR, we produce: t.cc:6:3: error: illegal goto into protected scope goto later; ^ t.cc:7:5: note: jump bypasses variable initialization X x; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 939ccab35d..0ec793360b 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -50,6 +50,7 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, DeclPtrTy D) {
return;
CurFunctionNeedsScopeChecking = false;
+ NumErrorsAtStartOfFunction = getDiagnostics().getNumErrors();
// Allow the rest of sema to find private method decl implementations.
if (MDecl->isInstanceMethod())