================
@@ -0,0 +1,13 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection \
+// RUN:   -analyzer-constraints=z3 -verify %s
+// REQUIRES: z3
+
+void clang_analyzer_eval(int);
+
+void unary_not_logical_result(int x, int y) {
+  clang_analyzer_eval(~(x && y) != 0); // expected-warning{{TRUE}}
+}
+
+void unary_minus_logical_result(int x, int y) {
+  clang_analyzer_eval(-(x && y) <= 0); // expected-warning{{TRUE}}
+}
----------------
rdevshp wrote:

[extint_crash.txt](https://github.com/user-attachments/files/29470310/extint_crash.txt)
The _ExtInt(256) / _ExtInt(300) cases crash with the current patch:
```
clang: ../clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h:659: 
static void clang::ento::SMTConv::doTypeConversion(llvm::SMTSolverRef&, 
clang::ASTContext&, const llvm::SMTExpr*&, const llvm::SMTExpr*&, 
clang::QualType&, clang::QualType&): Assertion `!LTy.isNull() && !RTy.isNull() 
&& "Input type is null!"' failed.
```


https://github.com/llvm/llvm-project/pull/205078
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to