Use CXXPseudoDestructorExpr as the stored representation for dependent
expressions that look like pseudo-destructors, e.g.,

  p->T::~T()

where p has dependent type.

At template instantiate time, we determine whether we actually have a
pseudo-destructor or a member access, and funnel down to the
appropriate routine in Sema.

Fixes PR6380.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97092 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index abc775e..1bc084c 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -95,6 +95,7 @@
   class ObjCMethodDecl;
   class ObjCPropertyDecl;
   class ObjCContainerDecl;
+  class PseudoDestructorTypeStorage;
   class FunctionProtoType;
   class CXXBasePath;
   class CXXBasePaths;
@@ -2188,20 +2189,9 @@
                                              TypeSourceInfo *ScopeType,
                                              SourceLocation CCLoc,
                                              SourceLocation TildeLoc,
-                                             TypeSourceInfo *DestroyedType,
+                                     PseudoDestructorTypeStorage DestroyedType,
                                              bool HasTrailingLParen);
-  
-  OwningExprResult ActOnDependentPseudoDestructorExpr(Scope *S, 
-                                                      ExprArg Base,
-                                                      SourceLocation OpLoc,
-                                                      tok::TokenKind OpKind,
-                                                      const CXXScopeSpec &SS,
-                                                  UnqualifiedId &FirstTypeName,
-                                                      SourceLocation CCLoc,
-                                                      SourceLocation TildeLoc,
-                                                  UnqualifiedId &SecondTypeName,
-                                                      bool HasTrailingLParen);
-  
+    
   virtual OwningExprResult ActOnPseudoDestructorExpr(Scope *S, ExprArg Base,
                                                      SourceLocation OpLoc,
                                                      tok::TokenKind OpKind,