[PATCH] D125225: [WIP][analyzer] Taint Notes enhancements

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 07:13:16 PDT 2022


steakhal added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2363
+  for (SymbolRef SubSym : SubSyms) {
+    if (SymbolData::classof(SubSym)) {
+      if (auto MaybeTK = TryToLookupTrackingKind(SubSym))
----------------
I think this is the superior way of checking this.


================
Comment at: clang/test/Analysis/taint-diagnostic-visitor.c:36
   scanf("%d", &x); // expected-note {{Value assigned to 'x'}}
-                   // expected-note at -1 {{Taint originated here}}
+                   // expected-note at -1 {{Taint originated here}} expected-note at -1 {{Propagated taint to the 2nd parameter}}
   int vla[x]; // expected-warning {{Declared variable-length array (VLA) has tainted size}}
----------------
If we emit a specific note-tag, we definitely shouldn't emit a `Taint originated here` note.

I think in my original patch stack I did actually remove the archaic visitor producing this since the propagation note tags completely supersedes that approach.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125225



More information about the cfe-commits mailing list