Fix a bug that crashed clang when parsing this:

class C {
  static const int number = 50;
  static int arr[number];
};

Here's how it worked:
-GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator.
-VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr.
-On exit they both tried to destroy that one DeclRefExpr.

The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57313 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp
index 1fbff69..71ad7de 100644
--- a/test/SemaCXX/class.cpp
+++ b/test/SemaCXX/class.cpp
@@ -55,6 +55,9 @@
 private:
   int x,y;
   static int sx;
+
+  static const int number = 50;
+  static int arr[number];
 };
 
 class C2 {