https://github.com/shafik approved this pull request.
LGTM but we need a release note.
https://github.com/llvm/llvm-project/pull/157139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6007,10 +6007,9 @@ bool Parser::isConstructorDeclarator(bool IsUnqualified,
bool DeductionGuide,
// A C++11 attribute here signals that we have a constructor, and is an
// attribute on the first constructor parameter.
- if (getLangOpts().CPlusPlus11 &&
- isCXX11
https://github.com/shafik commented:
Mostly minor comments
https://github.com/llvm/llvm-project/pull/156075
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -167,6 +167,9 @@ void dereference_reinterpret_cast() {
(void)reinterpret_cast(d); // expected-warning {{reinterpret_cast
from 'double' to 'float &' has undefined behavior}}
(void)*reinterpret_cast(&d); // expected-warning {{dereference of
type 'float *' that was reint
https://github.com/shafik commented:
Please add a release note.
https://github.com/llvm/llvm-project/pull/157033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
> This only changes debugging output so there are no tests for it.
So it looks like this output is only used for `dump()` functions, makes sense.
https://github.com/llvm/llvm-project/pull/156858
___
cfe-commits mailing list
cfe-commits@l
https://github.com/shafik commented:
I am a surprised there are not changed tests nor additional test given the
problem description. It would seem we are avoiding output in a specific format.
We should have a test in which the output would differ w/o this change.
https://github.com/llvm/llvm-
shafik wrote:
What is an Itor cast?
https://github.com/llvm/llvm-project/pull/156669
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -431,6 +435,30 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() {
OK_Ordinary);
}
+template
+BuiltinTypeMethodBuilder &
+BuiltinTypeMethodBuilder::getResourceHandle(T ResourceRecord) {
+ ensureCompleteDecl();
+
+ Expr *Resour
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/156075
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -676,6 +704,44 @@
BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() {
.finalize();
}
+BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addCopyConstructor() {
+ if (Record->isCompleteDefinition())
+return *this;
+
+ ASTContext &AST = SemaRef.getAS
@@ -676,6 +704,44 @@
BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() {
.finalize();
}
+BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addCopyConstructor() {
+ if (Record->isCompleteDefinition())
+return *this;
+
+ ASTContext &AST = SemaRef.getAS
@@ -431,6 +435,30 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() {
OK_Ordinary);
}
+template
+BuiltinTypeMethodBuilder &
+BuiltinTypeMethodBuilder::getResourceHandle(T ResourceRecord) {
+ ensureCompleteDecl();
+
+ Expr *Resour
shafik wrote:
This feels like a regression, unless you think the bug is elsewhere and the
assert just catches it now:
https://github.com/llvm/llvm-project/issues/156458#issuecomment-3246453958
https://github.com/llvm/llvm-project/pull/147835
___
cfe-
https://github.com/shafik approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/156094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wconditional-scope %s
+
+int *get_something();
+int *get_something_else();
+int *get_something_else_again();
+
+int test() {
+ if (int *ptr = get_something()) {
+return ptr[0] * ptr[0];
+ }
+ else if (int *ptr2 = g
shafik wrote:
I don't have further comments, @erichkeane are you good?
https://github.com/llvm/llvm-project/pull/151400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -194,6 +194,11 @@ namespace ModifyingCapture {
[=] {
n = 1; // expected-error {{cannot assign to a variable captured by copy
in a non-mutable lambda}}
};
+const int cn = 0;
shafik wrote:
I think we should have also tested a `constexpr` va
@@ -84,6 +85,111 @@ void addRootSignature(llvm::dxbc::RootSignatureVersion
RootSigVer,
RootSignatureValMD->addOperand(MDVals);
}
+// Find array variable declaration from nested array subscript AST nodes
+static const ValueDecl *getArrayDecl(const ArraySubscriptExpr *ASE) {
shafik wrote:
This change is linked to the following regression:
https://github.com/llvm/llvm-project/issues/156232
Please fix asap
https://github.com/llvm/llvm-project/pull/155839
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
@@ -986,6 +989,10 @@ def warn_module_conflict : Warning<
InGroup;
// C++20 modules
+def err_module_decl_in_header
+: Error<"module declaration must not come from an #include directive">;
shafik wrote:
I don't see a test that covers this or the next diag
@@ -1775,10 +1775,18 @@ def ext_bit_int : Extension<
} // end of Parse Issue category.
let CategoryName = "Modules Issue" in {
-def err_unexpected_module_decl : Error<
- "module declaration can only appear at the top level">;
+def err_invalid_module_or_import_directive : Erro
@@ -513,14 +513,65 @@ llvm::Type *CommonSPIRTargetCodeGenInfo::getHLSLType(
return nullptr;
}
+static unsigned
+getImageFormat(const LangOptions &LangOpts,
+ const HLSLAttributedResourceType::Attributes &attributes,
+ llvm::Type *SampledType, Qual
https://github.com/shafik commented:
I would have expected additional test coverage since this looks like it would
change behavior for out of bound shift amounts.
https://github.com/llvm/llvm-project/pull/156019
___
cfe-commits mailing list
cfe-commit
@@ -873,6 +875,27 @@ static_assert(__builtin_elementwise_min(1, 2) == 1);
static_assert(__builtin_elementwise_min(-1, 1) == -1);
static_assert(__builtin_elementwise_min(1U, 2U) == 1U);
static_assert(__builtin_elementwise_min(~0U, 0U) == 0U);
+static_assert(__builtin_fabs(__buil
@@ -11599,6 +11599,89 @@ static bool handleVectorElementCast(EvalInfo &Info,
const FPOptions FPO,
return false;
}
+enum class PackKind {
+ SSWB,
+ USWB,
+ SSDW,
+ USDW
+}; // 16→8 signed/unsigned; 32→16 signed/unsigned
+
+static bool evalPackBuiltin(const CallExpr *E, E
@@ -11599,6 +11599,89 @@ static bool handleVectorElementCast(EvalInfo &Info,
const FPOptions FPO,
return false;
}
+enum class PackKind {
+ SSWB,
+ USWB,
+ SSDW,
+ USDW
+}; // 16→8 signed/unsigned; 32→16 signed/unsigned
+
+static bool evalPackBuiltin(const CallExpr *E, E
@@ -11599,6 +11599,89 @@ static bool handleVectorElementCast(EvalInfo &Info,
const FPOptions FPO,
return false;
}
+enum class PackKind {
+ SSWB,
+ USWB,
+ SSDW,
+ USDW
+}; // 16→8 signed/unsigned; 32→16 signed/unsigned
+
+static bool evalPackBuiltin(const CallExpr *E, E
@@ -11599,6 +11599,89 @@ static bool handleVectorElementCast(EvalInfo &Info,
const FPOptions FPO,
return false;
}
+enum class PackKind {
shafik wrote:
Pack is such an overloaded word in C++, can we get something more specific, I
don't have a good suggesti
@@ -15884,6 +15884,55 @@ static bool checkBuiltinVectorMathMixedEnums(Sema &S,
Expr *LHS, Expr *RHS,
return false;
}
+/// Check if all arguments have the same type. If the types don't match, emit
an
+/// error message and return true. Otherwise return false.
+///
+/// For
shafik wrote:
If they are including `Type.h` in files that only exist downstream that will
force them to deal with this both times around, unless I am missing something.
https://github.com/llvm/llvm-project/pull/155049
___
cfe-commits mailing list
cfe
https://github.com/shafik commented:
Thank you for the quick fix!
https://github.com/llvm/llvm-project/pull/155904
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
I am not sure it makes sense to label such larger changes NFC, anything this
large should have at least one review if not more.
https://github.com/llvm/llvm-project/pull/155313
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
shafik wrote:
CC @zygoloid is clang correct to reject the example in this code?
https://github.com/llvm/llvm-project/pull/155230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
@ahatanak it seems like trunk now return 4 for all cases:
https://godbolt.org/z/ds4ofbv6d I will have to look into the first two cases to
understand what is going on better
https://github.com/llvm/llvm-project/pull/95474
___
cfe-commi
https://github.com/shafik commented:
Thank you for the quick fix!
https://github.com/llvm/llvm-project/pull/155563
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
Do you know which clause causes clang to choose to reject this, looks like we
are the only one: https://godbolt.org/z/KhfeP5W6d
CC @hokein looks like came in w/ bd4662cd3f374
https://github.com/llvm/llvm-project/pull/155230
_
shafik wrote:
> This patch doesn't touch LLDB. If LLDB uses this bit, then LLDB also needs to
> be updated in the same manner as we are updating DebugInfo here.
If the change breaks LLDB then you should also fix that break as well.
https://github.com/llvm/llvm-project/pull/155120
___
shafik wrote:
Test failure does not look related, looks like a flaky test.
https://github.com/llvm/llvm-project/pull/154623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
Thank you for the quick fix.
https://github.com/llvm/llvm-project/pull/155150
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -961,3 +961,51 @@ static_assert(fmaDouble1[3] == 26.0);
constexpr float fmaArray[] = {2.0f, 2.0f, 2.0f, 2.0f};
constexpr float fmaResult = __builtin_elementwise_fma(fmaArray[1],
fmaArray[2], fmaArray[3]);
static_assert(fmaResult == 6.0f, "");
+
+static_assert(__builtin_elem
@@ -961,3 +961,51 @@ static_assert(fmaDouble1[3] == 26.0);
constexpr float fmaArray[] = {2.0f, 2.0f, 2.0f, 2.0f};
constexpr float fmaResult = __builtin_elementwise_fma(fmaArray[1],
fmaArray[2], fmaArray[3]);
static_assert(fmaResult == 6.0f, "");
+
+static_assert(__builtin_elem
@@ -338,3 +338,12 @@ static void *FooTable[1] = {
}
};
+int strcmp(const char *, const char *); // all-note {{passing argument to
parameter here}}
+#define S "\x01\x02\x03\x04\x05\x06\x07\x08"
+const char _str[] = {S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7]};
+const u
@@ -2778,6 +2778,40 @@ static bool interp__builtin_elementwise_fma(InterpState
&S, CodePtr OpPC,
return true;
}
+/// AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]".
+static bool interp__builtin_select(InterpState &S, CodePtr OpPC,
+
@@ -11045,10 +11045,6 @@ bool RecordExprEvaluator::VisitCXXConstructExpr(const
CXXConstructExpr *E,
bool ZeroInit = E->requiresZeroInitialization();
if (CheckTrivialDefaultConstructor(Info, E->getExprLoc(), FD, ZeroInit)) {
-// If we've already performed zero-initiali
@@ -4404,14 +4404,19 @@ CompareImplicitConversionSequences(Sema &S,
SourceLocation Loc,
Result = CompareStandardConversionSequences(S, Loc,
ICS1.Standard, ICS2.Standard);
else if (ICS1.isUserDefined()) {
+const Function
@@ -11874,6 +11874,28 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr
*E) {
return Success(APValue(ResultElements.data(), ResultElements.size()), E);
}
+
+ case Builtin::BI__builtin_elementwise_fma: {
+APValue SourceX, SourceY, SourceZ;
+if (!Evaluate
@@ -163,12 +186,11 @@ APValue Pointer::toAPValue(const ASTContext &ASTCtx)
const {
}
if (isTypeidPointer()) {
-TypeInfoLValue TypeInfo(PointeeStorage.Typeid.TypePtr);
-return APValue(
-APValue::LValueBase::getTypeInfo(
-TypeInfo, QualType(Point
@@ -95,31 +93,23 @@ class Pointer {
static constexpr unsigned RootPtrMark = ~0u;
public:
- Pointer() {
-StorageKind = Storage::Int;
-PointeeStorage.Int.Value = 0;
-PointeeStorage.Int.Desc = nullptr;
- }
- Pointer(IntPointer &&IntPtr) : StorageKind(Storage::Int
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/154623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -966,3 +966,15 @@ namespace AddressComparison {
static_assert(&U2.a[0] != &U2.b[1]);
static_assert(&U2.a[0] == &U2.b[1]); // both-error {{failed}}
}
+
+#if __cplusplus >= 202002L
+namespace UnionMemberOnePastEnd {
+ constexpr bool b() {
+union {
+ int p;
+
https://github.com/shafik commented:
I don't see any tests for this.
https://github.com/llvm/llvm-project/pull/154275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -84,6 +85,111 @@ void addRootSignature(llvm::dxbc::RootSignatureVersion
RootSigVer,
RootSignatureValMD->addOperand(MDVals);
}
+// Find array variable declaration from nested array subscript AST nodes
+static const ValueDecl *getArrayDecl(const ArraySubscriptExpr *ASE) {
@@ -84,6 +85,111 @@ void addRootSignature(llvm::dxbc::RootSignatureVersion
RootSigVer,
RootSignatureValMD->addOperand(MDVals);
}
+// Find array variable declaration from nested array subscript AST nodes
+static const ValueDecl *getArrayDecl(const ArraySubscriptExpr *ASE) {
@@ -2234,30 +2236,136 @@ static unsigned computePointerOffset(const ASTContext
&ASTCtx,
return Result;
}
+/// Does Ptr point to the last subobject?
+static bool pointsToLastObject(const Pointer &Ptr) {
+ Pointer P = Ptr;
+ while (!P.isRoot()) {
+
+if (P.isArrayElement
@@ -2170,29 +2170,32 @@ static bool interp__builtin_memchr(InterpState &S,
CodePtr OpPC,
return true;
}
-static unsigned computeFullDescSize(const ASTContext &ASTCtx,
-const Descriptor *Desc) {
-
+static std::optional computeFullDescSize(
@@ -60,16 +60,18 @@ template class OptionScope final {
public:
/// Root constructor, compiling or discarding primitives.
OptionScope(Compiler *Ctx, bool NewDiscardResult,
- bool NewInitializing)
+ bool NewInitializing, bool NewToLValue)
: C
https://github.com/shafik commented:
I will come back to this
https://github.com/llvm/llvm-project/pull/153601
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2234,30 +2236,136 @@ static unsigned computePointerOffset(const ASTContext
&ASTCtx,
return Result;
}
+/// Does Ptr point to the last subobject?
+static bool pointsToLastObject(const Pointer &Ptr) {
+ Pointer P = Ptr;
+ while (!P.isRoot()) {
+
+if (P.isArrayElement
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/153601
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13548,7 +13583,24 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const
CallExpr *E,
APInt Result = LHS.isSigned() ? LHS.ssub_sat(RHS) : LHS.usub_sat(RHS);
return Success(APSInt(Result, !LHS.isSigned()), E);
}
+ case Builtin::BI__builtin_elementwise_max: {
+A
@@ -2437,9 +2437,17 @@ inline bool Destroy(InterpState &S, CodePtr OpPC,
uint32_t I) {
const Pointer &Ptr = S.Current->getLocalPointer(Local.Offset);
if (Ptr.getLifetime() == Lifetime::Ended) {
- auto *D = cast(Ptr.getFieldDesc()->asDecl());
- S.FFDiag(D->ge
https://github.com/shafik commented:
LGTM
https://github.com/llvm/llvm-project/pull/154695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1652,6 +1655,9 @@ bool InitFieldActivate(InterpState &S, CodePtr OpPC,
uint32_t I) {
const Pointer &Ptr = S.Stk.peek();
if (!CheckRange(S, OpPC, Ptr, CSK_Field))
return false;
+ if (!CheckArray(S, OpPC, Ptr))
shafik wrote:
I feel like `CheckArray
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/154671
Static analysis flagged these classes as having implemented the destructor but
not applying rule of three. This could lead to accidental misuse and so it
makes sense to apply it.
>From 41d7218a6586834482ea6
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/153527
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3282,9 +3282,50 @@ static void CheckJumpOutOfSEHFinally(Sema &S,
SourceLocation Loc,
}
}
-StmtResult
-Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {
- Scope *S = CurScope->getContinueParent();
+Scope *FindLabeledBreakContinueScope(Sema &S, Scope
@@ -716,7 +732,8 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributes
&Attrs,
StmtVector Stmts;
ParsedAttributes EmptyCXX11Attrs(AttrFactory);
SubStmt = ParseStatementOrDeclarationAfterAttributes(
- Stmts, StmtCtx, nullptr, EmptyCXX11Attrs, T
@@ -3282,9 +3282,50 @@ static void CheckJumpOutOfSEHFinally(Sema &S,
SourceLocation Loc,
}
}
-StmtResult
-Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {
- Scope *S = CurScope->getContinueParent();
+Scope *FindLabeledBreakContinueScope(Sema &S, Scope
@@ -679,11 +685,17 @@ static void DiagnoseLabelFollowedByDecl(Parser &P, const
Stmt *SubStmt) {
}
}
-StmtResult Parser::ParseLabeledStatement(ParsedAttributes &Attrs,
- ParsedStmtContext StmtCtx) {
+StmtResult
+Parser::ParseLabeledSta
shafik wrote:
Git bisect also blame this PR for:
https://github.com/llvm/llvm-project/issues/154270
https://github.com/llvm/llvm-project/pull/147835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
@@ -215,6 +215,8 @@ def warn_c23_compat_case_range : Warning<
DefaultIgnore, InGroup;
def ext_c2y_case_range : Extension<
"case ranges are a C2y extension">, InGroup;
+def err_c2y_labeled_break_continue
+: Error<"labeled %select{'break'|'continue'}0 is only supported in
@@ -3084,35 +3090,48 @@ class ContinueStmt : public Stmt {
const_child_range children() const {
return const_child_range(const_child_iterator(), const_child_iterator());
}
+
+ static bool classof(const Stmt *T) {
+StmtClass Class = T->getStmtClass();
+return Cl
@@ -3056,25 +3045,42 @@ class IndirectGotoStmt : public Stmt {
}
};
-/// ContinueStmt - This represents a continue.
-class ContinueStmt : public Stmt {
+/// Base class for BreakStmt and ContinueStmt.
+class LoopControlStmt : public Stmt {
+ /// If this is a labeled break/co
@@ -0,0 +1,147 @@
+// RUN: %clang_cc1 -std=c2y -verify -fsyntax-only -fblocks %s
+// RUN: %clang_cc1 -std=c23 -verify -fsyntax-only -fblocks -fnamed-loops %s
+// RUN: %clang_cc1 -x c++ -verify -fsyntax-only -fblocks -fnamed-loops %s
+
+void f1() {
+ l1: while (true) {
+break
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/152870
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
Adding my comments now b/c I am not sure when I will get back to review
https://github.com/llvm/llvm-project/pull/152870
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143754
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/143754
>From 41e1b10a325aef9d7535b222e4c4ca909463d7fd Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun 2025 18:56:12 -0700
Subject: [PATCH 1/3] [Clang][Sema] Check the return value of
DiagnoseClassNameS
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/143754
>From 41e1b10a325aef9d7535b222e4c4ca909463d7fd Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun 2025 18:56:12 -0700
Subject: [PATCH 1/2] [Clang][Sema] Check the return value of
DiagnoseClassNameS
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/153863
>From f0c903995ffb19e02394601179f05082c132d037 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Fri, 15 Aug 2025 12:43:25 -0700
Subject: [PATCH 1/2] [Clang][NFC] Avoid repeating copy of std::string in
lambda
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/153863
Static analysis flagged this code because it will cause unneeded copies of
std::string. This fix is merely to use const auto & in the trailing return type.
>From f0c903995ffb19e02394601179f05082c132d037 Mon Sep
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/153664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
> > Static analysis flagged that the non-static member Semantics was not
> > initialized by the default default constructor. Fix is to initialize it
> > using in class member initialization.
>
> Yeah, this might be one better to mark as Intentional in the static analysis
> tool;
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/153729
Static analysis flagged this goto as unreachable and indeed it is, so removing
it.
>From 98ea646f9fb4331f24cb3492338efa0eaca7763b Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Thu, 14 Aug 2025 19:02:51 -
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/153710
Static analysis flagged this code b/c ToFPT could be nullptr but we were not
checking it even though in the previous if statement we did. It looks like this
was a mistaken refactor from:
https://github.com/llvm
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/153671
Static analysis flagged that the non-static member Semantics was not
initialized by the default default constructor. Fix is to initialize it using
in class member initialization.
>From bd93d02c1d7d0ba27ad563a5e
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/153664
Static analysis flagged this line because we are copying Result instead of
moving it.
>From 8361389ca73e9c70731ef9dd8c7b0fac1f06 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Thu, 14 Aug 2025 13:05:4
@@ -1095,6 +1095,8 @@ prepareAndFilterRanges(const
SmallVectorImpl &Ranges,
unsigned StartColumn = SM.getExpansionColumnNumber(Begin);
unsigned EndColumn = SM.getExpansionColumnNumber(End);
+assert(StartColumn && "StartColumn has a value of 0");
s
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/145221
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -188,13 +192,23 @@ class FullDependencyConsumer : public DependencyConsumer {
ContextHash = std::move(Hash);
}
+ void handleProvidedAndRequiredStdCXXModules(
+ std::optional Provided,
+ std::vector Requires) override {
+ModuleName = Provided ? Provided-
https://github.com/shafik commented:
Apologies for t
https://github.com/llvm/llvm-project/pull/145221
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/145221
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/153527
Static analysis flagged the columns - 1 code, it was correct but the assumption
was not obvious. I document the assumption w/ assertions.
While digging through related code I found getColumnNumber that looks wro
https://github.com/shafik commented:
Thank you for the quick fix!
https://github.com/llvm/llvm-project/pull/152850
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
Thank you for the quick fix!
https://github.com/llvm/llvm-project/pull/152894
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
@@ -95,6 +110,30 @@ class UnixAPIPortabilityChecker : public Checker<
check::PreStmt > {
} // end anonymous namespace
+ProgramStateRef UnixAPIMisuseChecker::EnsurePtrNotNull(
+SVal PtrVal, const Expr *PtrExpr,
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/83027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=
Message-ID:
In-Reply-To:
https://github.com/shafik commented:
Also why was the PR closed, it looks like it was landed.
CC @steakhal @NagyDonat
https://github.com/llvm/llvm-project/pull/83027
___
cfe-co
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To:
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/83027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
1 - 100 of 1282 matches
Mail list logo