Skip to content

Commit

Permalink
[clang-tidy]unused using decls only check cpp files (#77335)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrCai0907 committed Jan 9, 2024
1 parent ac8b4f8 commit a0ae525
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class UnusedUsingDeclsCheck : public ClangTidyCheck {
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
void onEndOfTranslationUnit() override;
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
return LangOpts.CPlusPlus;
}

private:
void removeFromFoundDecls(const Decl *D);
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ Changes in existing checks

- Improved :doc:`misc-unused-using-decls
<clang-tidy/checks/misc/unused-using-decls>` check to avoid false positive when
using in elaborated type.
using in elaborated type and only check cpp files.

- Improved :doc:`modernize-avoid-bind
<clang-tidy/checks/modernize/avoid-bind>` check to
Expand Down

0 comments on commit a0ae525

Please sign in to comment.