@@ -114,7 +128,8 @@ class SValExplainer : public FullSValVisitor {
std::string VisitSymbolConjured(const SymbolConjured *S) {
return "symbol of type '" + S->getType().getAsString() +
- "' conjured at statement '" + printStmt(S->getStmt()) + "'";
+ "'
@@ -645,6 +645,7 @@ struct StreamOperationEvaluator {
SymbolRef StreamSym = nullptr;
const StreamState *SS = nullptr;
const CallExpr *CE = nullptr;
+ std::optional ElemRef;
steakhal wrote:
Ah I completely missed the context. nvm.
https://github.com/llv
steakhal wrote:
Do you have data about the analysis times per file, and per analysis entry
point?
Compared against the current llvm main, and also if this workaround would
restore the original running times before
https://github.com/llvm/llvm-project/commit/bb27d5e5c6b194a1440b8ac4e5ace68d0ee2
https://github.com/steakhal approved this pull request.
As for the Static Analyzer, if the tests pass, we should be good.
Unique_ptr > shared_ptr for sure!
https://github.com/llvm/llvm-project/pull/132984
___
cfe-commits mailing list
cfe-commits@lists.
@@ -2556,10 +2556,19 @@ void ExprEngine::processCFGBlockEntrance(const
BlockEdge &L,
const Stmt *Term =
nodeBuilder.getContext().getBlock()->getTerminatorStmt();
if (!isa_and_nonnull(Term))
return;
+
+// FIXME:
steakhal wrote:
Now thinking
@@ -209,6 +209,12 @@ class SValBuilder {
const LocationContext *LCtx,
QualType type,
unsigned visitCount);
+ DefinedOrUnknownSVal conjureSymbolVal(const Call
@@ -209,6 +209,12 @@ class SValBuilder {
const LocationContext *LCtx,
QualType type,
unsigned visitCount);
+ DefinedOrUnknownSVal conjureSymbolVal(const Call
@@ -0,0 +1,242 @@
+#!/usr/bin/env python3
+# A tool to automatically generate documentation for the config options of the
+# clang static analyzer by reading `AnalyzerOptions.def`.
+
+import argparse
+from collections import namedtuple
+from enum import Enum, auto
+import re
+impo
https://github.com/steakhal approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/135640
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,102 @@
+
+Configuring the Analyzer
+
+
+The clang static analyzer supports two kinds of options:
+
+1. Global **analyzer options** influence the behavior of the analyzer engine.
+ They are documented on this page, in the
@@ -0,0 +1,102 @@
+
+Configuring the Analyzer
+
+
+The clang static analyzer supports two kinds of options:
+
+1. Global **analyzer options** influence the behavior of the analyzer engine.
+ They are documented on this page, in the
@@ -0,0 +1,102 @@
+
+Configuring the Analyzer
+
+
+The clang static analyzer supports two kinds of options:
+
+1. Global **analyzer options** influence the behavior of the analyzer engine.
+ They are documented on this page, in the
@@ -0,0 +1,102 @@
+
+Configuring the Analyzer
+
+
+The clang static analyzer supports two kinds of options:
+
+1. Global **analyzer options** influence the behavior of the analyzer engine.
+ They are documented on this page, in the
@@ -7,6 +7,9 @@
//===--===//
//
// This file defines the analyzer options avaible with -analyzer-config.
+// Note that clang/docs/tools/generate_analyzer_options_docs.py relies on the
+// structure of this
@@ -0,0 +1,242 @@
+#!/usr/bin/env python3
+# A tool to automatically generate documentation for the config options of the
+# clang static analyzer by reading `AnalyzerOptions.def`.
+
+import argparse
+from collections import namedtuple
+from enum import Enum, auto
+import re
+impo
@@ -0,0 +1,242 @@
+#!/usr/bin/env python3
+# A tool to automatically generate documentation for the config options of the
+# clang static analyzer by reading `AnalyzerOptions.def`.
+
+import argparse
+from collections import namedtuple
+from enum import Enum, auto
+import re
+impo
@@ -0,0 +1,242 @@
+#!/usr/bin/env python3
+# A tool to automatically generate documentation for the config options of the
+# clang static analyzer by reading `AnalyzerOptions.def`.
+
+import argparse
+from collections import namedtuple
+from enum import Enum, auto
+import re
+impo
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/135169
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX)
gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs
../include/clang/Basic/Diagnostic.td "${docs_targets}")
gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs
../include/clang/Driver/ClangOptionDocs.td
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/135720
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
FYI, build bots suggests that this PR has build errors.
BTW, could you run this under perf stats to demonstrate the reduction of the
cache-misses and page-faults? I'd suspect a measurable difference if these
separate allocators really help.
https://github.com/llvm/llvm-project
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/138295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/138295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
FYI @necto
https://github.com/llvm/llvm-project/pull/138295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
I had a look at the spreadsheet and the numbers for `linux-topro.c` looks
really impressive.
However, in general, we need further investigation about why are we not getting
faster e.g. in the `clang-MSP430ISelDAGToDAG.cpp` case. The direction seems
right though.
(FYI it usuall
@@ -361,15 +361,8 @@ TEST(CallDescription, AliasNames) {
std::cont v;
v.data();
})code";
- constexpr StringRef UseStructNameInSpelling = R"code(
-void foo() {
- std::container v;
- v.data();
-})code";
const std::string UseAliasInSpellingCod
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/138453
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/138464
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,45 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS
+
+// expected-no-diagnostics
+
+// This test reproduces the issue that previously the static analyzer
+// initializ
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/138594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal requested changes to this pull request.
Thank you for your contribution, and debugging the case.
Left a couple of comments inline.
https://github.com/llvm/llvm-project/pull/138594
___
cfe-commits mailing list
cfe-commits@lis
@@ -0,0 +1,45 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS
+
+// expected-no-diagnostics
+
+// This test reproduces the issue that previously the static analyzer
+// initializ
@@ -0,0 +1,45 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS
+
+// expected-no-diagnostics
+
+// This test reproduces the issue that previously the static analyzer
+// initializ
@@ -715,7 +717,11 @@ void ExprEngine::handleConstructor(const Expr *E,
// actually make things worse. Placement new makes this tricky as well,
// since it's then possible to be initializing one part of a multi-
// dimensional array.
-State = Stat
@@ -0,0 +1,45 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS
+
+// expected-no-diagnostics
+
+// This test reproduces the issue that previously the static analyzer
+// initializ
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
https://github.com/steakhal approved this pull request.
LGTM thanks
https://github.com/llvm/llvm-project/pull/137182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/128251
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/137182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/128251
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/137304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
@fangyi-zhou Could you please check what's wrong?
PS: I reverted this patch for now.
https://github.com/llvm/llvm-project/pull/128251
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/steakhal commented:
Thank you for proposing this. It looks really good already.
The code looks nice and dense, and the output also looks wonderful.
I had some design questions and a few remarks on the testing and error handling.
Good job.
https://github.com/llvm/llvm-project/
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX)
gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs
../include/clang/Basic/Diagnostic.td "${docs_targets}")
gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs
../include/clang/Driver/ClangOptionDocs.td
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX)
gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs
../include/clang/Basic/Diagnostic.td "${docs_targets}")
gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs
../include/clang/Driver/ClangOptionDocs.td
https://github.com/steakhal approved this pull request.
LGTM.
Please make sure not only clang but also clang-tidy tests pass.
https://github.com/llvm/llvm-project/pull/137680
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
steakhal wrote:
So is it about cache locality?
https://github.com/llvm/llvm-project/pull/138295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
Makes sense, thanks.
I just wonder why is BName an owning string? To me it would make a lot more
sense if it was a StringRef owned by the ASTContext.
WDYT?
https://github.com/llvm/llvm-project/pull/138231
__
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/136440
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -320,22 +320,6 @@ void test_buf_size_concrete_with_multiplication(void) {
// bugpath-warning{{The 1st argument to '__buf_size_arg_constraint_mul' is a
buffer with size 6 but should be a buffer with size equal to or greater than
the value of the 2nd argument (which is 4) ti
steakhal wrote:
Sorry about my availability. I barely have any focus time these days.
Could you please split your commit into: 1) the original commit we had to later
revert, 2) the changes to fix it that would make it on par with what you have
here now
This would allow me to review the affecte
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/127049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -1,7 +1,163 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -verify %s
-// expected-no-diagnostics
-void foo(void) {
+extern void __assert_fail (__const char *__assertion, __const c
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
steakhal wrote:
I've marked the resolved comments. There are a few unresolved conversations
left.
https://github.com/llvm/llvm-project/pull/127191
___
cfe-commits mailing li
https://github.com/steakhal updated
https://github.com/llvm/llvm-project/pull/127409
>From 5eb1d222478c6966780f22aa664321807da87114 Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Sun, 16 Feb 2025 20:37:34 +0100
Subject: [PATCH 1/2] [analyzer] Delay the checker constructions after parsing
I
@@ -40,17 +40,28 @@ enum class OpenVariant {
OpenAt
};
+static CachedMacroValue getCreateFlagValue(const ASTContext &Ctx,
+ const Preprocessor &PP) {
+ CachedMacroValue MacroVal("O_CREAT", PP);
+ if (MacroVal.hasValue())
+retur
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/127409
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal commented:
Thanks for the reviews!
https://github.com/llvm/llvm-project/pull/127409
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -73,6 +73,23 @@ Nullability getNullabilityAnnotation(QualType Type);
/// returned.
std::optional tryExpandAsInteger(StringRef Macro, const Preprocessor &PP);
+class CachedMacroValue {
steakhal wrote:
Right! Dropped in 10b4bd0403aa82a97f22a7fd55ee5126251390
steakhal wrote:
> LLVM Buildbot has detected a new failure on builder
> `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while
> building `clang` at step 6 "ninja check 1".
>
> Full details are available at:
> https://lab.llvm.org/buildbot/#/builders/81/builds/4823
This doesn'
steakhal wrote:
> (I'm writing a review right now, please wait a bit -- at most a few hours --
> before merging.)
No worries. I wouldnt have merged tgis without your approval too.
https://github.com/llvm/llvm-project/pull/127602
___
cfe-commits maili
Carlos =?utf-8?q?Gálvez?= ,
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
steakhal wrote:
> > We do this by prepending a new ASTConsumer to the list of consumers: this
> > new consumer sets the traversal scope in the ASTContext, which is later
> > used by the MatchASTConsumer.
>
> I do
steakhal wrote:
> @steakhal bleh, is the "New Features" a sub item of "Static Analyzer"?
Ah you are right. Its at the right place. Nvm.
https://github.com/llvm/llvm-project/pull/125384
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/130456
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/130456
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Carlos =?utf-8?q?Gálvez?= ,
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
steakhal wrote:
> I highly discourage implicit slowdowns
> - If I understand correctly, you mean that this patch could lead to people
> manually traversing the AST instead of using the MatchFinder, thus making
>
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/129697
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
Hi, I'm not sure where to move your addition in the ReleaseNotes, but I'm
pretty sure it shouldn't be in the Static Analyzer section.
https://github.com/llvm/llvm-project/pull/125384
___
cfe-commits mailing list
cfe-commits@lists.llvm.
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/130418
This PR splits the existing modeling of builtin assume from the
BuiltinFunctionChecker.
We just sink the execution path if we are about to leave the assume expression
with a false assumption.
Assumptions with
steakhal wrote:
This patch should conclude the assume attribute modeling. After this, we would
have some basic support for them.
https://github.com/llvm/llvm-project/pull/130418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/129234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Carlos =?utf-8?q?Gálvez?= ,
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
steakhal wrote:
> That's a good point. @haoNoQ @Xazax-hun @steakhal Do you see any implications
> on this patch when running clang static analyzer via clang-tidy? Any checks
> that would stop detecting issues?
>
https://github.com/steakhal approved this pull request.
https://github.com/llvm/llvm-project/pull/130780
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal approved this pull request.
Thanks for the fix. Your raised points also make sense to me.
https://github.com/llvm/llvm-project/pull/130683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/steakhal approved this pull request.
Ah! Sorry about this. I didn't mean to push roadblocks to you.
I have a followup PR (#130418) probably later today - I'll make sure that's
rebased to this one.
Thanks for taking care of this!
https://github.com/llvm/llvm-project/pull/13076
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/130763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -91,8 +91,29 @@ QualType getOverflowBuiltinResultType(const CallEvent &Call,
CheckerContext &C,
}
}
-class BuiltinFunctionChecker : public Checker {
+class BuiltinFunctionChecker
+: public Checker> {
public:
+ void checkPostStmt(const AttributedStmt *A, CheckerCont
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/130418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal updated
https://github.com/llvm/llvm-project/pull/130418
>From bdb40a95061acd007d1f27f1412c216c6ab6acb6 Mon Sep 17 00:00:00 2001
From: Balazs Benics
Date: Thu, 19 Dec 2024 13:45:58 +0100
Subject: [PATCH 1/3] [analyzer] Model [[assume]] attributes without
side-ffects
@@ -91,8 +91,29 @@ QualType getOverflowBuiltinResultType(const CallEvent &Call,
CheckerContext &C,
}
}
-class BuiltinFunctionChecker : public Checker {
+class BuiltinFunctionChecker
+: public Checker> {
public:
+ void checkPostStmt(const AttributedStmt *A, CheckerCont
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/130418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/130418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/130418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
> I have no strong feelings about the implicit/explicit question. I am also not
> sure we need this lightweight wrapper type.
I also fail to see the benefit of this strong-type.
https://github.com/llvm/llvm-project/pull/130780
___
cfe
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/129016
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/129016
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/129016
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27,6 +29,14 @@ void emitErrorReport(CheckerContext &C, const BugType &Bug,
}
}
+inline std::string getMemRegionName(const SVal &Val) {
steakhal wrote:
```suggestion
static std::string getMemRegionName(SVal Val) {
```
Have you considered using the Val.d
@@ -1199,4 +1204,4 @@ void ExprEngine::VisitLambdaExpr(const LambdaExpr *LE,
ExplodedNode *Pred,
// FIXME: Move all post/pre visits to ::Visit().
getCheckerManager().runCheckersForPostStmt(Dst, Tmp, LE, *this);
-}
steakhal wrote:
This seems like an unint
@@ -44,6 +54,21 @@ CREATE_EXPR_ENGINE_CHECKER(ExprEngineVisitPreChecker,
PreStmt, GCCAsmStmt,
CREATE_EXPR_ENGINE_CHECKER(ExprEngineVisitPostChecker, PostStmt, GCCAsmStmt,
"GCCAsmStmtBug")
+class MemAccessChecker : public Checker {
+public:
+ void c
https://github.com/steakhal requested changes to this pull request.
Thanks for the PR, it looks pretty good by the looks of it.
I had a couple nits inline though, check them out!
https://github.com/llvm/llvm-project/pull/129016
___
cfe-commits mailing
@@ -84,4 +118,24 @@ TEST(ExprEngineVisitTest, checkPostStmtGCCAsmStmt) {
EXPECT_EQ(Diags, "ExprEngineVisitPostChecker: checkPostStmt\n");
}
+TEST(ExprEngineVisitTest, checkLocationAndBind) {
+ std::string Diags;
+ EXPECT_TRUE(runCheckerOnCode(R"(
+class MyClass{
+p
@@ -69,14 +69,19 @@ void ExprEngine::performTrivialCopy(NodeBuilder &Bldr,
ExplodedNode *Pred,
assert(ThisRD);
SVal V = Call.getArgSVal(0);
+ const Expr *VExpr = Call.getArgExpr(0);
// If the value being copied is not unknown, load from its location to get
// an
@@ -69,14 +69,19 @@ void ExprEngine::performTrivialCopy(NodeBuilder &Bldr,
ExplodedNode *Pred,
assert(ThisRD);
SVal V = Call.getArgSVal(0);
+ const Expr *VExpr = Call.getArgExpr(0);
// If the value being copied is not unknown, load from its location to get
// an
@@ -0,0 +1,30 @@
+// RUN: %clang_analyze_cc1 -verify %s\
+// RUN: -analyzer-checker=core,debug.ExprInspection
+
+void clang_analyzer_eval(bool);
+
+using size_t = decltype(sizeof(int));
+
+template
+void escape(FirstT first, Rest... args);
+
+namespace CustomClassType {
+struct
https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/127702
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
FYI @necto @NagyDonat
https://github.com/llvm/llvm-project/pull/129224
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steakhal wrote:
Reopening this PR as #129234 as I accidentally closed this permanently.
https://github.com/llvm/llvm-project/pull/125348
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/steakhal created
https://github.com/llvm/llvm-project/pull/129234
This is the second attempt to bring initial support for [[assume()]] in the
Clang Static Analyzer.
The first attempt (#116462) was reverted in
2b9abf0db2d106c7208b4372e662ef5df869e6f1 due to some weird failure
2201 - 2300 of 2519 matches
Mail list logo