spyffe added a comment.

Looks good, but I have a concern about the underlying branch's apparently 
inconsistent initialization of `DeclarationNameInfo`.  Aleksei, could you 
clarify how that code works?  Should we have a helper function so we don't have 
to carefully repeat this pattern everywhere?



================
Comment at: lib/AST/ASTImporter.cpp:4305
+  DeclarationNameInfo NameInfo(Name, 
Importer.Import(D->getNameInfo().getLoc()));
+  ImportDeclarationNameLoc(D->getNameInfo(), NameInfo);
+
----------------
I've seen this pattern before, in [[ https://reviews.llvm.org/D27033 | D20733 
]], at ASTImporter.cpp:6488:
```
  DeclarationNameInfo NameInfo(E->getName(), E->getNameLoc());
  ImportDeclarationNameLoc(E->getNameInfo(), NameInfo);
```
That code didn't do the `Import` during the initialization of the 
`DeclarationNameInfo`.  Is either of these incorrect?


https://reviews.llvm.org/D27181



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

Reply via email to