[PATCH] D49235: [ASTImporter] Import described template (if any) of function.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 16 01:07:35 PDT 2018


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





More information about the cfe-commits mailing list