[PATCH] D77085: [clang-tidy] Added support for validating configuration options
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 13:37:19 PDT 2020
njames93 created this revision.
njames93 added reviewers: aaron.ballman, alexfh, gribozavr2.
Herald added subscribers: cfe-commits, xazax.hun.
Herald added a project: clang.
njames93 added a comment.
njames93 added a project: clang-tools-extra.
This pretty much nulls out (clang-tidy) Warn on invalid "case" configurations for readability-identifier-naming <https://reviews.llvm.org/D76606> I have moved that into a follow up patch that can be submitted now if you'd like.
Adds support for `ClangTidyCheck::OptionsView` to deteremine:
- If an option is found in the configuration.
- If an integer option read from configuration is parsable to an integer.
- Parse and Serialize enum configuration options directly using a mapping from `llvm::StringRef` to `EnumType`.
- If an integer or enum option isn't parseable but there is a default value it will issue a warning to stderr that the config value hasn't been used.
- If an enum option isn't parsable it can provide a hint if the value was a typo.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77085
Files:
clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
clang-tools-extra/clang-tidy/ClangTidyCheck.h
clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77085.253679.patch
Type: text/x-patch
Size: 26756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200330/e4a44b29/attachment-0001.bin>
More information about the cfe-commits
mailing list