diff options
| author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-15 02:51:58 +0000 |
|---|---|---|
| committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-15 02:51:58 +0000 |
| commit | 168e29f6af138ccd1d8919164cae71a15ae735d1 (patch) | |
| tree | c2c4dfe73ca6ad9984fd1189144cca1b97204768 /clang/test/Analysis | |
| parent | 443434e45ce3065024e4895f8dbad5fcae247971 (diff) | |
| download | bcm5719-llvm-168e29f6af138ccd1d8919164cae71a15ae735d1.tar.gz bcm5719-llvm-168e29f6af138ccd1d8919164cae71a15ae735d1.zip | |
[analyzer] Decide on inlining destructors via EvalCallOptions.
EvalCallOptions were introduced in r324018 for allowing various parts of
ExprEngine to notify the inlining mechanism, while preparing for evaluating a
function call, of possible difficulties with evaluating the call that they
foresee. Then mayInlineCall() would still be a single place for making the
decision.
Use that mechanism for destructors as well - pass the necessary flags from the
CFG-element-specific destructor handlers.
Part of this patch accidentally leaked into r324018, which led into a change in
tests; this change is reverted now, because even though the change looked
correct, the underlying behavior wasn't. Both of these commits were not intended
to introduce any function changes otherwise.
Differential Revision: https://reviews.llvm.org/D42991
llvm-svn: 325209
Diffstat (limited to 'clang/test/Analysis')
| -rw-r--r-- | clang/test/Analysis/new.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Analysis/new.cpp b/clang/test/Analysis/new.cpp index 71b9d168eeb..0cd2d085f72 100644 --- a/clang/test/Analysis/new.cpp +++ b/clang/test/Analysis/new.cpp @@ -311,7 +311,8 @@ void testArrayNull() { void testArrayDestr() { NoReturnDtor *p = new NoReturnDtor[2]; delete[] p; // Calls the base destructor which aborts, checked below - clang_analyzer_eval(true); // no-warning + //TODO: clang_analyzer_eval should not be called + clang_analyzer_eval(true); // expected-warning{{TRUE}} } // Invalidate Region even in case of default destructor |

