Skip to content
Commit 20f7ab72 authored by Craig Silverstein's avatar Craig Silverstein
Browse files

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.

llvm-svn: 116891
parent a94cc6df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment