================
Comment at: lib/AST/Expr.cpp:317
@@ -316,1 +316,3 @@
       InstantiationDependent = true;
+      TypeSourceInfo *TInfo = Var->getTypeSourceInfo();
+      if (TInfo->getType()->isIncompleteArrayType())
----------------
You should get the `TypeSourceInfo` from `Var->getFirstDecl()` here, in case we 
manage to build a `DeclRefExpr` referring to the definition of the static data 
member. Testcase:

  template<typename T> struct S {
    static int arr[];
    void f();
  };
  template<typename T> int S<T>::arr[1];
  template<typename T> void S<T>::f() {
    static_assert(sizeof(arr) != sizeof(int), "");
  }
  template<> int S<int>::arr[2];
  template void S<int>::f();


http://llvm-reviews.chandlerc.com/D2049
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to