]> granicus.if.org Git - clang/commit
SEH: Track users of __try so we can pick a per-func EH personality
authorReid Kleckner <reid@kleckner.net>
Tue, 3 Feb 2015 22:52:35 +0000 (22:52 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 3 Feb 2015 22:52:35 +0000 (22:52 +0000)
commit41c5887917db2aba647714cfad1e675d6d93cd1e
tree0f9f73a1a7354c6b77b19d397c37c6d75d0443b5
parent1f6936185b95a45fedeff6267457b68aeeea1578
SEH: Track users of __try so we can pick a per-func EH personality

There are four major kinds of declarations that cause code generation:
- FunctionDecl (includes CXXMethodDecl etc)
- ObjCMethodDecl
- BlockDecl
- CapturedDecl

This patch tracks __try usage on FunctionDecls and diagnoses __try usage
in other decls. If someone wants to use __try from ObjC, they can use it
from a free function, since the ObjC code will need an ObjC-style EH
personality.

Eventually we will want to look through CapturedDecls and track SEH
usage on the parent FunctionDecl, if present.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228058 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/CodeGen/CGException.cpp
lib/Sema/SemaStmt.cpp
test/CodeGenCXX/exceptions-seh.cpp [new file with mode: 0644]
test/SemaCXX/exceptions-seh.cpp