[clang] [analyzer] Implement potential underflow warnings (PR #216077)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 06:59:43 PDT 2026


================
@@ -334,13 +334,15 @@ static BugDescription describeInvalidAccess(bounds::CheckResult Res,
           std::string(Buf)};
 }
 
-static BugDescription describeTaintBug(StringRef RegName, StringRef OffsetName,
-                                       bool AlsoMentionUnderflow) {
+static BugDescription describeTaintBug(bounds::CheckResult Res,
+                                       StringRef RegName,
+                                       StringRef OffsetName) {
   return {formatv("Potential out of bound access to {0} with tainted {1}",
                   RegName, OffsetName),
-          formatv("Access of {0} with a tainted {1} that may be {2}too large",
-                  RegName, OffsetName,
-                  AlsoMentionUnderflow ? "negative or " : "")};
+          formatv("Access of {0} with a tainted {1} that may be{2}{3}{4}.",
----------------
NagyDonat wrote:

Dot removed in https://github.com/llvm/llvm-project/pull/216077/commits/65221845c27809955b30be3d1f1a78febf992362

https://github.com/llvm/llvm-project/pull/216077


More information about the cfe-commits mailing list