[PATCH] D85417: [clangd] Fix crash in bugprone-bad-signal-to-kill-thread clang-tidy check.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 00:27:55 PDT 2020
hokein added a comment.
Thinking more about this,
> Inside clangd, clang-tidy checks don't see preprocessor events in the preamble.
> This leads to Token::PtrData == nullptr for tokens that the macro is defined to.
> E.g. #define SIGTERM 15:
>
> Token::Kind == tok::numeric_constant (Token::isLiteral() == true)
> Token::UintData == 2
> Token::PtrData == nullptr
The token is in a pretty-broken state. Do you know why the UintData is set to 2, I suppose this is the length of the macro definition (`15`). If the PtrData is nullptr, I'd expect the UintData is 0.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85417/new/
https://reviews.llvm.org/D85417
More information about the cfe-commits
mailing list