================
@@ -827,8 +829,96 @@ 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;
----------------
steakhal wrote:

De-morgan rule simplifies this.
```suggestion
  return PointeeType->isPointerType() && 
PointeeType->getPointeeType()->isCharType()
```

https://github.com/llvm/llvm-project/pull/178054
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to