https://github.com/shafik commented:
Is there no issue associated with the crash?
https://github.com/llvm/llvm-project/pull/150814
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
FYI there is also this: https://llvm-compile-time-tracker.com/
https://github.com/llvm/llvm-project/pull/151074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -860,3 +860,41 @@ static_assert(__builtin_elementwise_sub_sat(0U, 1U) == 0U);
static_assert(__builtin_bit_cast(unsigned,
__builtin_elementwise_sub_sat((vector4char){5, 4, 3, 2}, (vector4char){1, 1, 1,
1})) == (LITTLE_END ? 0x01020304 : 0x04030201));
static_assert(__builtin_
https://github.com/shafik commented:
Do we get a frontend diagnostic in this case?
https://github.com/llvm/llvm-project/pull/151515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -471,3 +471,80 @@ size_t test9(struct annotated_sized_ptr *p, int index) {
size_t test10(struct annotated_sized_ptr *p, int index) {
return __bdos(&((unsigned int *) p->buf)[index]);
}
+
+struct pr151236_struct {
+int *a __counted_by(a_count);
+short a_coun
https://github.com/shafik commented:
Thank you
https://github.com/llvm/llvm-project/pull/151822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
@@ -44,12 +44,12 @@ bool Context::isPotentialConstantExpr(State &Parent, const
FunctionDecl *FD) {
Compiler(*this, *P).compileFunc(
FD, const_cast(Func));
- ++EvalID;
- // And run it.
- if (!Run(Parent, Func))
+ i
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/151821
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
I don't think I understand this change. There at least needs to be a more
detailed summary and tests. I imagine test would help clarify the intent better.
https://github.com/llvm/llvm-project/pull/121085
___
cfe-co
@@ -2064,7 +2069,7 @@ bool Compiler::visitCallArgs(ArrayRef Args,
return false;
}
-if (FuncDecl && NonNullArgs[ArgIndex]) {
+if (HasNonNullAttr && NonNullArgs[ArgIndex]) {
shafik wrote:
Couldn't we just use `!NonNullArgs.empty()` rather th
shafik wrote:
It looks like this PR causes a regression:
https://github.com/llvm/llvm-project/issues/150336
https://github.com/llvm/llvm-project/pull/144408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
@@ -14631,8 +14631,9 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const
BinaryOperator *E,
// - Otherwise pointer comparisons are unspecified.
if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {
bool WasArrayIndex;
- unsigned Misma
https://github.com/shafik approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/150088
___
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/150088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6361,6 +6362,143 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
@@ -6361,6 +6362,143 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
@@ -137,21 +137,21 @@ int32_t ByteCodeEmitter::getOffset(LabelTy Label) {
template
static void emit(Program &P, std::vector &Code, const T &Val,
bool &Success) {
+ size_t ValPos = Code.size();
size_t Size;
if constexpr (std::is_pointer_v)
-Size =
@@ -137,21 +137,21 @@ int32_t ByteCodeEmitter::getOffset(LabelTy Label) {
template
static void emit(Program &P, std::vector &Code, const T &Val,
bool &Success) {
+ size_t ValPos = Code.size();
size_t Size;
if constexpr (std::is_pointer_v)
-Size =
https://github.com/shafik commented:
Can you please describe the issue in the summary instead of just saying it
fixes Also add details such as this is fixing an issue introduced by ...
Also please as Erich asked, add a test too
https://github.com/llvm/llvm-project/pull/139560
___
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/139784
Static analysis flagged the use of Left.size() because we just moved out of
Left and that would be undefined behavior. Fix is to take the size and store it
in a local variable instead.
>From df92525e63ff7c8953c
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/140137
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26,14 +26,18 @@ void no_get_1() {
auto [a0, a1] = A(); // expected-error {{decomposes into 3 elements}}
auto [b0, b1] = B(); // expected-error {{decomposes into 3 elements}}
}
- auto [a0, a1, a2] = A(); // expected-error {{undeclared identifier 'get'}}
expected-
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/140105
Since P2280R4 Unknown references and pointers was implemented, HandleLValueBase
now has to deal with referneces:
D.MostDerivedType->getAsCXXRecordDecl()
will return a nullptr if D.MostDerivedType is a Reference
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/140105
>From db49f866558acdba7235bed1e535192ce4a1d3dc Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Thu, 15 May 2025 10:03:06 -0700
Subject: [PATCH] [Clang][AST] Fix HandleLValueBase to deal with references
Sinc
@@ -4566,9 +4566,11 @@ class ShuffleVectorExpr : public Expr {
void setExprs(const ASTContext &C, ArrayRef Exprs);
- llvm::APSInt getShuffleMaskIdx(const ASTContext &Ctx, unsigned N) const {
+ llvm::APSInt getShuffleMaskIdx(unsigned N) const {
assert((N < NumExprs -
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/139784
___
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/140699
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -18,6 +18,16 @@ int init_arr();
template template template int
Outer::Inner::arr[sizeof(T) + sizeof(U) + sizeof(V)] = { init_arr() };
int *p = Outer::Inner::arr;
+//CHECK: @_ZN8GH1406221gIiEE = linkonce_odr constant %"struct.GH140622::S"
zeroinitializer
+namespace GH14062
https://github.com/shafik commented:
It would also be nice to get a reduction for:
https://github.com/llvm/llvm-project/issues/140632 and see if we can add a test
for that if it looks significantly different from the other cases.
https://github.com/llvm/llvm-project/pull/140699
___
https://github.com/shafik approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/140725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
@kripken somewhat reduced:
```cpp
struct MyStruct {
double m0{-.0};
int m1{-12345};
};
constexpr MyStruct default_val;
auto compute_area(double l, const MyStruct &val = default_val) -> double {
if (val.m1 == 1)
return 2.0;
return 0;
}
#include
auto
@@ -85,3 +85,33 @@ void func() {
static const int b; // zero-init-var-warning {{default initialization of an
object of type 'const int' is incompatible with C++}} \
cxx-error {{default initialization of an object of
const type 'const int'}}
}
+
+//
@@ -972,6 +972,12 @@ class Sema final : public SemaBase {
/// Calls \c Lexer::getLocForEndOfToken()
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0);
+ /// Calls \c Lexer::findNextToken() to find the next token, and if the
+ /// locations of bo
https://github.com/shafik commented:
Can you provide the PR that brought in the change you are fixing?
https://github.com/llvm/llvm-project/pull/141695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
@@ -0,0 +1,250 @@
+// RUN: cp %s %t
+// RUN: %clang_cc1 -x c++ -Wunused-lambda-capture -Wno-unused-value -std=c++1z
-fixit %t
+// RUN: grep -v CHECK %t | FileCheck %s
+
+
+#define MACRO_CAPTURE(...) __VA_ARGS__
+int main() {
+int a = 0, b = 0, c = 0;
+auto F0 = [a, &b]()
@@ -14086,7 +14091,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
// The form of initialization (using parentheses or '=') is generally
// insignificant, but does matter when the entity being initialized has a
// class type.
-
@@ -373,8 +373,8 @@ bool Preprocessor::CheckMacroName(Token &MacroNameTok,
MacroUse isDefineUndef,
// Macro names with reserved identifiers are accepted if built-in or passed
// through the command line (the later may be present if -dD was used to
// generate the preproc
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/141695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -160,7 +160,7 @@ template struct X;
// Make sure that the instantiated constructor initializes start and
// end properly.
-// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(ptr {{[^,]*}}
%this, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %othe
@@ -44,20 +45,24 @@ class SanitizerSpecialCaseList : public
llvm::SpecialCaseList {
StringRef Category = StringRef()) const;
// Query ignorelisted entries if any bit in Mask matches the entry's section.
- // Return 0 if not found. If found, return the line
@@ -972,6 +972,12 @@ class Sema final : public SemaBase {
/// Calls \c Lexer::getLocForEndOfToken()
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0);
+ /// Calls \c Lexer::findNextToken() to find the next token, and if the
+ /// locations of bo
shafik wrote:
> Based on #141114 and #141858 should this PR be reverted?
A fix was landed: https://github.com/llvm/llvm-project/pull/142498
https://github.com/llvm/llvm-project/pull/95474
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/shafik approved this pull request.
https://github.com/llvm/llvm-project/pull/141148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1343,12 +1343,21 @@ static bool EvaluateBooleanTypeTrait(Sema &S, TypeTrait
Kind,
if (RD && RD->isAbstract())
return false;
+// LWG3819: For reference_meows_from_temporary traits, && is not added to
shafik wrote:
I apologize, maybe I am jus
@@ -160,7 +160,7 @@ template struct X;
// Make sure that the instantiated constructor initializes start and
// end properly.
-// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(ptr {{[^,]*}}
%this, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %othe
@@ -1343,12 +1343,21 @@ static bool EvaluateBooleanTypeTrait(Sema &S, TypeTrait
Kind,
if (RD && RD->isAbstract())
return false;
+// LWG3819: For reference_meows_from_temporary traits, && is not added to
shafik wrote:
After some offline discussi
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/142851
Static analysis flagged this since we could move MergedRanges since it is a
std::vector, a local and unused after that line. So there is a potential saving.
>From b427ae1ef18c48126a0faf5f40678cc6e4e30634 Mon Sep
@@ -2083,6 +2086,88 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema
&SemaRef,
SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D;
}
+static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef,
+ SourceLocat
@@ -2083,6 +2086,88 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema
&SemaRef,
SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D;
}
+static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef,
+ SourceLocat
@@ -2083,6 +2086,88 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema
&SemaRef,
SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D;
}
+static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef,
+ SourceLocat
@@ -144,3 +144,54 @@ static_assert(__builtin_is_cpp_trivially_relocatable(U2));
// expected-note@#tr-U2 {{'U2' defined here}}
}
+
+namespace trivially_copyable {
+struct B {
+ virtual ~B();
+};
+struct S : virtual B { // #tc-S
+S();
+int & a;
+const int ci;
+B
https://github.com/shafik approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/141470
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/141485
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -44,20 +45,24 @@ class SanitizerSpecialCaseList : public
llvm::SpecialCaseList {
StringRef Category = StringRef()) const;
// Query ignorelisted entries if any bit in Mask matches the entry's section.
- // Return 0 if not found. If found, return the line
https://github.com/shafik commented:
Thank you for the quick fix!
https://github.com/llvm/llvm-project/pull/141741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -764,7 +764,8 @@ static bool interp__builtin_addressof(InterpState &S,
CodePtr OpPC,
const InterpFrame *Frame,
const CallExpr *Call) {
assert(Call->getArg(0)->isLValue());
- PrimType PtrT = S.get
https://github.com/shafik commented:
Did you not do a release note b/c this was introduced w/ a recent change?
https://github.com/llvm/llvm-project/pull/141940
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/shafik commented:
Can you elaborate in your summary.
I am guessing because the other checks are a lot cheaper and this overall
improves performance?
https://github.com/llvm/llvm-project/pull/141470
___
cfe-commits mailing list
cfe-
https://github.com/shafik commented:
So just to confirm my reading, this is benefiting from
`CheckCompleteVariableDeclaration` doing:
```cpp
// Evaluate the initializer to see if it's a constant initializer.
HasConstInit = var->checkForConstantInitialization(Notes);
```
or is there more?
@@ -16597,7 +16597,8 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation
CaretLoc,
BD->setCaptures(Context, Captures, BSI->CXXThisCaptureIndex != 0);
// Pop the block scope now but keep it alive to the end of this function.
- AnalysisBasedWarnings::Policy WP = Analysis
@@ -143,3 +143,8 @@ namespace fold_initializer {
const float A::f = __builtin_is_constant_evaluated();
static_assert(fold(A::f == 1.0f));
}
+
+struct GH99680 {
+ static const int x = 1/(1-__builtin_is_constant_evaluated()); //
expected-error {{in-class initializer for sta
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/143578
>From 09060e9a91842346f106d55b32141b16efe7378d Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun 2025 10:41:04 -0700
Subject: [PATCH 1/2] [Clang][ByteCode][NFC] Move APInt into pushInteger since
i
@@ -4920,6 +4914,11 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind
DKind,
ModifierFound = true;
} else {
StepFound = parseStepSize(*this, Data, Kind, Tok.getLocation());
+if (!StepFound) {
shafik wrote:
hu
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/143611
Static analysis flagged that we could move HeadingAndSpellings and avoid a copy
of a large object.
>From 55d520891a09e3cd3ef85eeba501ad80d8240619 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/143603
>From 6bcbd5e1691edd4cbc36bd0c318cdd3b526db1c3 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun 2025 13:51:19 -0700
Subject: [PATCH 1/2] [Clang][Tooling][NFC] Use move to avoid copies of large
ob
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/143578
>From 09060e9a91842346f106d55b32141b16efe7378d Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun 2025 10:41:04 -0700
Subject: [PATCH 1/3] [Clang][ByteCode][NFC] Move APInt into pushInteger since
i
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143646
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
It feels like having `isDefaultedOnDeclaration()` would be tremendously more
readable and express the intent rather than doing "the dance" when necessary.
https://github.com/llvm/llvm-project/pull/143661
___
cfe-c
@@ -3673,6 +3678,8 @@ void Parser::ParseDeclarationSpecifiers(
*Next.getIdentifierInfo(), Next.getLocation(), getCurScope(), &SS,
false, false, nullptr,
shafik wrote:
Please add bugprone-argument-comments for these as well, since you are
mo
@@ -3673,6 +3678,8 @@ void Parser::ParseDeclarationSpecifiers(
*Next.getIdentifierInfo(), Next.getLocation(), getCurScope(), &SS,
false, false, nullptr,
shafik wrote:
Also applies in some other places as well.
https://github.com/llvm/llvm-p
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143611
___
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/143667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,6 +35,7 @@ enum AccessKinds {
AK_Construct,
AK_Destroy,
AK_IsWithinLifetime,
+ AK_CheckReferenceInitialization
shafik wrote:
```suggestion
AK_ReferenceInitialization
```
I could also go for `AK_ReadForReferenceInitialization`. The "Check" is w
@@ -1321,3 +1321,24 @@ constexpr bool check = different_in_loop();
// expected-error@-1 {{}} expected-note@-1 {{in call}}
}
+
+namespace GH48665 {
+constexpr bool foo(int *i) {
shafik wrote:
Other tests: https://godbolt.org/z/o66Gr3fc8
```cpp
struct A {
https://github.com/shafik commented:
I have the same questions as @efriedma-quic
https://github.com/llvm/llvm-project/pull/143667
___
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/143827
Static analysis flagged FatbinFileName since we can move it instead of copying
it.
>From 5fd6d2ff512a971b8e6ad8f900c31a1b74b49ed5 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Wed, 11 Jun 2025 20:58:07 -
@@ -7219,6 +7219,17 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc,
ParsedType Ty,
return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, InitExpr);
}
+static bool IsInsideFunction(Scope *S) {
shafik wrote:
@AaronBallman it feels like it make
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143827
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13632,82 +13632,36 @@ bool Sema::CheckUsingDeclQualifier(SourceLocation
UsingLoc, bool HasTypename,
RequireCompleteDeclContext(const_cast(SS), NamedContext))
return true;
- if (getLangOpts().CPlusPlus11) {
-// C++11 [namespace.udecl]p3:
-// In a using
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/143492
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
@Endilll has been handling a lot of conformance testing, so please wait for
more feedback from him before landing.
https://github.com/llvm/llvm-project/pull/143492
___
cfe-commits mailing list
cfe-commits@lists.llv
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143578
___
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/143603
Static analysis flagged these cases in which can use std::move and avoid copies
of large objects.
>From 6bcbd5e1691edd4cbc36bd0c318cdd3b526db1c3 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Tue, 10 Jun
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/143443
___
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/143578
Static analysis flagged that we could move APInt instead of copy, indeed it has
a move constructor and so we should move into values for APInt.
>From 09060e9a91842346f106d55b32141b16efe7378d Mon Sep 17 00:00:00
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/143830
Static analysis flagged Input as a large object that would benefit from being
moved over being copied.
>From ea85dd226ad4c8a6f9ef0a7f16c22fdc386c1334 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Wed, 11
https://github.com/shafik commented:
I would also like to see some more background info on how we came up with the
original limit (if it exists).
https://github.com/llvm/llvm-project/pull/143785
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
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
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/152593
Static analysis complained that:
child_range(&Init, &Init+1);
in the children member function was potentially out of bounds. This is false
b/c it is forming an iterator range but it would be invalid if Init w
@@ -20,4 +22,10 @@ void expr() {
static_assert(__is_same(TypePackElement<0, X<0>, X<1>>, X<0>), "");
static_assert(__is_same(TypePackElement<1, X<0>, X<1>>, X<1>), "");
#endif
+
+#ifdef DEDUP
+ static_assert(__is_same(TypePackDedup, TypeList<>), "");
+ static_assert(__is_
https://github.com/shafik updated
https://github.com/llvm/llvm-project/pull/152593
>From d7c1848b87a9f33d29acd3c526ea19b7ddaa7be7 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Date: Thu, 7 Aug 2025 13:31:03 -0700
Subject: [PATCH 1/2] [Clang][AST][NFC] Add assertion on Init to
CompoundLiteralE
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 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 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
@@ -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 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
@@ -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 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
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
1101 - 1200 of 1359 matches
Mail list logo