The type-to-delete may not be a pointer if it's a dependent type.
Here's example code:
---
template<class T> class MyClass {
  struct S { };
  S* NewS() { return new S; }
  void DeleteS() { delete NewS(); }
};
---
CXXDeleteExpr::getDestroyedType() on the 'delete NewS()' expression
would crash before this change.  Now it returns a dependent type
object.  Solution suggested by dgregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116891 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed