This revision was automatically updated to reflect the committed changes.
martong marked an inline comment as done.
Closed by commit rGefa7df1682c2: [Analyzer] Track RValue expressions (authored
by martong).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.o
steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.
land it
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1938
+ ProgramStateRef RVState = RVNode->getState();
+ SVal V = RVState->getSValAsScalarOrLoc(
martong marked an inline comment as done.
martong added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1958-1959
+ EnableNullFPSuppression);
+ } else { // Track only the LHS of divisions.
+if (LHSV.isZeroConstant(
martong updated this revision to Diff 334093.
martong added a comment.
- Update comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99344/new/
https://reviews.llvm.org/D99344
Files:
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang
steakhal added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1958-1959
+ EnableNullFPSuppression);
+ } else { // Track only the LHS of divisions.
+if (LHSV.isZeroConstant())
+ trackExpressionValue(InputNode,
martong marked an inline comment as done.
martong added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1944-1945
+return;
+ if (!BO->isMultiplicativeOp())
+return;
+
steakhal wrote:
> There are only 3 multiplicative op
martong updated this revision to Diff 333848.
martong added a comment.
- Remove handling of assignment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99344/new/
https://reviews.llvm.org/D99344
Files:
clang/lib/StaticAnalyzer/Core/BugReporterVisit
steakhal added a comment.
Some minor logical issues inline.
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1944-1945
+return;
+ if (!BO->isMultiplicativeOp())
+return;
+
There are only 3 multiplicative operators:
```
BINARY_OPERATION
martong added a comment.
Guys, thanks for the review! :)
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1945
+
+ auto IsZero = [&BVF](const Optional &CI) {
+if (!CI)
NoQ wrote:
> `SVal::isZeroConstant()` please ^.^
Yeah good catch, I wis
martong updated this revision to Diff 333508.
martong marked 5 inline comments as done.
martong added a comment.
- Use isZeroConstant()
- Make trackRValueExpression private (static function)
- Fix clang-tidy report: auto *BO ---> const auto *BO
Repository:
rG LLVM Github Monorepo
CHANGES SI
NoQ added a comment.
I think this is a good targeted fix for that problem we've discussed,
demonstrated by tests.
Comment at:
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:119-124
+/// Attempts to add visitors to track an RValue expression back to
martong marked an inline comment as done.
martong added inline comments.
Comment at:
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:119-124
+/// Attempts to add visitors to track an RValue expression back to its point of
+/// origin. Works similarly to
martong updated this revision to Diff 47.
martong added a comment.
- Assert in the callee and check in the caller
- Fix typo in comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99344/new/
https://reviews.llvm.org/D99344
Files:
clang/inc
martong updated this revision to Diff 46.
martong added a comment.
- Rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99344/new/
https://reviews.llvm.org/D99344
Files:
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisito
steakhal added a comment.
I really like it. Looks good.
I'm letting someone else accept this as I've not really touched the
trackExpression parts.
Comment at:
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:119-124
+/// Attempts to add visitors to tr
vsavchenko added a comment.
From the first glance, everything is looking good! Thanks for addressing this!
But I still need to have a deeper look.
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1932-1933
+bool EnableNu
martong created this revision.
martong added reviewers: steakhal, NoQ, vsavchenko, Szelethus.
Herald added subscribers: ASDenysPetrov, Charusso, gamesh411, dkrupp,
donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware,
xazax.hun, whisperity.
martong requested review of this
17 matches
Mail list logo