[PATCH] D54204: [clangd] Initial clang-tidy diagnostics support.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 7 06:02:11 PST 2018
sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov, mgorny, srhines.
This runs checks over a restricted subset of the TU:
- preprocessor callbacks just receive the truncated PP events that occur when a preamble is used.
- ASTMatchers run only over the top-level decls in the main-file
This patch just turns on one simple check (bugprone-sizeof-expression)
with no configuration.
- configuration is complex enough to warrant a separate patch
- arbitrary checks don't work well yet - there are various ways that checks can access the whole AST (and thus be incredibly slow). Most notably: the hasAncestor matcher, and using the ASTContext from check().
This depends on a small patch to ASTMatchers to run a MatchFinder on a
certain set of top-level declarations.
rCTE Clang Tools Extra
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6302 bytes
Desc: not available
More information about the cfe-commits