[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once
Kyle Edwards via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 19 11:32:22 PST 2023
KyleFromKitware added a comment.
In D142123#4066706 <https://reviews.llvm.org/D142123#4066706>, @KyleFromKitware wrote:
> The only way to avoid this is if we overhaul the existing `HeaderGuardCheck` and make its naming convention configurable by a configuration option as opposed to having to extend the C++ class to calculate the name.
Actually, this might be realistic. We could add a new registry for header guard styles. So then instead of having separate checks named `llvm-header-guard` and such, we have a single check named `header-guard` which can then select between different header guard styles (`llvm`, `pragma-once`, etc.) Projects could even create their own custom guard styles and register them in this new registry.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142123/new/
https://reviews.llvm.org/D142123
More information about the cfe-commits
mailing list