sammccall added inline comments.

================
Comment at: clang-tools-extra/clangd/index/SymbolID.h:57
 
+  bool isValid() const { return HashValue != std::array<uint8_t, RawSize>{}; }
+
----------------
I'm not a big fan of LLVM's habit of calling the sentinel value "invalid".

Consider SourceLocation - one can construct invalid source locations that are 
`isValid()` (add an offset longer than the file) and SourceLocation() most 
commonly means "there is no location associated" rather than "we have bad data".

WDYT about calling this "isNull" (and possibly defining operator bool())?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90397

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

Reply via email to