This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Suppress clang-tidy warnings for code spelled in system macros
ClosedPublic

Authored by sammccall on Jan 11 2023, 6:47 AM.

Details

Summary

This aligns with the default behavior of clang-tidy (which we offer no
way to override).

Fixes https://github.com/clangd/clangd/issues/1448

Diff Detail

Event Timeline

sammccall created this revision.Jan 11 2023, 6:47 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: arphaman. · View Herald Transcript
sammccall requested review of this revision.Jan 11 2023, 6:47 AM
kadircet accepted this revision.Jan 11 2023, 6:51 AM

thanks, lgtm!

This revision is now accepted and ready to land.Jan 11 2023, 6:51 AM
This revision was landed with ongoing or failed builds.Jan 11 2023, 7:11 AM
This revision was automatically updated to reflect the committed changes.
nridge added a subscriber: nridge.Jan 11 2023, 7:49 AM
nridge added inline comments.
clang-tools-extra/clangd/ParsedAST.cpp
545

Why not check CTContext->getOptions().SystemHeaders, since we have ready access to it?

sammccall added inline comments.Jan 11 2023, 9:00 AM
clang-tools-extra/clangd/ParsedAST.cpp
545

Ah, my mistake, I thought this was some global flag rather than part of tidy options (not sure why I thought that), will fix