Fixes PR#52081 by attempting to detect some of the "obvious" cases where a loop condition is known to be false despite depending on template parameters.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The test failed on Windows. I don't have a machine to reproduce this, but maybe adding -fno-delayed-template-parsing helps.
Comment Actions
Sorry about the delay in getting this reviewed, but it generally LGTM. Can you also add a release note about the fix? (I'm accepting the review and you can feel free to land with the requested changes made, but if you want another round of review before you land, just ask!)
clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp | ||
---|---|---|
120–140 | My renaming may not be the best improvement to make, but Value wasn't giving me much indication of what to pass to it as a caller. It may also help to rename the function from isKnown() to isKnownToHaveValue() or something along those lines. |
My renaming may not be the best improvement to make, but Value wasn't giving me much indication of what to pass to it as a caller. It may also help to rename the function from isKnown() to isKnownToHaveValue() or something along those lines.