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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] Check request: bugprone-avoid-inline-constexpr-in-Implementations
        </td>
    </tr>

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

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

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

<pre>
    C++17 suggests us the possibility to use `inline` on `constexpr` variables, but when identical `inline constexpr` variables are defined in different translation units with different values, this violates the One Definition Rule (ODR) which manifests unpredictably (e.g., different values in different TUs).
Need a check to get rid from `inline` keyword on `constexpr` variables in source files.

BEFORE:
```
// foo.cpp
inline constexpr int MAX_SIZE = 1024;
```

AFTER:
```
// foo.cpp
constexpr int MAX_SIZE = 1024;
```

**Scope**
- Applies only to sources (.cpp, .cxx, etc.), ignoring .h files.

**Why `bugprone-`?**
- Runtime behaviour potentially affected due to unexpected constant's value selected in link time.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVE2L6zYU_TXK5hIjy4k9XnjhTCbwFu1A3ist3RTZurZvR5FcfWQm_fVF9vDmg1LKA4EURfccneOjK72n0SA2bH9g--NGxjBZ1yg0f1snON90Vt2aeyYOTBzyCnwcR_TBQ_QQJoTZek8daQo3CBaiR2AlJ6PJICs5WJN-99b4gC-zS1tX6Uh2Gj0T99DFAM8TGiCFJlAv9Vs9_HsZSIegcCCDCsiAomFAhyZAcNJ4LQNZA9FQ8PBMYXp34Cp1XHnDRB6uZLUMuCp5NAjHhEpL_TlqBCbuHo9nJmp4nqif4CINDat8MztU1AfZ6Vs6h9mYJeDPZB9v-O0Xz0SdMd7-jKhAQj9h_5ScGzGAIwWDs5ePFj7h7dk69Z9WJhZvo-sRBtLoEwPj7eHh9Hh-YEVas5K_Dt4ycWLiBIO1WT_PjLefDQcyAX5qf_vj65ffH4AVR8i52LHi8BmIt-3p28P5f1D8CDYTaXzt7YzrkvF2C-08a0IP1ugldKtwn77CwiXuIetfXtKMoc-YqNOSRmMdmRGy6YNHK_Cv0y2528VxdtbgNl2hOL0jPUcT6ILQ4SSvZKOD2YYUWan1DeQwYB9QgYq4vAODL_O6s-iWJjBR-TUT4FGv_5EBTeYJEnK2UU2h6qKWG2zyap_v8p3YFZup2WPZd8WdLPJSIq9yKe9UpSpZq5rvh0ptqBFc7HnFc1HsK1FkeX0nyr0qd3WJqpIF23G8SNKZ1tdLZt24Ie8jNvmuLHOx0bJD7ZcWIESvpRm3gdSNCZFagmtS1baLo2c7rskH_4YTKOilebwr2x_hfom1w78i-sCKFr4bK6-W1HbN2_Z7JrZktl8us8YLmrA8YL-JTjdTCLNP4VrSNFKYYpf19sLEKV3hddrOzv6JfWDitOjyTJxepV0b8U8AAAD__2LGkgc">