https://github.com/steakhal closed
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrlcpyStrlcatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-PathDiagnosticLocation::createBegin
@@ -393,20 +385,19 @@ class ExprEngine {
ProgramStateRef processAssume(ProgramStateRef state, SVal cond,
bool assumption);
- /// processRegionChanges - Called by ProgramStateManager whenever a change
is made
+ /// processRegionChanges - Cal
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrlcpyStrlcatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-PathDiagnosticLocation::createBegin
@@ -393,20 +385,19 @@ class ExprEngine {
ProgramStateRef processAssume(ProgramStateRef state, SVal cond,
bool assumption);
- /// processRegionChanges - Called by ProgramStateManager whenever a change
is made
+ /// processRegionChanges - Cal
@@ -219,17 +219,19 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrncatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-PathDiagnosticLocation::createBegin(LenArg
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -107,7 +107,8 @@ class CallDescription {
return CD1.matches(Call);
}
- /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &,
const CallDescription &)
+ /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &,
const
+ /// CallDes
https://github.com/pogo59 commented:
Would be good to feed back some of these examples to the RFC. Improving how
clang-format handles some of these cases (esp. the doxygen ones) would help
progress toward the goal.
https://github.com/llvm/llvm-project/pull/82599
___
steakhal wrote:
> (In case you do intend to merge changes related to formatting, consider
> adding the resulting commit hash into the blame-ignore file.)
I dont intend to merge this.
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mai
whisperity wrote:
(In case you do intend to merge changes related to formatting, consider adding
the resulting commit hash into the blame-ignore file.)
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm
steakhal wrote:
I've submitted PRs to resolve the pending formatting issues.
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,30 +33,17 @@ namespace ento {
/// checking.
///
/// \sa CheckerContext
-class CheckerDocumentation : public Checker< check::PreStmt,
- check::PostStmt,
- check::PreObjCMessage,
-
@@ -1,4 +1,5 @@
-//===-- STLAlgorithmModeling.cpp ---*- C++
-*--//
+//===-- STLAlgorithmModeling.cpp ---*- C++
+//-*--//
steakhal wrote:
```suggestion
//===-- STLAlgorithmModeling.cpp --
@@ -1,4 +1,5 @@
-//=- DirectIvarAssignment.cpp - Check rules on ObjC properties -*- C++
*-==//
+//=- DirectIvarAssignment.cpp - Check rules on ObjC properties -*- C++
+//*-==//
steakhal wrote:
Bad formatting.
```suggestion
//=- DirectIvarAssignment.cpp -
@@ -219,17 +219,19 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrncatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-PathDiagnosticLocation::createBegin(LenArg
@@ -110,21 +111,41 @@ void ExprEngine::VisitBinaryOperator(const
BinaryOperator* B,
continue;
}
-assert (B->isCompoundAssignmentOp());
+assert(B->isCompoundAssignmentOp());
switch (Op) {
- default:
-llvm_unreachable("Invalid opcode for co
@@ -49,54 +50,44 @@ const char *IsARPBind = "isautoreleasepoolbind";
class ObjCAutoreleaseWriteChecker : public Checker {
public:
- void checkASTCodeBody(const Decl *D,
-AnalysisManager &AM,
+ void checkASTCodeBody(const Decl *D, AnalysisManager &AM,
@@ -1,4 +1,5 @@
-//===-- SimpleStreamChecker.cpp -*-
C++ -*--//
+//===-- SimpleStreamChecker.cpp -*- C++
+//-*--//
steakhal wrote:
```suggestion
//===-- SimpleStreamChecker.cpp -
https://github.com/steakhal commented:
Yeey, my review is done.
We only have a handful (<50) debatable formatting problems.
I'll try to fix them in an other PR.
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@l
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) {
if (containsBadStrlcpyStrlcatPattern(CE)) {
const Expr *DstArg = CE->getArg(0);
const Expr *LenArg = CE->getArg(2);
- PathDiagnosticLocation Loc =
-PathDiagnosticLocation::createBegin
@@ -33,30 +33,17 @@ namespace ento {
/// checking.
///
/// \sa CheckerContext
-class CheckerDocumentation : public Checker< check::PreStmt,
- check::PostStmt,
- check::PreObjCMessage,
-
@@ -380,27 +376,41 @@ enum CFNumberType {
};
static std::optional GetCFNumberSize(ASTContext &Ctx, uint64_t i) {
- static const unsigned char FixedSize[] = { 8, 16, 32, 64, 32, 64 };
+ static const unsigned char FixedSize[] = {8, 16, 32, 64, 32, 64};
if (i < kCFNumberCh
@@ -18,37 +18,57 @@ using namespace til;
StringRef til::getUnaryOpcodeString(TIL_UnaryOpcode Op) {
switch (Op) {
-case UOP_Minus:return "-";
-case UOP_BitNot: return "~";
-case UOP_LogicNot: return "!";
+ case UOP_Minus:
+return "-";
+ case UOP_BitNot
@@ -535,7 +545,8 @@ void CFNumberChecker::checkPreStmt(const CallExpr *CE,
}
//===--===//
-// CFRetain/CFRelease/CFMakeCollectable/CFAutorelease checking for null
arguments.
+// CFRetain/CFRelease/CFMakeColl
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -565,37 +565,67 @@ til::SExpr *SExprBuilder::translateBinaryOperator(const
BinaryOperator *BO,
case BO_PtrMemI:
return new (Arena) til::Undefined(BO);
- case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx);
- case BO_Div: return translateBinOp(til::BOP_Div,
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -520,18 +518,19 @@ class TypedRegion : public SubRegion {
bool isBoundable() const override { return true; }
- static bool classof(const MemRegion* R) {
+ static bool classof(const MemRegion *R) {
unsigned k = R->getKind();
return k >= BEGIN_TYPED_REGIONS &&
@@ -128,14 +128,14 @@ enum TIL_CastOpcode : unsigned char {
CAST_objToPtr
};
-const TIL_Opcode COP_Min = COP_Future;
-const TIL_Opcode COP_Max = COP_Branch;
-const TIL_UnaryOpcode UOP_Min = UOP_Minus;
-const TIL_UnaryOpcode UOP_Max = UOP_LogicNot;
-const TI
@@ -28,29 +28,29 @@ namespace clang {
//===--===//
namespace dataflow {
- struct forward_analysis_tag {};
- struct backward_analysis_tag {};
+struct forward_analysis_tag {};
+struct backward_analysis_tag {}
@@ -1,4 +1,5 @@
-//===--- PathDiagnosticConsumers.h - Path Diagnostic Clients --*- C++
-*-===//
+//===--- PathDiagnosticConsumers.h - Path Diagnostic Clients --*- C++
+//-*-===//
steakhal wrote:
```suggestion
//===--- PathDiagnosticConsumers.h - Path Dia
@@ -393,20 +385,19 @@ class ExprEngine {
ProgramStateRef processAssume(ProgramStateRef state, SVal cond,
bool assumption);
- /// processRegionChanges - Called by ProgramStateManager whenever a change
is made
+ /// processRegionChanges - Cal
@@ -48,17 +48,26 @@ class ConstructionContextItem {
LLVM_DUMP_METHOD static StringRef getKindAsString(ItemKind K) {
switch (K) {
- case VariableKind:return "construct into local variable";
- case NewAllocatorKind:return "construct into new-a
@@ -145,7 +146,8 @@ class CallDescription {
return CD1.matchesAsWritten(CE);
}
- /// \copydoc clang::ento::CallDescription::matchesAnyAsWritten(const
CallExpr &, const CallDescription &)
+ /// \copydoc clang::ento::CallDescription::matchesAnyAsWritten(const CallExpr
+
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/82599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -898,18 +867,18 @@ class CFGBlock {
size_t getIndexInCFG() const;
- CFGElement front() const { return Elements.front(); }
- CFGElement back()const { return Elements.back();}
+ CFGElement front() const { return Elemen
@@ -1481,22 +1449,24 @@ class Return : public Terminator {
return Vs.reduceReturn(*this, Ne);
}
- template
- typename C::CType compare(const Return *E, C &Cmp) const {
+ template typename C::CType compare(const Return *E, C &Cmp) const {
return Cmp.compare(Retv
@@ -441,48 +419,79 @@ class PrettyPrinter {
// Return the precedence of a given node, for use in pretty printing.
unsigned precedence(const SExpr *E) {
switch (E->opcode()) {
- case COP_Future: return Prec_Atom;
- case COP_Undefined: return Prec_Atom;
-
@@ -107,7 +107,8 @@ class CallDescription {
return CD1.matches(Call);
}
- /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &,
const CallDescription &)
+ /// \copydoc clang::ento::CallDescription::matchesAny(const CallEvent &,
const
+ /// CallDes
@@ -188,88 +187,79 @@ struct ValueType {
inline ValueType::SizeType ValueType::getSizeType(unsigned nbytes) {
switch (nbytes) {
-case 1: return ST_8;
-case 2: return ST_16;
-case 4: return ST_32;
-case 8: return ST_64;
-case 16: return ST_128;
-defaul
@@ -1,15 +1,16 @@
-//ProgramStateTrait.h - Partial implementations of ProgramStateTrait -*- C++
-*-
+// ProgramStateTrait.h - Partial implementations of ProgramStateTrait -*- C++
+// -*-
//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
-// Se
https://github.com/steakhal commented:
Right now I don't have more time for this. I reached this part:
https://github.com/llvm/llvm-project/pull/82599/files#diff-e06d50a75016837f80877b3aae594298eeead1f2260da82167e74289beca116dL2563
So far I haven't found anything critical. Only a handful of lic
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff bc1c86b810e518a8e3fa90d5c26908c43788873d
c21867a39c74b23897158989081293558feb698c --
llvmbot wrote:
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Balazs Benics (steakhal)
Changes
I figured I could reformat all (cpp,h) files of CSA to see if anything would
need special formatting.
Let me know if you find debatable hunks.
clang-format version 19.0.0git (bc1c86b810e5
45 matches
Mail list logo