aprantl added inline comments.
================
Comment at: clang/lib/AST/ASTImporter.cpp:5039
+ if (!ToOrErr)
+ // FIXME: return the error?
+ consumeError(ToOrErr.takeError());
----------------
We don't typically commit FIXME's into LLVM code. Why not just deal with the
error properly from the start?
================
Comment at: lldb/source/Symbol/ClangASTImporter.cpp:65
- if (delegate_sp)
- return delegate_sp->Import(type);
+ if (delegate_sp) {
+ if (llvm::Expected<QualType> ret_or_error = delegate_sp->Import(type)) {
----------------
```
if (!delegate_sp)
return {};
```
================
Comment at: lldb/source/Symbol/ClangASTImporter.cpp:68
+ return *ret_or_error;
+ } else {
+ Log *log =
----------------
The `else` is redundant.
================
Comment at: lldb/source/Symbol/ClangASTImporter.cpp:139
+
+ llvm::consumeError(result.takeError());
+
----------------
Can you convert this to an early return instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61438/new/
https://reviews.llvm.org/D61438
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits