Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 22 Oct 2013 22:51:04 +0000 (22:51 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 22 Oct 2013 22:51:04 +0000 (22:51 +0000)
commit69170e6e41e72c84fe5303540c1aa7ca9944ff18
tree22cf7eafe04333f6d61b695e3ac929ee598af26b
parent255ca71082810ac8d3084f43727675e02a384683
Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted
check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end
check which inserts traps).

Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce
useful diagnostics and has false positives (PR17635), and is not a good
compromise position between UBSan's checks and ASan's checks.

Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical
behavior for that flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193205 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Sanitizers.def
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Driver/SanitizerArgs.cpp
test/CodeGen/bounds-checking.c
test/CodeGenCXX/catch-undef-behavior.cpp
test/Driver/bounds-checking.c
test/Driver/fsanitize.c