]> granicus.if.org Git - clang/commit
Sema: Check that __leave is contained in a __try block.
authorNico Weber <nicolasweber@gmx.de>
Sun, 6 Jul 2014 22:53:19 +0000 (22:53 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 6 Jul 2014 22:53:19 +0000 (22:53 +0000)
commitf16104c81cd0dff21d9c4e48dd7f827683317bff
tree8e848041bee84993afefeca34231ba0ba7552543
parent695370c70118fc7d19e5d6b1f709095c4f4768a7
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
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Scope.h
lib/Parse/ParseStmt.cpp
lib/Sema/Scope.cpp
lib/Sema/SemaStmt.cpp
test/Sema/__try.c
test/SemaCXX/__try.cpp