diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-02-11 02:21:06 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-02-11 02:21:06 +0000 |
commit | 8b808d64af8375d77a08d42520c97c7df8e9c3d0 (patch) | |
tree | 304cf110d03b32dd50857fbb60870522bd8a80c9 /clang/test/Analysis/inline.cpp | |
parent | 5a69dda9b0b080e0e82250e2ba0500c1423a9c5d (diff) | |
download | bcm5719-llvm-8b808d64af8375d77a08d42520c97c7df8e9c3d0.tar.gz bcm5719-llvm-8b808d64af8375d77a08d42520c97c7df8e9c3d0.zip |
[analyzer] Inline C++ operator new when c++-inline-allocators is turned on.
This will let us stage in the modeling of operator new. The -analyzer-config
opton 'c++-inline-allocators' is currently off by default.
Patch by Karthik Bhat!
llvm-svn: 201122
Diffstat (limited to 'clang/test/Analysis/inline.cpp')
-rw-r--r-- | clang/test/Analysis/inline.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Analysis/inline.cpp b/clang/test/Analysis/inline.cpp index ca126ddf7f3..183df16e124 100644 --- a/clang/test/Analysis/inline.cpp +++ b/clang/test/Analysis/inline.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config ipa=inlining -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config ipa=inlining -analyzer-config c++-allocator-inlining=true -verify %s void clang_analyzer_eval(bool); void clang_analyzer_checkInlined(bool); @@ -9,6 +9,7 @@ extern "C" void *malloc(size_t); // This is the standard placement new. inline void* operator new(size_t, void* __p) throw() { + clang_analyzer_checkInlined(true);// expected-warning{{TRUE}} return __p; } |