llvm-project/clang/lib/ASTMatchers
Nathan James dc361d5c2a
[llvm] Add asserts in (ThreadSafe)?RefCountedBase destructors
Added a trivial destructor in release mode and in debug mode a destructor that asserts RefCount is indeed zero.
This ensure people aren't manually (maybe accidentally) destroying these objects like in this contrived example.
```lang=c++
{
  std::unique_ptr<SomethingRefCounted> Object;
  holdIntrusiveOwnership(Object.get());
  // Object Destructor called here will assert.
}
```

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D92480
2020-12-07 20:20:08 +00:00
..
Dynamic Add new matchers for dependent names in templates 2020-11-06 21:03:20 +00:00
ASTMatchFinder.cpp Remove automatic traversal from forEach matcher 2020-11-23 14:27:47 +00:00
ASTMatchersInternal.cpp [llvm] Add asserts in (ThreadSafe)?RefCountedBase destructors 2020-12-07 20:20:08 +00:00
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
GtestMatchers.cpp [ASTMatchers] Made isExpandedFromMacro Polymorphic 2020-11-03 14:36:51 +00:00