rnk added a comment.

It occurs to me that this will cause some strange ordering in some cases. 
Consider:

  namespace pr40006 {
  // Delay emitting the method also past the instantiation of Tmpl<Inner>, i.e.
  // until the top-level class Outer is completely finished.
  template<typename> struct Tmpl {};
  struct Outer {
      struct Inner {
          __declspec(dllexport) Inner() = default;
          unsigned int x = 0;
      };
      // not instantiated
  };
  
  struct Other {
      Tmpl<Outer::Inner> y;
  };
  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc 
%"struct.InClassInits::pr40006::Outer::Inner"* 
@"??0Inner@Outer@pr40006@InClassInits@@QAE@XZ"
  }

When we'd process `y` before, we would immediately emit delayed dllexported 
things. Now we will wait until Other is done parsing, which is fine, but not as 
eager as we could be. That's fine, but it's a slight behavior change.



================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:2232
+  if (ParsingClassDepth == 0)
+    ActOnFinishCXXNonNestedClass(Instantiation);
 
----------------
This function doesn't use its argument. Can you remove it so that is clear that 
we don't need to track this somewhere else?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70905/new/

https://reviews.llvm.org/D70905



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to