[PATCH] Instantiate incomplete class used in template method.

Richard Smith richard at metafoo.co.uk
Mon Apr 6 13:23:35 PDT 2015


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:4406-4407
@@ +4405,4 @@
+      const TagDecl *DeclToInstantiate = nullptr;
+      if (TagDecl *Def = TD->getDefinition())
+        DeclToInstantiate = Def;
+      else if (!TD->isThisDeclarationADefinition() && !TD->isFreeStanding())
----------------
What's the purpose of this change? If we have a reference to a particular `TagDecl`, why don't we always instantiate that declaration?

http://reviews.llvm.org/D8281

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list