balazske added inline comments.

================
Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:670
     return llvm::Error::success();
+  else if (index_error_code::no_error != InvocationListParsingError)
+    return llvm::make_error<IndexError>(InvocationListParsingError);
----------------
martong wrote:
> The `if` here is superfluous because the condition must be `true` always, 
> otherwise we would have an `InvocationList`, wouldn't we?
> 
> Or we can have this condition, but then the `if (InvocatioList)` is not 
> needed.
This looks correct: We have an InvocationList if it is usable as result 
(initialized and no error). Otherwise there is an error or it is the first time 
the function is called. The second `if` checks for this condition.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101763

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

Reply via email to