llvm/llvm-project
[clang-tidy] llvm-header-guard suggest invalid ifdef macros name
开放
#166,750 创建于 2025年11月6日
clang-tidyfalse-positivegood first issue
仓库指标
- 星标
- (26,378 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
When https://clang.llvm.org/extra/clang-tidy/checks/llvm/header-guard.html check sees a file with has "llvm" inside its filepath (e.g. clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h), instead of making such ifdef:
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADERGUARDCHECK_H
The check makes:
#ifndef LLVM_HEADERGUARDCHECK_H
The check removes leading part if sees "LLVM" in check-name which is incorrect.