[PATCH] D48941: [ASTImporter] import FunctionDecl end locations

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 4 14:14:52 PDT 2018

a_sidorin added a comment.

Hello Rafael.
This change is good, just some cleanup is needed.

Comment at: lib/AST/ASTImporter.cpp:2559
+    ToFunction->setRangeEnd(Importer.Import(D->getLocEnd()));
   } else if (auto *FromConversion = dyn_cast<CXXConversionDecl>(D)) {
martong wrote:
> Why don't we need to call the `setRangeEnd()` when e.g. we create a `CXXMethodDecl` or a `CXXConversionDecl`? Couldn't we just call this after all these branches (at line 2587)?
I guess the reason is that they take LocEnd as ctor arguments. However, I think that having a single point is better.

  rC Clang


More information about the cfe-commits mailing list