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

    <tr>
        <th>Summary</th>
        <td>
            readability-identifier-naming does not allow overriding a prefix with an empty prefix
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    I wish to enforce a particular prefix on global variables which are not constants.

I would expect to be able to do this via the following options to readability-identifier-naming:

```yaml
  - key: readability-identifier-naming.GlobalConstantPrefix
    value: ''
  - key: readability-identifier-naming.GlobalVariablePrefix
    value: g_
```

However, it seems that when `GlobalConstantPrefix` is set to the empty string, it is treated as if it is not set at all.  The consequence is that all global variables including constants are forced to use the prefix.

I also tried setting the `GlobalConstantPrefix` to null, but this seems to be impossible.  Using either `~` or `null` simply interprets the value as the literal string `~` or `null`, which is not intended.

It's not clear to me whether YAML distinguishes null from the empty string at all.  If it doesn't then this issue is understandable.  It would still be nice to have some way to express this requirement.  Perhaps some character which is not valid for use in identifiers could be assigned the meaning of 'no prefix required' and can be used for overrides like this.  The character `~` seems like the obvious choice, since that supposedly represents null in YAML sometimes.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydVMuO4zYQ_Br50hhDIz_noMPsI8kACbCHJEBOASW2LO5SpEJS9vjvU03JO_vIziGAYOvRrK6uKrLx-lo_0cXEnpIndp0PLZOiUYVk2smqQGPgzjyTd3SyvlGWzioY1ViOdOlN25MKTM4nar2LSbkU10X5rigf51-g-8lq4ueR2yRdGjTAcrnVnlJvIp2Nwg1T5631F-NO5MdkgCdFgZVWjbEmXe-MZpdMZzjcOTWgsNg8ftmt2JfzdVWDnV8R3dEnvqLwdaT1z3m8t8sUH_LYNwjC1HZiASmqg1z_B_vPRbkfYp_-_maML2f7xV_4zKGo3pJJF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