[clang] [Clang] Improve ``-Wtautological-overlap-compare`` diagnostics flag (PR #133653)
Yutong Zhu via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 11 18:31:26 PDT 2025
================
@@ -70,13 +70,11 @@ static SourceLocation GetEndLoc(Decl *D) {
return D->getLocation();
}
-/// Returns true on constant values based around a single IntegerLiteral.
-/// Allow for use of parentheses, integer casts, and negative signs.
-/// FIXME: it would be good to unify this function with
-/// getIntegerLiteralSubexpressionValue at some point given the similarity
-/// between the functions.
+/// Returns true on constant values based around a single IntegerLiteral,
+/// CharacterLiteral, or FloatingLiteral. Allow for use of parentheses, integer
+/// casts, and negative signs.
----------------
YutongZhuu wrote:
No, I think my change would probably cause this function to be more diverged from ``getIntegerLiteralSubexpressionValue``, so I think generalizing them into one function isn't a good idea anymore.
https://github.com/llvm/llvm-project/pull/133653
More information about the cfe-commits
mailing list