eduucaldas added inline comments.
================ Comment at: clang/include/clang/Tooling/Syntax/Tree.h:249 + + /// Return whether *under valid code* the list can be empty. + /// ---------------- gribozavr2 wrote: > "Whether this list can be empty in syntactically and semantically correct > code. > > This list may be empty when the source code has errors even if canBeEmpty() > returns true." "...even if `canBeEmpty()` returns **false**" ================ Comment at: clang/lib/Tooling/Syntax/Tree.cpp:367 +clang::tok::TokenKind syntax::List::getDelimiterTokenKind() { + llvm_unreachable("A list can have only elements and delimiters as children."); +} ---------------- gribozavr2 wrote: > I think a better error message would say that there are no subclasses of > List, so this method can't be called. Very sorry about that, this error was a copy-paste, I forgot to edit it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85295/new/ https://reviews.llvm.org/D85295 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits