summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-01 00:26:45 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-01 00:26:45 +0000
commita95172baa0475d0045ddf493679f7611eb4efeb2 (patch)
treeaeb8e904db3978722bd97e11e48d98ac9a15ff06 /clang/lib/Sema/Sema.cpp
parent82bef970cf218c3e99b1bb3d5be6b8bb6e1434b7 (diff)
downloadbcm5719-llvm-a95172baa0475d0045ddf493679f7611eb4efeb2.tar.gz
bcm5719-llvm-a95172baa0475d0045ddf493679f7611eb4efeb2.zip
Only run the jump-checker if there's a branch-protected scope *and* there's
a switch or goto somewhere in the function. Indirect gotos trigger the jump-checker regardless, because the conditions there are slightly more elaborate and it's too marginal a case to be worth optimizing. Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918 llvm-svn: 109962
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 815eba051f7..a9a4f5290cf 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -31,7 +31,10 @@ using namespace clang;
FunctionScopeInfo::~FunctionScopeInfo() { }
void FunctionScopeInfo::Clear(unsigned NumErrors) {
- NeedsScopeChecking = false;
+ HasBranchProtectedScope = false;
+ HasBranchIntoScope = false;
+ HasIndirectGoto = false;
+
LabelMap.clear();
SwitchStack.clear();
Returns.clear();
OpenPOWER on IntegriCloud