summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-04-05 17:55:07 +0000
committerJordan Rose <jordan_rose@apple.com>2013-04-05 17:55:07 +0000
commit10ad081fc67c027d54fcd3133697eb0f2d0dfe00 (patch)
treefea20a5c6b0254f9eec832e0ae80c26fdf747094 /clang/lib/Driver/Tools.cpp
parent26330563f27a93b9c0a0639a3e4f4cf538aa54fe (diff)
downloadbcm5719-llvm-10ad081fc67c027d54fcd3133697eb0f2d0dfe00.tar.gz
bcm5719-llvm-10ad081fc67c027d54fcd3133697eb0f2d0dfe00.zip
[analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).
As mentioned in the previous commit message, the use-after-free and double-free warnings for 'delete' are worth enabling even while the leak warnings still have false positives. llvm-svn: 178891
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 77a72ba33a5..a2c0d0fbbda 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1969,6 +1969,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-analyzer-checker=deadcode");
+ if (types::isCXX(Inputs[0].getType()))
+ CmdArgs.push_back("-analyzer-checker=cplusplus");
+
// Enable the following experimental checkers for testing.
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.UncheckedReturn");
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.getpw");
OpenPOWER on IntegriCloud