balazske added inline comments.

================
Comment at: lib/AST/ASTImporter.cpp:2715
+    if (auto *ToFT = dyn_cast<FunctionTemplateDecl>(Importer.Import(FromFT)))
+      ToFunction->setDescribedFunctionTemplate(ToFT);
+    else
----------------
a_sidorin wrote:
> The function template should be already set after 
> `getDescribedFunctionTemplate()` is imported in 
> `VisitFunctionTemplateDecl()`. Are there still cases not covered by this?
Yes this call can be omitted. But check of return value of Import is needed 
(the current code is not good: nullptr is not accepted by dyn_cast).


Repository:
  rC Clang

https://reviews.llvm.org/D49235



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

Reply via email to