diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-07-06 22:53:19 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-07-06 22:53:19 +0000 |
commit | f16104c81cd0dff21d9c4e48dd7f827683317bff (patch) | |
tree | 8e848041bee84993afefeca34231ba0ba7552543 /lib/Sema/Scope.cpp | |
parent | 695370c70118fc7d19e5d6b1f709095c4f4768a7 (diff) |
Sema: Check that __leave is contained in a __try block.
Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema
walk the scope chain to find the SEHTry parent on __leave statements.
(They are rare enough that it seems better to do the walk instead of
giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Scope.cpp')
-rw-r--r-- | lib/Sema/Scope.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/Scope.cpp b/lib/Sema/Scope.cpp index c49133d472..6c79778823 100644 --- a/lib/Sema/Scope.cpp +++ b/lib/Sema/Scope.cpp @@ -182,6 +182,9 @@ void Scope::dumpImpl(raw_ostream &OS) const { } else if (Flags & FnTryCatchScope) { OS << "FnTryCatchScope"; Flags &= ~FnTryCatchScope; + } else if (Flags & SEHTryScope) { + OS << "SEHTryScope"; + Flags &= ~SEHTryScope; } else if (Flags & OpenMPDirectiveScope) { OS << "OpenMPDirectiveScope"; Flags &= ~OpenMPDirectiveScope; |