balazske added inline comments.
================ Comment at: clang/include/clang/CrossTU/CrossTranslationUnit.h:257 llvm::Optional<InvocationListTy> InvocationList; + index_error_code InvocationListParsingError = index_error_code::no_error; }; ---------------- martong wrote: > I think it would be more consistent to make this an `llvm::Error`. I.e. we > would store the result of the whole `lazyInitInvocationList` in this member > variable. And as such, a better name could be `PreviousResult`. And this > could be an `Optional` to indicate that we have never called > `lazyInitInvocationList` before. > This means we would check in `lazyInitInvocationList` whether the > `PreviousResult` is set and if yes is it an error. And if both conditions are > true then return with the stashed error. The current solution looks good, probably it is more convenient to store the result in a `llvm::Error`. 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