[OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && "queried property of class with no definition", file AST/DeclCXX.h
Added processing for template specialization during data-sharing attributes analysis

llvm-svn: 255879
diff --git a/clang/test/OpenMP/parallel_ast_print.cpp b/clang/test/OpenMP/parallel_ast_print.cpp
index 0f789db..1e46fba 100644
--- a/clang/test/OpenMP/parallel_ast_print.cpp
+++ b/clang/test/OpenMP/parallel_ast_print.cpp
@@ -102,4 +102,22 @@
   return tmain<int, 5>(b, &b) + tmain<long, 1>(x, &x);
 }
 
+template <class T>
+struct Foo {
+  int foo;
+};
+
+void foo(const Foo<int> &arg) {
+// CHECK: #pragma omp parallel
+#pragma omp parallel
+  {
+// CHECK: #pragma omp for schedule(static)
+#pragma omp for schedule(static)
+    for (int idx = 0; idx < 1234; ++idx) {
+      //arg.foo = idx;
+      idx = arg.foo;
+    }
+  }
+}
+
 #endif