https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/103059
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/103059
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/103059
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat closed
https://github.com/llvm/llvm-project/pull/103059
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat approved this pull request.
Feel free to merge this if you're not planning more changes.
The commit seems to be reasonable, I like that your comments explain the logic
behind this very technical logic. I don't understand enough to recognize an
unhandled corner case
NagyDonat wrote:
@EugeneZelenko Thanks for inviting some additional reviewers. I'll add an entry
in the release notes.
https://github.com/llvm/llvm-project/pull/94356
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
NagyDonat wrote:
I analyzed several open source project with this check to observe the effects
of my commit and I was (pleasantly?) surprised to see that it detected some
ugly errors (despite the fact that the inputs are stable open source
projects...).
The following table compares the "old"
https://github.com/NagyDonat approved this pull request.
Perfectly normal NFC change, feel free to merge it (assuming that the tests
pass).
https://github.com/llvm/llvm-project/pull/94357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
@@ -292,11 +318,17 @@ void SizeofExpressionCheck::check(const
MatchFinder::MatchResult &Result) {
diag(E->getBeginLoc(),
"suspicious usage of 'sizeof(char*)'; do you mean 'strlen'?")
<< E->getSourceRange();
- } else if (const auto *E =
- R
https://github.com/NagyDonat updated
https://github.com/llvm/llvm-project/pull/94356
From c94feff726b48e7e3b5a46d5028cc5a6d0ac9beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Wed, 22 May 2024 11:57:50 +0200
Subject: [PATCH 1/2] [clang-tidy] Add WarnOnSizeOfPointer mode to
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/94356
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat updated
https://github.com/llvm/llvm-project/pull/94356
From c94feff726b48e7e3b5a46d5028cc5a6d0ac9beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Wed, 22 May 2024 11:57:50 +0200
Subject: [PATCH 1/3] [clang-tidy] Add WarnOnSizeOfPointer mode to
@@ -190,6 +190,15 @@ Options
.. option:: WarnOnSizeOfPointerToAggregate
- When `true`, the check will warn on an expression like
- ``sizeof(expr)`` where the expression is a pointer
- to aggregate. Default is `true`.
+ When `true`, the check will warn when the argumen
https://github.com/NagyDonat approved this pull request.
https://github.com/llvm/llvm-project/pull/94357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
NagyDonat wrote:
I re-ran the open source evaluation, and here is the clean diff that I promised
(italicized notes are just copied from the old table):
| Project | New Reports | Resolved Reports | Notes
|-|-|--|--|
| memcached | No reports | No repor
https://github.com/NagyDonat updated
https://github.com/llvm/llvm-project/pull/94356
From c94feff726b48e7e3b5a46d5028cc5a6d0ac9beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Wed, 22 May 2024 11:57:50 +0200
Subject: [PATCH 1/5] [clang-tidy] Add WarnOnSizeOfPointer mode to
https://github.com/NagyDonat updated
https://github.com/llvm/llvm-project/pull/94356
From c94feff726b48e7e3b5a46d5028cc5a6d0ac9beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Wed, 22 May 2024 11:57:50 +0200
Subject: [PATCH 1/6] [clang-tidy] Add WarnOnSizeOfPointer mode to
@@ -696,6 +732,69 @@ struct StreamOperationEvaluator {
} // end anonymous namespace
+//===--===//
+// Definition of NoStreamStateChangeVisitor.
+//===--
https://github.com/NagyDonat approved this pull request.
Nice improvement, LGTM overall. I only have one phrasing nitpick and one very
minor question about a tangential change.
https://github.com/llvm/llvm-project/pull/94957
___
cfe-commits mailing l
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/94957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -168,8 +193,9 @@ REGISTER_MAP_WITH_PROGRAMSTATE(StreamMap, SymbolRef,
StreamState)
namespace {
class StreamChecker;
-using FnCheck = std::function;
+using FnCheckTy = void(const StreamChecker *, const FnDescription *,
+ const CallEvent &,
@@ -302,7 +302,7 @@ void MangleContext::mangleBlock(const DeclContext *DC,
const BlockDecl *BD,
assert((isa(DC) || isa(DC)) &&
"expected a NamedDecl or BlockDecl");
if (isa(DC))
- for (; DC && isa(DC); DC = DC->getParent())
+ for (; isa_and_nonnull
https://github.com/NagyDonat approved this pull request.
LGTM as well, with two optional remarks.
https://github.com/llvm/llvm-project/pull/94987
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/94987
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2772,7 +2772,7 @@ fixVariable(const VarDecl *VD, FixitStrategy::Kind K,
// also covers call-operator of lamdas
isa(FD) ||
// skip when the function body is a try-block
-(FD->hasBody() && isa(FD->getBody())) ||
+isa_and_nonnull(FD->get
@@ -8510,7 +8510,8 @@ class MappableExprsHandler {
assert(VDecl == VD && "We got information for the wrong
declaration??");
assert(!Components.empty() &&
"Not expecting declaration with no component lists.");
-if (VD && E && VD->getType()
NagyDonat wrote:
I evaluated the effects of the additional change [Generalize the suppression to
all sizeof(array[0])
expressions](https://github.com/llvm/llvm-project/pull/94356/commits/ce3a37610228ceb9a9e60575f87886bf8e183493)
compared to the earlier version of this PR, and it seems that thi
https://github.com/NagyDonat approved this pull request.
https://github.com/llvm/llvm-project/pull/95071
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/94356
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/94356
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/94356
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat closed
https://github.com/llvm/llvm-project/pull/94356
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat created
https://github.com/llvm/llvm-project/pull/95118
The checker `alpha.core.SizeofPtr` was a very simple checker that did not rely
on path sensitive analysis and was very similar to the (more complex and
refined) clang-tidy check `bugprone-sizeof-expression`.
NagyDonat wrote:
Minor correction: in the commit message I accidentally wrote
`alpha.core.SizeofPointer` instead of `alpha.core.SizeofPtr`. (Fortunately this
difference is mostly academical, because my followup commit will remove that
checker.)
https://github.com/llvm/llvm-project/pull/94356
NagyDonat wrote:
> We should remember to mention this transfer explicitly in the release notes
> one day.
Yes, I'll try to remember it. By the way, it is already mentioned in the
clang-tidy release notes (apparently there the release notes are kept in sync
with active development), but it's d
https://github.com/NagyDonat closed
https://github.com/llvm/llvm-project/pull/95118
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat approved this pull request.
LGTM. I didn't deeply analyze all the small details of the commit, but it is
clearly NFC (builds better infrastructure for follow-up commits), the
implementation is clear and elegant (slightly better quality than what I can
write) and th
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -434,6 +447,12 @@ class SMTSolver {
virtual bool isFPSupported() = 0;
virtual void print(raw_ostream &OS) const = 0;
+
+ /// Sets the requested option.
+ virtual void setBoolParam(StringRef Key, bool Value) = 0;
+ virtual void setUnsignedParam(StringRef Key, unsigned
@@ -434,6 +447,12 @@ class SMTSolver {
virtual bool isFPSupported() = 0;
virtual void print(raw_ostream &OS) const = 0;
+
+ /// Sets the requested option.
+ virtual void setBoolParam(StringRef Key, bool Value) = 0;
+ virtual void setUnsignedParam(StringRef Key, unsigned
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26,16 +50,12 @@ void top(char *dst) {
void *mempcpy(void *restrict s1, const void *restrict s2, size_t n);
-void mempcpy14() {
+void mempcpy13() {
int src[] = {1, 2, 3, 4};
int dst[5] = {0};
int *p;
- p = mempcpy(dst, src, 4 * sizeof(int)); // expected-warning
https://github.com/NagyDonat commented:
Overall I'm satisfied with this commit, but I have some minor remarks.
I'm publishing some review comments now, but I'll continue the review tomorrow.
https://github.com/llvm/llvm-project/pull/95408
___
cfe-comm
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
@@ -413,38 +588,18 @@ ProgramStateRef
CStringChecker::CheckLocation(CheckerContext &C,
if (!ER)
return state;
- SValBuilder &svalBuilder = C.getSValBuilder();
- ASTContext &Ctx = svalBuilder.getContext();
-
// Get the index of the accessed element.
- NonLoc Idx =
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
NagyDonat wrote:
> Please have a second look at the llvm-related changes. Z3 has a really
> dangerous C API. I shot myself in the foot literally 3 times while working on
> this PR.
> And btw notice that I removed the proof=false configuration as that is the
> default AFAIK, so that's why that
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
@@ -413,38 +588,18 @@ ProgramStateRef
CStringChecker::CheckLocation(CheckerContext &C,
if (!ER)
return state;
- SValBuilder &svalBuilder = C.getSValBuilder();
- ASTContext &Ctx = svalBuilder.getContext();
-
// Get the index of the accessed element.
- NonLoc Idx =
@@ -26,16 +50,12 @@ void top(char *dst) {
void *mempcpy(void *restrict s1, const void *restrict s2, size_t n);
-void mempcpy14() {
+void mempcpy13() {
NagyDonat wrote:
Why are you renaming this to `memcpy13`? I see only two `memcpy` tests after
this and the
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat commented:
I read the rest of the commit and only found two very minor observations.
https://github.com/llvm/llvm-project/pull/95408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
@@ -413,38 +588,18 @@ ProgramStateRef
CStringChecker::CheckLocation(CheckerContext &C,
if (!ER)
return state;
- SValBuilder &svalBuilder = C.getSValBuilder();
- ASTContext &Ctx = svalBuilder.getContext();
-
// Get the index of the accessed element.
- NonLoc Idx =
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -50,16 +45,17 @@ void Z3ErrorHandler(Z3_context Context, Z3_error_code
Error) {
/// Wrapper for Z3 context
class Z3Context {
NagyDonat wrote:
Another class that manages a resource in a destructor, but does not handle
copy/move assignment/construction.
htt
https://github.com/NagyDonat commented:
I tried to review the resource management code thoroughly, but I admit that I'm
not skilled in this area -- I'm used to working in modern C++ and Python where
these footguns are less relevant.
I found two classed that (if I understand correctly) violate
@@ -26,17 +28,10 @@ namespace {
class Z3Config {
NagyDonat wrote:
If I understand it correctly, rule of three/five dictates that the copy/move
assignment/construction of this class needs to be handled (or deleted).
https://github.com/llvm/llvm-project/pull/951
NagyDonat wrote:
This commit is motivated by the discussion on
https://github.com/llvm/llvm-project/pull/94356 .
Feel free to bikeshed the messages, I'm not too attached to the new choices,
I'm just unsatisfied with the old ones.
https://github.com/llvm/llvm-project/pull/95550
___
https://github.com/NagyDonat created
https://github.com/llvm/llvm-project/pull/95550
...becasue they were strangely worded and in a few cases outright incorrect.
From 06adc063c2388ea534537f5a417751fdf64b22cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Fri, 14 Jun 2024 15
NagyDonat wrote:
> Consider replacing ":" separator with ","
I switched to ":" (instead of the ";" that was used previously) to emphasize
that the second part of the message is an explanation/reason for the first part
(and not a second, separate issue). However I can switch to "," or ";" if th
https://github.com/NagyDonat approved this pull request.
Nice catch, thanks for fixing this bug!
https://github.com/llvm/llvm-project/pull/95729
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
@@ -441,6 +441,7 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const {
CASE( 4, 'e', 's', else);
CASE( 4, 'l', 'n', line);
CASE( 4, 's', 'c', sccs);
+ CASE(5, 'e', 'b', embed);
NagyDonat wrote:
```suggestion
CASE( 5, 'e', 'b', embed);
```
Jus
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat commented:
Looks good overall, I have one remark about a rare case that would require some
specialized code.
https://github.com/llvm/llvm-project/pull/95899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
@@ -144,9 +144,24 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator
*B,
// Allow arithmetic on different symbolic regions.
if (isa(SuperLR) || isa(SuperRR))
return;
+if (const auto *SuperDLR = dyn_cast(SuperLR))
+ DiffDeclL = SuperDLR->getDecl
NagyDonat wrote:
If there is no feedback on the separator mark bikeshedding (which is
understandable -- it's a very minor question), I'll merge this commit on
Thursday.
https://github.com/llvm/llvm-project/pull/95550
___
cfe-commits mailing list
cfe-
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat approved this pull request.
LGTM, thanks for the update. I added two minor edit suggestions, but after that
the commit can be merged.
https://github.com/llvm/llvm-project/pull/95899
___
cfe-commits mailing list
cfe-commits
@@ -154,12 +154,14 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator
*B,
auto R =
std::make_unique(BT, Msg_MemRegionDifferent,
N);
R->addRange(B->getSourceRange());
-if (DiffDeclL)
- R->addNote("Array at the left-hand side of subtraction",
@@ -32,3 +32,20 @@ void different_2() {
int d = p2 - p1; // expected-warning{{Subtraction of two pointers that do
not point into the same array is undefined behavior}} \
// expected-note{{Subtraction of two pointers that do not
point into the same array is
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SValBuilder = St
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat requested changes to this pull request.
Thanks for the updates!
Unfortunately, as I dug deeper into your function `getOriginRegion()`, I
realized that it is logically incorrect (see inline comment for explanation).
(I was a bit suspicious during the earlier reviews
@@ -393,6 +401,162 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SVB = State->get
@@ -393,6 +401,162 @@ ProgramStateRef
CStringChecker::checkNonNull(CheckerContext &C,
return stateNonNull;
}
+static std::optional getIndex(ProgramStateRef State,
+ const ElementRegion *ER, CharKind CK) {
+ SValBuilder &SVB = State->get
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/95408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -461,7 +446,7 @@ ProgramStateRef CStringChecker::checkInit(CheckerContext &C,
if (!ER)
return State;
- const TypedValueRegion *Orig = getOriginRegion(ER);
+ const auto *Orig = ER->getSuperRegion()->getAs();
NagyDonat wrote:
Nitpick: also change the
@@ -342,31 +342,33 @@ void SizeofExpressionCheck::check(const
MatchFinder::MatchResult &Result) {
if (DenominatorSize > CharUnits::Zero() &&
!NumeratorSize.isMultipleOf(DenominatorSize)) {
- diag(E->getOperatorLoc(), "suspicious usage of
'sizeof(...)/sizeof(
@@ -342,31 +342,33 @@ void SizeofExpressionCheck::check(const
MatchFinder::MatchResult &Result) {
if (DenominatorSize > CharUnits::Zero() &&
!NumeratorSize.isMultipleOf(DenominatorSize)) {
- diag(E->getOperatorLoc(), "suspicious usage of
'sizeof(...)/sizeof(
NagyDonat wrote:
@PiotrZSL I see, thanks for the explanation, the "colons may confuse parsers"
question is a good point. I think I'll return to using semicolons, because
that's what was used before my commit.
https://github.com/llvm/llvm-project/pull/95550
_
https://github.com/NagyDonat updated
https://github.com/llvm/llvm-project/pull/95550
From 06adc063c2388ea534537f5a417751fdf64b22cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Fri, 14 Jun 2024 15:16:34 +0200
Subject: [PATCH 1/2] [clang-tidy] Clarify diagnostics of
bugpron
https://github.com/NagyDonat updated
https://github.com/llvm/llvm-project/pull/95550
From 06adc063c2388ea534537f5a417751fdf64b22cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?=
Date: Fri, 14 Jun 2024 15:16:34 +0200
Subject: [PATCH 1/3] [clang-tidy] Clarify diagnostics of
bugpron
@@ -342,31 +342,33 @@ void SizeofExpressionCheck::check(const
MatchFinder::MatchResult &Result) {
if (DenominatorSize > CharUnits::Zero() &&
!NumeratorSize.isMultipleOf(DenominatorSize)) {
- diag(E->getOperatorLoc(), "suspicious usage of
'sizeof(...)/sizeof(
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/96295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -420,21 +420,52 @@ around, such as ``std::string_view``.
cplusplus.Move (C++)
-Method calls on a moved-from object and copying a moved-from object will be
reported.
-
+Find use-after-move bugs in C++. This includes method calls on moved-from
+objects,
https://github.com/NagyDonat approved this pull request.
LGTM, thanks for updating the docs!
I only have one minor inline remark about formatting.
https://github.com/llvm/llvm-project/pull/96295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/96295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat edited
https://github.com/llvm/llvm-project/pull/92420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/NagyDonat approved this pull request.
I'd say that the commit is acceptable as it is now, but I added several inline
comments for minor prettification issues.
https://github.com/llvm/llvm-project/pull/92420
___
cfe-commits mailing l
@@ -938,6 +938,53 @@ optin.portability.UnixAPI
"
Finds implementation-defined behavior in UNIX/Posix functions.
+.. _optin-taint-TaintAlloc:
+
+optin.taint.TaintAlloc (C, C++)
+"""
+
+This checker warns for cases when the ``s
@@ -938,6 +938,53 @@ optin.portability.UnixAPI
"
Finds implementation-defined behavior in UNIX/Posix functions.
+.. _optin-taint-TaintAlloc:
+
+optin.taint.TaintAlloc (C, C++)
+"""
+
+This checker warns for cases when the ``s
@@ -938,6 +938,53 @@ optin.portability.UnixAPI
"
Finds implementation-defined behavior in UNIX/Posix functions.
+.. _optin-taint-TaintAlloc:
+
+optin.taint.TaintAlloc (C, C++)
+"""
+
+This checker warns for cases when the ``s
@@ -1779,18 +1797,76 @@ ProgramStateRef
MallocChecker::MallocMemAux(CheckerContext &C,
const CallEvent &Call,
const Expr *SizeEx, SVal Init,
Prog
@@ -1779,18 +1797,76 @@ ProgramStateRef
MallocChecker::MallocMemAux(CheckerContext &C,
const CallEvent &Call,
const Expr *SizeEx, SVal Init,
Prog
101 - 200 of 1140 matches
Mail list logo