[clang] [clang][analyzer] Add taintedness to argv (PR #178054)

Daniel Krupp via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 24 01:12:43 PST 2026


================
@@ -829,6 +829,16 @@ void GenericTaintChecker::initTaintRules(CheckerContext &C) const {
                             std::make_move_iterator(Rules.end()));
 }
 
+bool isPointerToCharArray(const QualType &QT) {
+  if (!QT->isPointerType())
+    return false;
+  QualType PointeeType = QT->getPointeeType();
+  if (!PointeeType->isPointerType() ||
+      !PointeeType->getPointeeType()->isCharType())
+    return false;
+  return true;
+}
----------------
dkrupp wrote:

taint-diagnostic-visitor-main_envp2.c test case was added to test this.

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


More information about the cfe-commits mailing list