<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/140175>140175</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy][bug] Why does the same config not produce the same effect for ClassCase and EnumConstant?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          yaoxinliu
      </td>
    </tr>
</table>

<pre>
    Consider the .clang-tidy config snippet:

```
CheckOptions:
  - key: readability-identifier-naming.ClassCase  
    value: CamelCase
  
  - key: readability-identifier-naming.ClassIgnoredRegexp    
    value: '^[A-Za-z]+(_[a-zA-Z0-9]+)*_?$'

  - key: readability-identifier-naming.EnumConstantCase
    value: CamelCase
    
 - key: readability-identifier-naming.EnumConstantIgnoredRegexp
    value: '^[A-Za-z]+(_[a-zA-Z0-9]+)*_?$'
```
and the following main.cpp:

```
class Ab_Cd {}; // ok

enum class A : char {
    Ab_Cd // warning by clang-tidy
};

int main() {}
```
My clang-tidy version is 20.1.5.

Why does the same config not produce the same effect for ClassCase and EnumConstant?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VE2PozgQ_TXFpQQyBpPkwCEfHWkPq5X2MlJfWgYX4GljI2zSnf71I0h6kh7NHHo0I1lCouo916t6Lum9bi1RCWIH4hDJKXRuLM_SvWpr9BRVTp3LvbNeKxoxdIRJbaRt46DVGWtnG92it3oYKEC2Bbacgl0P2-47qp__G4J21l8SEGN8pjNkWxxJKllpo8M51ops0I2mMbay17ZN9kZ6v5eeEBcY4kmaiWbgXvZk5tAS-DTpP611I6n_qaXXYSb-kR_4CsQDiN02fpTxG4gD8B3w9ROInYzftvEjizfvfzfAt0-QHYHnM459SuSDnfq5v0Ha8F3QL5VeKv0N6g-K_7Dau2lLqxaTNM4Y96Jti73UNqmH4afmqOdh4LZ62iuE1Q5WB8h2CPwI_Iju-QIgO_V4zcS53LqT45J-kXGFX0AvcrTztdUZbz6deRbqC6G2YSkL-Br45v3ij5X9e4_HE41eO4vaI2dJmojkwvSlO6Ny5BfNXvb0_iKsCziMTk013WLUNFQHbNyIN2vPHbsfFGTHSJWZ2mQbGVGZrvJVVvA130Rd2aRV1og8Jd5UosjzPM_Ymq9TnqsmTRsW6ZIzLphIC8azLN8kRVMUq2LNGStqlaoKcka91CYx5tQnbmwj7f1EZZqzdCUiIysyflkGnN_1j_N5OYzljIqrqfWQM6N98DeeoINZ1sgdTBxA7KqpBXHAv9SqaTRlF8Kw7JbFAq0O3VQlteuBH-fyrp94GN1XqgPw46LZAz9eZZ9K_i0AAP__02iL5Q">