[clang-tools-extra] [clang-tidy][NFC] Fix misc-override-with-different-visibility warnings (PR #182763)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 22 10:53:24 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
Author: Baranov Victor (vbvictor)
<details>
<summary>Changes</summary>
Ran with config:
```yaml
- key: misc-override-with-different-visibility.DisallowedVisibilityChange
value: widening
```
I think we should only care about widening changes.
---
Full diff: https://github.com/llvm/llvm-project/pull/182763.diff
1 Files Affected:
- (modified) clang-tools-extra/clang-tidy/ClangTidy.cpp (+4-3)
``````````diff
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index 9f5d21001ec89..7a898ef07b275 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -639,13 +639,14 @@ runClangTidy(clang::tidy::ClangTidyContext &Context,
class Action : public ASTFrontendAction {
public:
Action(ClangTidyASTConsumerFactory *Factory) : Factory(Factory) {}
+
+ private:
+ ClangTidyASTConsumerFactory *Factory;
+
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &Compiler,
StringRef File) override {
return Factory->createASTConsumer(Compiler, File);
}
-
- private:
- ClangTidyASTConsumerFactory *Factory;
};
ClangTidyASTConsumerFactory ConsumerFactory;
``````````
</details>
https://github.com/llvm/llvm-project/pull/182763
More information about the cfe-commits
mailing list