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



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

Reply via email to