diff options
Diffstat (limited to 'clang/test/Analysis/dtor.cpp')
| -rw-r--r-- | clang/test/Analysis/dtor.cpp | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/clang/test/Analysis/dtor.cpp b/clang/test/Analysis/dtor.cpp index 58bdcea6317..436da2ed9f3 100644 --- a/clang/test/Analysis/dtor.cpp +++ b/clang/test/Analysis/dtor.cpp @@ -417,3 +417,17 @@ namespace NoReturn {      *x = 47; // no warning    }  } + +namespace PseudoDtor { +  template <typename T> +  void destroy(T &obj) { +    clang_analyzer_checkInlined(true); // expected-warning{{TRUE}} +    obj.~T(); +  } + +  void test() { +    int i; +    destroy(i); +    clang_analyzer_eval(true); // expected-warning{{TRUE}} +  } +} | 

