Skip to content

modernize-use-override 警告修正 (clang-tidy) #2065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gorogoro123
Copy link
Contributor

PR対象

  • アプリ(サクラエディタ本体)

カテゴリ

  • 改善

PR の背景

clang-tidy を実行すると、下記の warning が表示される。

C:\work\sakura\sakura_core\CGrepEnumFolders.h:30:15: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]
   30 |         virtual BOOL IsValid( WIN32_FIND_DATA& w32fd, LPCWSTR pFile = NULL ){
      |         ~~~~~~~      ^
      |                                                                              override

仕様・動作説明

override 指定子を追加します。

PR の影響範囲

影響なし。

テスト内容

  1. clang-tidy で modernize-use-override の warning 削減されていることを確認する。
    プロジェクト - プロパティ - Code Analysis - 全般 - Clang-tidy の有効化 を "はい" に設定する。
    プロジェクト - プロパティ - Code Analysis - 有効または無効にするチェック に "-*,modernize-use-override" を追加する。
    分析 - Code Analysis の実行 - sakuraでコード分析を実行 を選択する。
  2. 変更前後でasmが同じことを確認する。

関連 issue, PR

#1987

参考資料

https://releases.llvm.org/19.1.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/use-override.html

Copy link

sonarqubecloud bot commented Jun 1, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
23.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants