[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 21 01:43:24 PDT 2024
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrcode at protonmail.com>,
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= <tigbrcode at protonmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/89925 at github.com>
================
----------------
tigbr wrote:
A @isuckatcs specifically requested [testing C and Objective-C or specifying in the check that those languages are not supported](https://github.com/llvm/llvm-project/pull/89925#discussion_r1578557769).
> The default config is `-std=c++11-or-later`, but this check is not limited to that only, so we want to run it with `-std=c++98-or-later`.
>
> The check also supports C and Objective-C, so please add `.c` and `.m` test files and create tests for those languages too.
>
> If you don't want to support any of these languages, please add `bool isLanguageVersionSupported(const LangOptions &LangOpts) const override;` to your check and configure the supported languages.
C-style tagged unions are supported in Objective-C and Objective-C++ so why exclude these languages? If we support them, then they should be tested.
https://github.com/llvm/llvm-project/pull/89925
More information about the cfe-commits
mailing list