vsavchenko added inline comments.

================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:110
+  /// (inlined defensive checks, returned null).
+  bool EnableNullFPSuppression = true;
+};
----------------
xazax.hun wrote:
> I vaguely remember we wanting to put this defensive check suppression in the 
> related checkers. If that is the case, I wonder if this option belongs here. 
It is not really about suppressing it at all for all checkers.  Such option 
already exists in analyzer options.
This one is used specifically for situations when globally suppressions are on, 
but don't make sense for that particular type (like array index).


================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:210
+  ///        much.
+  virtual Result track(KnownSVal V, const MemRegion *R,
+                       TrackingOptions Opts = {},
----------------
NoQ wrote:
> vsavchenko wrote:
> > NoQ wrote:
> > > xazax.hun wrote:
> > > > Not directly related to this patch, but I wonder if we want to have 
> > > > unknown values with identities at some point, so we can track them.
> > > `UnknownVal` is a stop-gap for situations when we've screwed up so badly 
> > > we don't even have types anymore. The only thing I'd ever want from them 
> > > is to disappear :)
> > > 
> > > I guess this could be useful for a debug checker that could explain where 
> > > does an `UnknownVal` come from. In this case unknown values don't need 
> > > identities; we can track other values without identities, such as null 
> > > pointers, just fine.
> > +1 for not caring about `UnknownVal`.
> That said, I'd rather not force the caller to perform a `getAs<>()`. It's 
> pretty cumbersome and we can do the right thing (ignore it) in the callee 
> anyway.
OK, I see, so we can call it with whatever value, but track only known values, 
correct?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103605

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to