Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
https://github.com/shafik commented:
Very nice change.
How are you coming up w/ the target for your improvements? Is this something
other folks could try and try and find some inspiration?
https://github.com/llvm/llvm-project/pull/141471
_
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
@@ -1741,57 +1741,65 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc,
Stmt *Switch,
void
Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType,
Expr *SrcExpr) {
+
+ const auto *E
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/141471
___
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/141741
___
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/141695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
@@ -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
@@ -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]()
@@ -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
@@ -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.
-
@@ -4552,6 +4552,9 @@ LocalInstantiationScope::findInstantiationOf(const Decl
*D) {
isa(D->getDeclContext()))
return nullptr;
+ if (D->isInvalidDecl())
shafik wrote:
Why can't we just check after `D = getCanonicalParmVarDecl(D);`?
https://github.
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/140930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
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
___
@@ -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 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
@@ -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'}}
}
+
+//
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
@@ -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 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
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/140105
___
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/140137
Static analysis flagged the unconditional access of getExternalSource(). We
don't initialize ExternalSource during construction but via
setExternalSource(). If this is not set it will violate the invariant cover
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
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
@@ -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 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 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
___
@@ -41,3 +41,17 @@ void func(int expr) {
int array[sizeof(Ty) ? sizeof(Ty{}) : sizeof(int)];
int old_style_assert[expr ? Ty::one : Ty::Neg_one]; // We don't diagnose as
a VLA until instantiation
}
+
+namespace GH138444 {
+struct S { // expected-note {{candidate con
@@ -15901,6 +15901,13 @@ ExprResult
SemaOpenMP::VerifyPositiveIntegerConstantInClause(
<< E->getSourceRange();
return ExprError();
}
+
+ if (!Result.isRepresentableByInt64()) {
shafik wrote:
So these are always 64 bit integers? This:
https://w
@@ -11523,6 +11523,8 @@ def note_omp_collapse_ordered_expr : Note<
"as specified in %select{'collapse'|'ordered'|'collapse' and 'ordered'}0
clause%select{||s}0">;
def err_omp_negative_expression_in_clause : Error<
"argument to '%0' clause must be a %select{non-negative|str
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/138349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
This was flagged in the following issue:
https://github.com/llvm/llvm-project/issues/139067#issuecomment-2865530760
https://github.com/llvm/llvm-project/pull/134522
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/shafik commented:
Does this also fix: https://github.com/llvm/llvm-project/issues/138823
https://github.com/llvm/llvm-project/pull/138877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -44,6 +44,8 @@ class IndexingContext {
public:
IndexingContext(IndexingOptions IndexOpts, IndexDataConsumer &DataConsumer);
+ // Defaulted, but defined out of line to avoid a dependency on
+ // HeuristicResolver.h.
shafik wrote:
```suggestion
// Heur
https://github.com/shafik approved this pull request.
https://github.com/llvm/llvm-project/pull/138640
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -25,6 +26,17 @@ static bool isGeneratedDecl(const Decl *D) {
return false;
}
+IndexingContext::IndexingContext(IndexingOptions IndexOpts,
+ IndexDataConsumer &DataConsumer)
+: IndexOpts(IndexOpts), DataConsumer(DataConsumer) {}
+
+Index
https://github.com/shafik approved this pull request.
https://github.com/llvm/llvm-project/pull/137899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
> @shafik I have changed the commit message, can you please look again?
I see the commit
[238d737](https://github.com/llvm/llvm-project/pull/137899/commits/238d73776c85ed22386ac494f275261638cd40d3)
which adds the improved summary but I don't see at the top of this page in the
su
@@ -72,3 +72,58 @@ template struct B {
template struct B; // expected-note {{requested here}}
} // namespace GH58547
+
+
+namespace GH44496 {
+ template struct my_template {
+using type = void;
+};
+
+template
+struct [[deprecated("primary")]] deprecated { //
#depreca
@@ -72,3 +72,58 @@ template struct B {
template struct B; // expected-note {{requested here}}
} // namespace GH58547
+
+
+namespace GH44496 {
+ template struct my_template {
shafik wrote:
```suggestion
template struct my_template {
```
https://github.com
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/138352
___
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/138352
Static analysis flagged the use of Detail because we were not using std::move
when returning values. Modified the returns to use std::move.
>From f12ee9b85d6f457061b7976ef929e3547c510b06 Mon Sep 17 00:00:00 2001
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/138349
This code was flagged by static analysis. It was a false positive but the
reason why this code is valid is subtle and folks refactoring this code in the
future could easily miss it.
>From 48a5b4a859c78fbc369473
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/138231
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
> Makes sense, thanks. I just wonder why is BName an owning string? To me it
> would make a lot more sense if it was a StringRef owned by the ASTContext.
> WDYT?
`FD->getASTContext().BuiltinInfo.getName(BId)` returns std::string by value,
looking at the API it looks pretty purpo
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/138026
___
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/138231
Static analysis flagged capturing BName by value as opposed to by reference.
Updated capture to be by reference.
>From dc52a86f175be704bb571ce160b597a2f4011cac Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
Dat
https://github.com/shafik commented:
Thank you for the fix, this needs a test and release note.
Release notes for clang are in `clang/docs/ReleaseNotes.rst`.
I am not sure what the right file for testing is though @AaronBallman
https://github.com/llvm/llvm-project/pull/138165
___
@@ -6561,18 +6561,28 @@ def ext_goto_into_protected_scope : ExtWarn<
def warn_cxx98_compat_goto_into_protected_scope : Warning<
"jump from this goto statement to its label is incompatible with C++98">,
InGroup, DefaultIgnore;
+def warn_cpp_compat_goto_into_protected_scope :
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wjump-bypasses-init %s
+// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=good %s
+// RUN: %clang_cc1 -fsyntax-only -verify=cxx,both -x c++ %s
+// good-no-dia
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wjump-bypasses-init %s
+// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=good %s
+// RUN: %clang_cc1 -fsyntax-only -verify=cxx,both -x c++ %s
+// good-no-dia
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wduplicate-decl-specifier %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-duplicate-decl-specifier
-Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=goo
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/138073
___
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/138069
___
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/137275
___
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/138073
Static analysis flagged this code for using copy when we could use std::move.
Worth noting that CD.Message is a StringRef but Conflict.Message is
std::string. Otherwise I would have used a temporary in place and
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/138026
Static analysis flagged that we use IFaceT in HandleExprPropertyRefExpr without
checking even though getInterfaceType() can return nullptr. The comments make
it clear the assumption is that we will always have a
https://github.com/shafik commented:
Can you add more details in the summary. Specifically your approach to fixing
the issue.
Something along the lines of "In GetFullTypeForDeclarator ... moved check ...
b/c ..."
https://github.com/llvm/llvm-project/pull/137899
___
https://github.com/shafik approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/137464
___
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/137431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
This should have a release note.
https://github.com/llvm/llvm-project/pull/137429
___
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/137431
Static analysis flagged that we did not make const a item declaration b/c we
did not modify it all during the loop.
>From 6b1e4f4c170c3f15697209f385397f295d15d2db Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/137275
Static analysis flagged CGAtomicOptionsRAII as having an explicit destructor
but not having explicit copy ctor and assignment. Rule of three says we should.
We are just using this as an RAII object, no need for
@@ -6496,6 +6496,17 @@ static bool canPerformArrayCopy(const InitializedEntity
&Entity) {
return false;
}
+static const FieldDecl *getConstField(const RecordDecl *RD) {
+ for (const FieldDecl *FD : RD->fields()) {
+QualType QT = FD->getType();
+if (QT.isConstQualif
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wdefault-const-init %s
+// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=unsafe %s
+// RUN: %clang_cc1 -fsyntax-only -verify=c -Wdefault-const-init
-Wno
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/137095
___
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/137029
___
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/137029
Static analysis flagged this code b/c we should have been using std::move when
passing by value since the value is not used anymore. In this case the simpler
fix is just to use a temporary value as many of the o
@@ -274,26 +274,22 @@ void operators() {
namespace gh135506 {
struct a {
- // FIXME: We currently don't diagnose these invalid redeclarations if the
- // second declaration is defaulted or deleted. This probably needs to be
- // handled in ParseCXXInlineMethodDef() after pa
https://github.com/shafik created
https://github.com/llvm/llvm-project/pull/136728
Static analysis flagged this use after move. It is undefined behavior and I
don't see any possible performance gains here to attempt to do anything else
but simply remove it.
>From 693a1f38d9a28ef515ccb738bee62
@@ -9278,6 +9278,8 @@ def err_cast_pointer_to_non_pointer_int : Error<
def err_nullptr_cast : Error<
"cannot cast an object of type %select{'nullptr_t' to %1|%1 to 'nullptr_t'}0"
>;
+def err_invalid_implicit_floating_point_cast : Error<
shafik wrote:
I don't
shafik wrote:
This crash looks linked to this PR:
https://github.com/llvm/llvm-project/issues/136432
https://github.com/llvm/llvm-project/pull/82310
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/135861
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -712,8 +713,7 @@ CodeGenTypes::arrangeBlockFunctionDeclaration(const
FunctionProtoType *proto,
const CGFunctionInfo &
CodeGenTypes::arrangeBuiltinFunctionCall(QualType resultType,
const CallArgList &args) {
- // FIXME: Kill copy.
--
https://github.com/shafik commented:
I am going to chime in, in support of both Aaron's and Erich's position here.
This does not seem like an extension we want to support.
So given the objections, we need at minimum an RFC and see how that goes. Maybe
during that discussion a more compelling c
@@ -271,3 +271,33 @@ void operators() {
if (to_int_int) {} // expected-error {{attempt to use a deleted function:
deleted (TO, operator bool)}}
static_cast(to_int_int); // expected-error {{static_cast from 'TO' to 'bool' uses deleted function: deleted (TO, operator bool)}}
@@ -299,3 +299,18 @@ void test10() {
for (auto[i, j, k] = arr; i < a; ++i) { }
for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
};
+
+extern void foo(int);
shafik wrote:
We normally wrap tests from bug reports in `namespace GH` where is the
bug rep
@@ -299,3 +299,18 @@ void test10() {
for (auto[i, j, k] = arr; i < a; ++i) { }
for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
};
+
+extern void foo(int);
shafik wrote:
Can we also get tests that show diagnostics for lambda cases as well.
https://github.co
shafik wrote:
CC @var-const
https://github.com/llvm/llvm-project/pull/135111
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
shafik wrote:
> https://godbolt.org/z/sY44dG6Ya is the reproducer. It is not super small but
> still should give an idea as the stack is quite similar to stuff touched by
> this PR.
Did you open a bug report? Maybe w/ reduction is ends up the same as the one I
just linked to.
https://github.
shafik wrote:
This crash is also linked to this PR:
https://github.com/llvm/llvm-project/issues/136119
https://github.com/llvm/llvm-project/pull/135111
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
@@ -3,6 +3,11 @@
// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem
%S/Inputs -triple=x86_64-unknown-fuchsia %s
// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem
%S/Inputs -triple=x86_64-linux-android %s
+// expected-n
@@ -7,7 +7,7 @@
#define foo`bar /* expected-error {{whitespace required after macro name}} */
#define foo2!bar /* expected-warning {{whitespace recommended after macro
name}} */
-#define foo3$bar /* expected-error {{'$' in identifier}} */
+#define foo3$bar /* expected-er
@@ -5349,6 +5350,40 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
return RValue::get(Result);
}
+ case Builtin::BI__builtin_virtual_member_address: {
+Address This = EmitLValue(E->getArg(0)).getAddress();
+APValue ConstMemF
@@ -5349,6 +5350,40 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
return RValue::get(Result);
}
+ case Builtin::BI__builtin_virtual_member_address: {
+Address This = EmitLValue(E->getArg(0)).getAddress();
+APValue ConstMemF
@@ -5240,9 +5249,13 @@ static bool
HasNonDeletedDefaultedEqualityComparison(Sema &S,
static bool isTriviallyEqualityComparableType(Sema &S, QualType Type,
SourceLocation KeyLoc) {
QualType CanonicalType = Type.getCanonicalType();
if (CanonicalType->isIncompleteType() || C
shafik wrote:
> > The summary should not merely link to an issue but describe the problem as
> > well. Two reasons:
> > ```
> > 1. for folks reading this in git log
> >
> > 2. The issue may not totally explain what is going on.
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
https://github.com/shafik commented:
Thank you for the quick fix, I left a comment on the test which should be
addressed in a follow up, unless I am missing something and the coverage is
elsewhere already.
https://github.com/llvm/llvm-project/pull/135129
___
@@ -3,9 +3,15 @@
// RUN: %clang_cc1 -std=c++23 -verify=cxx23,nontemplate -fsyntax-only
-Wc++26-extensions %s
void decompose_array() {
- int arr[4] = {1, 2, 3, 6};
shafik wrote:
We should have both cases tested, we want as wide test coverage as possible.
S
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/135129
___
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/135256
Static analysis flagged 1 - ArgIdx in Sema::AddOverloadCandidate for its
potential to overflow.
Turns out this is intentional since when PO ==
OverloadCandidateParamOrder::Reversed Args.size() is always two, so
@@ -5240,9 +5249,13 @@ static bool
HasNonDeletedDefaultedEqualityComparison(Sema &S,
static bool isTriviallyEqualityComparableType(Sema &S, QualType Type,
SourceLocation KeyLoc) {
QualType CanonicalType = Type.getCanonicalType();
if (CanonicalType->isIncompleteType() || C
https://github.com/shafik commented:
The summary should not merely link to an issue but describe the problem as
well. Two reasons:
1) for folks reading this in git log
2) The issue may not totally explain what is going on.
I actually did not get it at first b/c the issue talks about *char* and
https://github.com/shafik closed
https://github.com/llvm/llvm-project/pull/134969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7379,6 +7379,14 @@ class RecoveryExpr final : public Expr,
friend class ASTStmtWriter;
};
+/// Insertion operator for diagnostics. This allows sending
+/// Expr into a diagnostic with <<.
+inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
+
https://github.com/shafik commented:
This makes sense to me but this is not my area.
https://github.com/llvm/llvm-project/pull/134269
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1849,8 +1852,9 @@ TEST_F(StructuralEquivalenceCacheTest, ReturnStmtNonEq) {
Lang_CXX03);
StructuralEquivalenceContext Ctx(
- get<0>(TU)->getASTContext(), get<1>(TU)->getASTContext(),
- NonEquivalentDecls, StructuralEquivalenceKind::Default, false, false);
@@ -1913,8 +1919,9 @@ TEST_F(StructuralEquivalenceCacheTest,
Lang_CXX03);
StructuralEquivalenceContext Ctx(
- get<0>(TU)->getASTContext(), get<1>(TU)->getASTContext(),
- NonEquivalentDecls, StructuralEquivalenceKind::Default, false, false);
+ get<0>(TU)-
shafik wrote:
> LGTM with nit addressed. Test coverage would be nice to add, but not strictly
> required if this is purely a defensive measure (which it seems to be).
Exactly.
https://github.com/llvm/llvm-project/pull/131677
___
cfe-commits mailing l
1 - 100 of 1043 matches
Mail list logo