================
@@ -1373,6 +1373,40 @@ TEST_P(ASTImporterOptionSpecificTestBase, 
ImportCorrectTemplatedDecl) {
   ASSERT_EQ(ToTemplated1, ToTemplated);
 }
 
+TEST_P(ASTImporterOptionSpecificTestBase,
+       ImportTemplateSpecializationStaticMember) {
+  auto FromCode = R"(
+      template <typename H> class Test{
+      public:
+             static const unsigned int length;
+      };
+
+      template<> const unsigned int Test<int>::length;
+      template<> const unsigned int Test<int>::length = 0;
+      )";
+  auto ToCode = R"(
+    template <typename H> class Test
+    {
+    public:
+           static const unsigned int length;
+    };
+    template<> const unsigned int Test<int>::length;
+
+    void foo(){
+    int i = 1 / Test<int>::length;
+    }
+    )";
----------------
mzyKi wrote:

Thanks,I have fixed it.

https://github.com/llvm/llvm-project/pull/68774
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to