[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 00:17:30 PDT 2023


cor3ntin wrote:

This is neat!
My biggest concerns is the handling of the keywords. It's very inaccurate and would hard to keep in sync.

I think we could get `TextDiagnostic` to be constructed with a `Preprocessor` object (by modifying the various `BeginSourceFile` implementations, I think)

This would let us call `getIdentifierInfo` on the preprocessor and from then we can determine if a particular identifier is a keyword. Is that something you considered?






https://github.com/llvm/llvm-project/pull/66514


More information about the cfe-commits mailing list