This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b958dd6bcca: [analyzer] Fix crash on spaceship operator
(PR47511) (authored by vsavchenko).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99181/new/
https:
NoQ accepted this revision.
NoQ added a comment.
Looks great now!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99181/new/
https://reviews.llvm.org/D99181
___
cfe-commits mailing list
cfe-commits@lists.l
vsavchenko updated this revision to Diff 336108.
vsavchenko marked 4 inline comments as done.
vsavchenko added a comment.
Change produced SVal for the spaceship operator from Undefined to Unknown
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99181/n
loic-joly-sonarsource added inline comments.
Comment at: clang/test/Analysis/PR47511.cpp:5
+
+#include "Inputs/std-compare.h"
+
For such a simple test, there is no need to use the full-fledged header, the
following would suffice:
```
namespace std {
struct stro
NoQ added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:169-171
+ } else if (B->getOpcode() == BinaryOperatorKind::BO_Cmp) {
+// We can't reason about C++20 spaceship operator yet.
+return;
steakhal wro
steakhal accepted this revision.
steakhal added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp:331
// Note: LAnd, LOr, Comma are handled specially by higher-level logic.
vsavchenko added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp:331
// Note: LAnd, LOr, Comma are handled specially by higher-level logic.
steakhal wrote:
> So, there are some corner cases already.
> I can't see any wa
steakhal added a comment.
I'm always in favor of bugfixes. However, I have some concerns about this one.
Comment at: clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:169-171
+ } else if (B->getOpcode() == BinaryOperatorKind::BO_Cmp) {
+// We can't reason ab
vsavchenko created this revision.
vsavchenko added reviewers: NoQ, steakhal, xazax.hun, ASDenysPetrov, martong.
Herald added subscribers: Charusso, dkrupp, donat.nagy, Szelethus,
mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, yaxunl.
vsavchenko requested review of this revision.