https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/69985
>From bf169f3d79f8a5b0658d9e060ddd6c3e773b979a Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 23 Oct 2023 16:38:10 -0700
Subject: [PATCH] Fix WebKit static analyzers to support ref and deref methods
to be d
@@ -77,14 +77,53 @@ class RefCntblBaseVirtualDtorChecker
(AccSpec == AS_none && RD->isClass()))
return false;
- std::optional RefCntblBaseRD =
isRefCountable(Base);
- if (!RefCntblBaseRD || !(*RefCntblBaseRD))
+ auto hasRef
rniwa wrote:
Yes, it would be great if you can merge the change now that I've addressed your
nits.
https://github.com/llvm/llvm-project/pull/69985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80810
>From e179bbef69084caac3948977a7091332c69130f5 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 01:13:34 -0800
Subject: [PATCH] Ignore assignment to Ref / RefPtr in
alpha.webkit.UncountedCallArgsCh
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/80919
This accessor returns a pointer from Ref type and is therefore safe.
>From 63a64cf22e5e470db3426688a2517c2fef64fd46 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 17:56:01 -0800
Subject: [PATCH]
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/70124
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80919
>From b117f4c8247a14a02ddb2cc89493a54a6dd3815e Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 17:56:01 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add the support for
calling R
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/80934
The bug was caused by isRefCountable erroneously returning false for a class
with both ref() and deref() functions defined because we were not resetting the
base paths results between looking for "ref()" and "deref
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80934
>From 9154815c48578df9ee384a9707dd79ee64259cea Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 20:10:33 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Fix an implicit cast
to a bas
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/80956
This PR aligns the evaluation of default arguments with other kinds of
arguments by extracting the expressions within them as argument values to be
evaluated.
>From 9d3f7377901539abeef949c1b33a99b1278900d8 Mon Sep
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80956
>From bc390afd3a2e9de6e2a883205ce3862e45d26e06 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 7 Feb 2024 00:57:00 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow default
arguments to be
@@ -0,0 +1,86 @@
+// RUN: %clang_analyze_cc1
-analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
+// expected-no-diagnostics
+
+template
+class Ref {
rniwa wrote:
Sure.
https://github.com/llvm/llvm-project/pull/80919
_
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80919
>From 26f23953843b7c79664c7e721c3cbf130be405c0 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 17:56:01 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add the support for
calling R
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80919
>From 6476d4cbca68815a96cea56519e3f5c75b4f9738 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 17:56:01 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add the support for
calling R
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80810
>From e179bbef69084caac3948977a7091332c69130f5 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 01:13:34 -0800
Subject: [PATCH 1/2] Ignore assignment to Ref / RefPtr in
alpha.webkit.UncountedCallAr
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80934
>From 9154815c48578df9ee384a9707dd79ee64259cea Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 20:10:33 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Fix an implicit
cast to a
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80956
>From bc390afd3a2e9de6e2a883205ce3862e45d26e06 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 7 Feb 2024 00:57:00 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Allow default
arguments t
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81400
This PR makes alpha.webkit.UncountedCallArgsChecker eplicitly check the safety
of the object argument in a member function call. It also removes the exemption
of local variables from this checker so that each local
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400
>From 16d5c240639cdf25b824f5a1a60c256d33fe3565 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 11 Feb 2024 00:07:30 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Check the safety of
the obje
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400
>From c8ac9ad6ecd95a3dbd023458a572b08a4664de03 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 11 Feb 2024 00:07:30 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Check the safety of
the obje
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400
>From 04e18254efc4f671e0bbd9625c7e994fe47c1636 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 11 Feb 2024 00:07:30 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Check the safety of
the obje
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81527
Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call.
>From c67d64d7ca5885b03b6e0738d5e237ccbd3ed38a Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 12 Feb 2024 12:31:37 -0800
Subje
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81527
>From 7596e70e7ed63d881d4754f3f18b9e01f38f176f Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 12 Feb 2024 12:31:37 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe
function
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/81527
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81532
Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call.
>From 7596e70e7ed63d881d4754f3f18b9e01f38f176f Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 12 Feb 2024 12:31:37 -0800
Subje
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81532
>From 9a25673cf0c585b1d13e54b1b836edaae1a1ca2c Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 12 Feb 2024 12:31:37 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe
function
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81532
>From 52b6e959d69a96704ec2a403131627049a782352 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 12 Feb 2024 12:31:37 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe
function
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81580
This PR makes the checker not emit warning when a function is called with a
return value of another function when the return value is of type Ref or
RefPtr.
>From 52b6e959d69a96704ec2a403131627049a782352 Mon Sep 1
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81580
>From 51fb3aa575c4509d4b4199d16d10e05281f911ac Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 13 Feb 2024 00:35:36 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect a return value
of Ref
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81580
>From 478c7d2c0bb902b829d522fc483e68b8e36489ea Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 13 Feb 2024 00:35:36 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect a return value
of `Re
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81580
>From 24fc75756094d36e72c69805c9d476d8144ed869 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 13 Feb 2024 00:35:36 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect a return value
of `Re
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81580
>From 24fc75756094d36e72c69805c9d476d8144ed869 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 13 Feb 2024 00:35:36 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Detect a return
value of
@@ -118,6 +118,26 @@ bool isCtorOfRefCounted(const clang::FunctionDecl *F) {
|| FunctionName == "Identifier";
}
+bool isReturnValueRefCounted(const clang::FunctionDecl *F) {
+ assert(F);
+ auto *type = F->getReturnType().getTypePtrOrNull();
+ while (type) {
+if
@@ -70,6 +70,15 @@ class UncountedCallArgsChecker
// or std::function call operator).
unsigned ArgIdx = isa(CE) &&
isa_and_nonnull(F);
+ if (auto *MemberCallExpr = dyn_cast(CE)) {
+auto *E = MemberCallExpr->getImplicitObjectArgument();
+auto *
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400
>From 04e18254efc4f671e0bbd9625c7e994fe47c1636 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 11 Feb 2024 00:07:30 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Check the safety
of the
@@ -183,6 +196,22 @@ class UncountedCallArgsChecker
Report->addRange(CallArg->getSourceRange());
BR->emitReport(std::move(Report));
}
+
+ void reportBugOnThis(const Expr *CallArg) const {
+assert(CallArg);
+
+SmallString<100> Buf;
+llvm::raw_svector_ostre
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400
>From 6f94c583f5201fbd73156969fa410669d6e1be93 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 13 Feb 2024 20:05:18 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Check the safety
of the
rniwa wrote:
Rebased.
https://github.com/llvm/llvm-project/pull/81400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400
>From 6f94c583f5201fbd73156969fa410669d6e1be93 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 13 Feb 2024 20:05:18 -0800
Subject: [PATCH 1/3] [alpha.webkit.UncountedCallArgsChecker] Check the safety
of the
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/7] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
@@ -474,4 +504,22 @@ bool TrivialFunctionAnalysis::isTrivialImpl(
return Result;
}
+bool TrivialFunctionAnalysis::isTrivialImpl(
+const Stmt *S, TrivialFunctionAnalysis::CacheTy &Cache) {
+ // If the statement isn't in the cache, conservatively assume that
+ // it's no
@@ -189,18 +202,16 @@ class UncountedLocalVarsChecker
dyn_cast_or_null(Ref->getFoundDecl())) {
const auto *MaybeGuardianArgType =
MaybeGuardian->getType().getTypePtr();
- if (!MaybeGuardianArgType)
-return;
-
@@ -189,18 +202,16 @@ class UncountedLocalVarsChecker
dyn_cast_or_null(Ref->getFoundDecl())) {
const auto *MaybeGuardianArgType =
MaybeGuardian->getType().getTypePtr();
- if (!MaybeGuardianArgType)
-return;
-
rniwa wrote:
Actually, we need to cache the results for `VisitDeclRefExpr` as well to avoid
infinite recursion.
https://github.com/llvm/llvm-project/pull/82229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/8] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
@@ -305,19 +337,21 @@ class TrivialFunctionAnalysisVisitor
}
bool VisitDeclRefExpr(const DeclRefExpr *DRE) {
-if (auto *decl = DRE->getDecl()) {
- if (isa(decl))
-return true;
- if (isa(decl))
-return true;
- if (auto *VD = dyn_cast(decl)
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/9] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/82229
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/82305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rniwa wrote:
So this PR turned out to be not really correct because we can't get rid of
local variable checker when calling a non-trivial function.
https://github.com/llvm/llvm-project/pull/82305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
rniwa wrote:
haha, sorry for the confusion. I don't have any outstanding PR at this point.
Thanks for all the reviews :)
https://github.com/llvm/llvm-project/pull/82305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
rniwa wrote:
Thanks for the review!
https://github.com/llvm/llvm-project/pull/82291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82291
>From 0a8cfb11a601e7a6ec59489b8ac15c40136002b2 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sat, 17 Feb 2024 18:12:16 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow a variable
declaration
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/82291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 099640652b62c52160b12542a16eb66da90cfc93 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 099640652b62c52160b12542a16eb66da90cfc93 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
@@ -70,15 +71,27 @@ bool isSingleton(const FunctionDecl *F);
class TrivialFunctionAnalysis {
public:
/// \returns true if \p D is a "trivial" function.
- bool isTrivial(const Decl *D) const { return isTrivialImpl(D, TheCache); }
+ bool isTrivial(const Decl *D) const {
+
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From fd171b82d03b29926984b5b835ad9c0ccf197536 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/3] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From fd171b82d03b29926984b5b835ad9c0ccf197536 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/4] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
@@ -171,6 +151,24 @@ class UncountedLocalVarsChecker
std::optional IsUncountedPtr = isUncountedPtr(ArgType);
if (IsUncountedPtr && *IsUncountedPtr) {
+
+ ASTContext &ctx = V->getASTContext();
+ for (DynTypedNodeList ancestors = ctx.getParents(*V); !ancestors.
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From fd171b82d03b29926984b5b835ad9c0ccf197536 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/5] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From fd171b82d03b29926984b5b835ad9c0ccf197536 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/5] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/5] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229
>From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 19 Feb 2024 01:07:13 -0800
Subject: [PATCH 1/6] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted
object
@@ -253,6 +253,17 @@ class TrivialFunctionAnalysisVisitor
return true;
}
+ template
+ bool WithCachedResult(const StmtType *S, CheckFunction Function) {
rniwa wrote:
Good point. Changed.
https://github.com/llvm/llvm-project/pull/82229
__
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/80768
None
>From 4e10436ddd55f1b1bed2bb99856e1101b9462117 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 5 Feb 2024 16:07:09 -0800
Subject: [PATCH] Fix a crash in clang::isGetterOfRefCounted by checking
nullptr
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80768
>From f9f11843c2d09775de20d47dc71c5e482a1ff8b4 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 5 Feb 2024 16:07:09 -0800
Subject: [PATCH] Fix a crash in clang::isGetterOfRefCounted by checking
nullptr in try
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/80810
None
>From 81057ef7e57f0e61d4b3edb19a7e6dc2b196b824 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 6 Feb 2024 01:13:34 -0800
Subject: [PATCH] Ignore assignment to Ref / RefPtr in
alpha.webkit.UncountedCall
@@ -70,29 +88,45 @@ std::optional isRefCountable(const CXXRecordDecl* R)
if (!R)
return std::nullopt;
- if (hasPublicRefAndDeref(R))
+ bool hasRef = hasPublicRefMethod(R);
+ bool hasDeref = hasPublicDerefMethod(R);
+ if (hasRef && hasDeref)
return true;
CXX
@@ -18,24 +18,26 @@ using namespace clang;
namespace {
-bool hasPublicRefAndDeref(const CXXRecordDecl *R) {
+bool hasPublicRefMethod(const CXXRecordDecl *R) {
assert(R);
assert(R->hasDefinition());
- bool hasRef = false;
- bool hasDeref = false;
for (const CXXMet
@@ -44,9 +46,25 @@ bool hasPublicRefAndDeref(const CXXRecordDecl *R) {
namespace clang {
-std::optional
-isRefCountable(const CXXBaseSpecifier* Base)
-{
+std::optional
+hasPublicRefInBase(const CXXBaseSpecifier *Base) {
+ assert(Base);
+
+ const Type *T = Base->getType().ge
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/69985
None
>From d8236358e137967dbbd63606b7d43983709597e8 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 23 Oct 2023 16:38:10 -0700
Subject: [PATCH] Fix WebKit static analyzers to support ref and deref methods
t
rniwa wrote:
I couldn't take over this PR so I made a new PR at
https://github.com/llvm/llvm-project/pull/69985.
https://github.com/llvm/llvm-project/pull/68170
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/69985
>From 1832737f3e198386d1ebdeccd7d0ca55ef6094c0 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 23 Oct 2023 16:38:10 -0700
Subject: [PATCH] Fix WebKit static analyzers to support ref and deref methods
to be d
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/70124
None
>From 3b420fcb0a6d74dc034cfdf2d7b28e13e75f0e08 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Tue, 24 Oct 2023 13:51:50 -0700
Subject: [PATCH] Add a new attribute value for suppressing WebKit's unsafe
memb
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81808
This PR introduces the concept of a "trivial function" which applies to a
function that only calls other trivial functions and contain literals and
expressions that don't result in heap mutations (specifically it d
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808
>From 5a5b26fc3ed2c1c263cd3495b8844e2daeb2e54b Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 16:21:33 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore
trivial func
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808
>From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 16:21:33 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore
trivial func
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808
>From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 16:21:33 -0800
Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore
trivial
@@ -222,4 +223,210 @@ bool isPtrConversion(const FunctionDecl *F) {
return false;
}
+bool isSingleton(const FunctionDecl *F) {
+ assert(F);
+ // FIXME: check # of params == 1
+ if (auto *MethodDecl = dyn_cast(F)) {
+if (!MethodDecl->isStatic())
+ return false;
+
@@ -222,4 +223,210 @@ bool isPtrConversion(const FunctionDecl *F) {
return false;
}
+bool isSingleton(const FunctionDecl *F) {
+ assert(F);
+ // FIXME: check # of params == 1
+ if (auto *MethodDecl = dyn_cast(F)) {
+if (!MethodDecl->isStatic())
+ return false;
+
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808
>From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 16:21:33 -0800
Subject: [PATCH 1/3] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore
trivial
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808
>From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 16:21:33 -0800
Subject: [PATCH 1/4] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore
trivial
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808
>From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 16:21:33 -0800
Subject: [PATCH 1/5] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore
trivial
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81829
Allow address-of operator (&), enum constant, and a reference to constant as
well as materializing temporqary expression and an expression with cleanups to
appear within a trivial function.
>From 793c72168db3a27ad
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81829
>From 382ce72e206ca80e3414d5a141afa0f4f8b8 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 23:30:27 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial
function
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81829
>From 382ce72e206ca80e3414d5a141afa0f4f8b8 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 23:30:27 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial
function
rniwa wrote:
> @rniwa the test you modified in this change seems to be failing on at least
> one bot. Can you take a look or revert if you need time to investigate?
>
> https://lab.llvm.org/buildbot/#/builders/123/builds/25095
Oh, interesting. I suppose this is due to:
```
# | error: 'expected
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81903
None
>From e3a45512e1a10c341b7172ddd3c2c8d42368110b Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Thu, 15 Feb 2024 10:58:13 -0800
Subject: [PATCH] Fix uncounted-obj-arg.cpp for Windows.
---
clang/test/Analysi
rniwa wrote:
Fixing the test in https://github.com/llvm/llvm-project/pull/81903
https://github.com/llvm/llvm-project/pull/81808
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81829
>From 382ce72e206ca80e3414d5a141afa0f4f8b8 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Wed, 14 Feb 2024 23:30:27 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial
function
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/81829
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/82063
None
>From ddaf7bf835668b761e82c25232f2e281a002ff78 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Fri, 16 Feb 2024 14:54:55 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and
atomi
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063
>From 69a593fc7a7e0c18bd2545353772d5da5588c1bb Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Fri, 16 Feb 2024 14:54:55 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and
atomic oper
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063
>From 8d304967acfd0881a4844d630dab5f954772490c Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Fri, 16 Feb 2024 14:54:55 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and
atomic oper
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063
>From c46f11b98f8ec159a19004952fb67705eb0988dd Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Fri, 16 Feb 2024 14:54:55 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and
atomic oper
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/82156
This PR makes the checker ignore / skip calls to methods of Web Template
Platform's container types such as HashMap, HashSet, WeakHashSet, WeakHashMap,
Vector, etc...
>From 907c06c6675ae2ca06ec70e005966b2bdd7125c1
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/82209
This PR adds the support for WebKit's RefAllowingPartiallyDestroyed and
RefPtrAllowingPartiallyDestroyed, which are smart pointer types which may be
used after the destructor had started running.
>From d26f41816f4
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82156
>From 51b65a767eee7bae07932c073702502a701d4ef2 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 18 Feb 2024 01:32:00 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's
contai
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82156
>From d169fddf3896bd334bc4776059258116ac08096a Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Sun, 18 Feb 2024 01:32:00 -0800
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's
contai
1 - 100 of 620 matches
Mail list logo