summaryrefslogtreecommitdiffstats
path: root/clang/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
commit30d0cfda354ec7f271ff3fa006db02d10a9e9610 (patch)
treeaf0b01ca1669547c4585763ce944fc02e09b6464 /clang/lib/Sema/SemaDeclObjC.cpp
parent115da88f01a9014bc6f56bbf8d13536c318e969e (diff)
downloadbcm5719-llvm-30d0cfda354ec7f271ff3fa006db02d10a9e9610.tar.gz
bcm5719-llvm-30d0cfda354ec7f271ff3fa006db02d10a9e9610.zip
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; ^ llvm-svn: 97497
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 939ccab35db..0ec793360b0 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/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())
OpenPOWER on IntegriCloud