ilya-biryukov added inline comments.
================ Comment at: clangd/ClangdLSPServer.cpp:811 + if (Trigger == ">") + return (*Code)[*Offset - 2] != '-'; // trigger only on '->'. + if (Trigger == ":") ---------------- hokein wrote: > Checking `Offset` is not always right for rare cases like > (`bar:/*commment*/:`), a robust way is to use lexer and get the token at the > current position, but I don't think it is worth (these rare cases should not > happen when people write code). Maybe add a comment documenting the > limitation? Done. Note that `bar:/*comment*/:` is not actually a qualifier, i.e. a single token cannot be split in half by the comment. But the comment is totally valid: use the lexer would allow to filter out more things, e.g. we don't want to auto-trigger inside a comment, etc. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55994/new/ https://reviews.llvm.org/D55994 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits