[PATCH] D74131: [analyzer][taint] Add isTainted debug expression inspection check

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 07:54:05 PST 2020


Szelethus added a reviewer: boga95.
Szelethus added a comment.

In D74131#1884372 <https://reviews.llvm.org/D74131#1884372>, @steakhal wrote:

> If this patch is good to go, could someone commit it?
>  I don't have commit access (yet).


I think you can apply for a commit access, you have a history of high quality patches!



================
Comment at: clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:97
     .Case("clang_analyzer_express", &ExprInspectionChecker::analyzerExpress)
+    .StartsWith("clang_analyzer_isTainted", &ExprInspectionChecker::analyzerIsTainted)
     .Default(nullptr);
----------------
xazax.hun wrote:
> I think a comment somewhere why/when do we check only the prefix would be useful.
This isn't done?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:427-430
+  if (CE->getNumArgs() != 1) {
+    reportBug("clang_analyzer_isTainted() requires exactly one argument", C);
+    return;
+  }
----------------
Might as well create a test case for this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74131/new/

https://reviews.llvm.org/D74131





More information about the cfe-commits mailing list