martong added inline comments.

================
Comment at: lib/AST/ASTImporter.cpp:3046
+        if (!D->doesThisDeclarationHaveABody())
+          return cast<Decl>(const_cast<FunctionDecl *>(FoundByLookup));
+        else {
----------------
balazske wrote:
> The `cast<Decl>` should not be needed here (and is not done at the other 
> return places). The `const_cast` can be omitted too (`FoundByLookup` is not 
> const now).
We must also register the decl into the map of imported decls as we do in all 
the other cases.
```
return Importer.MapImported(D, FoundByLookup);
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56936/new/

https://reviews.llvm.org/D56936



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

Reply via email to