[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 15 09:01:18 PDT 2017


a.sidorin added a comment.

Hello Peter,
`if (!ToDecl) return nullptr;` is used if original node is always non-null.
`if(!ToDecl && FromDecl) return nullptr;` is used if original node can be null. If the imported node is null, the result of import is null as well so such import is OK.
`ObjectXY::Create(...Import(FromDecl))` is often used for source locations - as I guess, invalid source location is OK usually. It can also be used if we know that node should already be imported, but usually indicates a potential error.


https://reviews.llvm.org/D32751





More information about the cfe-commits mailing list