llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.24k stars 11.66k forks source link

[clang-tidy] Key "readability-identifier-naming.ClassCase" breaks the code #53514

Open shrek1402 opened 2 years ago

shrek1402 commented 2 years ago

.clang-tidy:

CheckOptions:
  - key:   readability-identifier-naming.ClassCase
    value: 'lower_case'

Before:

template<class Ty, bool = STD is_enum_v<Ty>>
struct _enum_to_string {
};
template<class Ty>
struct _enum_to_string<Ty, false> {
};

After:

template<class Ty, bool = STD is_enum_v<Ty>>
struct enum_to_string {
};
template<class Ty>
struct _enum_to_string<Ty, false> {
};

The symbol is missing _ in first specializing, but is present in second specializing.

llvmbot commented 2 years ago

@llvm/issue-subscribers-bug

llvmbot commented 2 years ago

@llvm/issue-subscribers-clang-tidy

shrek1402 commented 2 years ago

readability-identifier-naming.StructCase it's broken too.

PiotrZSL commented 1 year ago

Confirmed on main. Check does not detect issues from specialization.