[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)
Sean McBride via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 13:40:32 PDT 2025
seanm wrote:
Another interesting case:
```c++
static int testToWindowsExtendedPath()
{
#ifdef _WIN32
// lots of real, non constant work
return ret;
#else
return 0;
#endif
}
```
For some platforms this can be constexpr; for other platforms (Windows), it cannot. It was transformed to `constexpr` since I'm on Mac. Not sure what you can do there...
https://github.com/llvm/llvm-project/pull/146553
More information about the cfe-commits
mailing list