llvm-project/clang/lib
Nico Weber b14f872269 Implement jump scope SEHmantic analysis.
Thou shall not jump into SEH blocks. Jumping out of SEH __try and __excepts
is A-ok. Jumping out of __finally blocks is B-ok (msvc doesn't error about it,
but warns that it has undefined behavior).

I've checked that clang's behavior with this patch matches msvc's behavior.
We don't have the warning on jumping out of a __finally yet, see the FIXME
in the test. clang also currently crashes on codegen for a jump out of a
__finally block, see PR22414 comment 7.

I also added a few tests for the interaction of indirect jumps and SEH blocks.
MSVC doesn't support indirect jumps, so there's no way to know if clang behave
the same way as msvc here.  clang's behavior with this patch does make sense
to me, but maybe it could be argued that it should be more permissive (see
FIXME in the indirect jump tests -- shout if you have an opinion on this).

llvm-svn: 227982
2015-02-03 17:06:08 +00:00
..
ARCMigrate Fix layering violation: include/clang/Basic/PlistSupport.h should not include 2015-01-28 20:14:54 +00:00
AST AST: Hoist RT->getDecl() into a variable 2015-02-03 08:49:29 +00:00
ASTMatchers Add voidType() matcher. 2014-12-15 15:09:22 +00:00
Analysis [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.py 2015-01-14 11:29:14 +00:00
Basic Add cc1 option '-fmodule-feature' to add custom values for 'requires' decls 2015-02-02 21:56:15 +00:00
CodeGen MS ABI: Records with fields with required aligmnet shouldn't be common 2015-02-03 08:49:32 +00:00
Driver Use CLANG_LIBDIR_SUFFIX when looking for the gold plugin. 2015-02-03 16:33:53 +00:00
Edit Edit: Do not extend a removal to include trailing whitespace if we're at the end 2014-09-15 11:47:10 +00:00
Format clang-format: Fix incorrect handling of leading whitespace. 2015-01-31 07:05:46 +00:00
Frontend Add cc1 option '-fmodule-feature' to add custom values for 'requires' decls 2015-02-02 21:56:15 +00:00
FrontendTool Provide a BuryPointer for unique_ptrs. 2014-08-29 16:53:14 +00:00
Headers [X86] Add other flavors of AVX512 cmpps/cmppd intrinsics. 2015-02-01 22:27:40 +00:00
Index [libclang] Use same USR encoding for 'char' regardless of what the target considers the sign to be. 2014-12-08 09:09:05 +00:00
Lex Allow objc_bridge(id) to be used on typedefs of [cv] void*. 2015-02-01 22:34:06 +00:00
Parse Wrap to 80 columns. No behavior change. 2015-02-02 05:38:59 +00:00
Rewrite Trim some includes. NFC. 2014-10-29 22:13:46 +00:00
Sema Implement jump scope SEHmantic analysis. 2015-02-03 17:06:08 +00:00
Serialization [modules] Be sure to load the lexical definition of a class template 2015-02-03 03:32:14 +00:00
StaticAnalyzer Fix layering violation: include/clang/Basic/PlistSupport.h should not include 2015-01-28 20:14:54 +00:00
Tooling Adopt new cl::HideUnrelatedOptions API added r226729. 2015-01-21 23:26:11 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00