[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2025-01-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Flagging what looks like a bug https://github.com/llvm/llvm-project/pull/101469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2025-01-17 Thread Shafik Yaghmour via cfe-commits
@@ -1212,6 +1212,14 @@ static void handlePreferredName(Sema &S, Decl *D, const ParsedAttr &AL) { << TT->getDecl(); } +static void handleNoSpecializations(Sema &S, Decl *D, const ParsedAttr &AL) { + StringRef Message; + if (AL.getNumArgs() != 0) +S.checkStringLit

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2025-01-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/101469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly propagate type aliases' unexpanded flags up to lambda (PR #122875)

2025-01-16 Thread Shafik Yaghmour via cfe-commits
@@ -47,6 +49,10 @@ template void f() { }(), ...); }(1, 2); + [](Is...) { +([] { using T = ElementType; }(), ...); shafik wrote: Out of curiosity were applying the `getCanonicalType` to `T` and getting `int` while we really wanted `ElementType`?

[clang] [clang-tools-extra] [clang][refactor] Refactor `findNextTokenIncludingComments` (PR #123060)

2025-01-16 Thread Shafik Yaghmour via cfe-commits
@@ -118,47 +118,19 @@ findMembersUsedInInitExpr(const CXXCtorInitializer *Initializer, return Results; } -/// Returns the next token after `Loc` (including comment tokens). -static std::optional getTokenAfter(SourceLocation Loc, shafik wrote: This looks li

[clang] [clang-tools-extra] [clang][refactor] Refactor `findNextTokenIncludingComments` (PR #123060)

2025-01-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: `Lexer::findNextToken` has an additional check: `if (!Lexer::isAtEndOfMacroExpansion(Loc, SM, LangOpts, &Loc))` Does this not change behavior in the case we are replacing? I imagine folks just copied from `Lexer::findNextToken` and purposely left this out,

[clang] [clang-tools-extra] [clang][refactor] Refactor `findNextTokenIncludingComments` (PR #123060)

2025-01-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/123060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Note member decl when initializer list default constructs member (PR #121854)

2025-01-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix. At a first glance this seems to make sense to me, I added some more reviewers. Please add a release note. https://github.com/llvm/llvm-project/pull/121854 ___ cfe-commits mailing list cfe-c

[clang] [Clang] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-12 Thread Shafik Yaghmour via cfe-commits
@@ -96,3 +96,13 @@ namespace PR38286 { template struct C; // expected-note {{non-type declaration found}} template C::~C() {} // expected-error {{identifier 'C' after '~' in destructor name does not name a type}} } + +namespace GH121706 { +struct S { + *S(); // expected-

[clang] [Clang] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/122621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix. Please add a more detailed summary, the title feels sufficient to describe the problem but you should outline the solution in the summary, at least briefly. e.g. adding `checkMethodPointerType` which will called during to verify

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Shafik Yaghmour via cfe-commits
@@ -1969,7 +1970,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { if (OwnsDefaultArg) Record.AddTemplateArgumentLoc(D->getDefaultArgument()); - if (!TC && !OwnsDefaultArg && + if (!D->hasTypeConstraint() && !OwnsDefaultArg && -

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: After commit review. Thank you for the fix. https://github.com/llvm/llvm-project/pull/122065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/122065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #121943)

2025-01-07 Thread Shafik Yaghmour via cfe-commits
@@ -284,11 +284,26 @@ void f(_Atomic(int) *i, const _Atomic(int) *ci, const volatile int flag_k = 0; volatile int flag = 0; - (void)(int)__atomic_test_and_set(&flag_k, memory_order_seq_cst); // expected-warning {{passing 'const volatile int *' to parameter of type 'vola

[clang] [clang] Evaluate constant initializers in C as well (PR #121950)

2025-01-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I would love to see tests that highlight any differences between C and C++ in this area. https://github.com/llvm/llvm-project/pull/121950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: nitpick, I don't think this is an NFC change. It would require some thought to really convince myself this did not have subtle behavior changes even if unintended. https://github.com/llvm/llvm-project/pull/122029 ___

[clang] [Clang][Parser] Don't evaluate concept when its definition is invalid (PR #111179)

2025-01-07 Thread Shafik Yaghmour via cfe-commits
shafik wrote: This crash looks linked to this change: https://github.com/llvm/llvm-project/issues/121980 https://github.com/llvm/llvm-project/pull/79 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-03 Thread Shafik Yaghmour via cfe-commits
@@ -33,23 +33,22 @@ Two goo __attribute__((init_priority(2,3))) ( 5, 6 ); // expected-error {{'init_ Two coo[2] __attribute__((init_priority(100))); #if !defined(SYSTEM) - // expected-error@-2 {{'init_priority' attribute requires integer constant between 101 and 65535 incl

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 01/12] [Clang] Implement P2280R4 Using unknown pointers and refe

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 01/11] [Clang] Implement P2280R4 Using unknown pointers and refe

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-19 Thread Shafik Yaghmour via cfe-commits
@@ -8612,7 +8612,11 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-19 Thread Shafik Yaghmour via cfe-commits
@@ -3703,8 +3703,14 @@ void Parser::ParseDeclarationSpecifiers( // We reject AT_LifetimeBound and AT_AnyX86NoCfCheck, even though they // are type attributes, because we historically haven't allowed these // to be used as type attributes in C++11

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-19 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 01/10] [Clang] Implement P2280R4 Using unknown pointers and refe

[clang] [clang] Fix dangling false positives for conditional operators. (PR #120233)

2024-12-19 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Please add more details to the summary, especially a note that there theoretically could be false negatives but it fixes the overall issue and the tradeoff good. https://github.com/llvm/llvm-project/pull/120233 __

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-19 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/9] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
shafik wrote: We have a new crash on new code introduced since I last worked on this, I am guessing it just requires some additional checks. https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/8] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/7] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Just merged in main since it has been so long in prep for updates https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/6] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-17 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I just realized it was already merged https://github.com/llvm/llvm-project/pull/119098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix. Please add a more detailed summary, these are important since they go into the git log and can be important for debugging downstream breaks. Something like "Fix by adding check in ActOnGCCAsmStmt that the domains of the input and out

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2024-12-17 Thread Shafik Yaghmour via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: https://github.com/shafik commented: This will eventually need a release note. https://github.com/llvm/llvm-project/pull/119711 __

[clang] [compiler-rt] [llvm] [TySan] A Type Sanitizer (Runtime Library) (PR #76261)

2024-12-17 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_tysan -O0 %s -o %t && %run %t 10 >%t.out.0 2>&1 +// RUN: FileCheck %s < %t.out.0 +// RUN: %clang_tysan -O2 %s -o %t && %run %t 10 >%t.out 2>&1 +// RUN: FileCheck %s < %t.out + +#include +#include +#include + +void __attribute__((noinline)) add_f

[clang] [compiler-rt] [llvm] [TySan] A Type Sanitizer (Runtime Library) (PR #76261)

2024-12-17 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_tysan -O0 %s -o %t && %run %t >%t.out 2>&1 +// RUN: FileCheck %s < %t.out + +#include + +// CHECK-NOT: ERROR: TypeSanitizer: type-aliasing-violation + +int main() { + union { +int i; +short s; + } u; + + u.i = 42; + u.s = 1; + + print

[clang] [compiler-rt] [llvm] [TySan] A Type Sanitizer (Runtime Library) (PR #76261)

2024-12-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I guess there are no release notes or manual b/c this is not ready to be used by general users on the command line and that will come via another PR? https://github.com/llvm/llvm-project/pull/76261 ___ cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This should have a release note. https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-12-16 Thread Shafik Yaghmour via cfe-commits
shafik wrote: ping on this we have another regression linked to the original change: https://github.com/llvm/llvm-project/issues/120086 We really should land a fix ASAP, this is now three regression linked to the same change. https://github.com/llvm/llvm-project/pull/114217 _

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-06 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/shafik commented: Am I missing something, it seems like several of the new diagnostics don't have tests that cover them. https://github.com/llvm/llvm-project/pull/118475 __

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-12-06 Thread Shafik Yaghmour via cfe-commits
@@ -3190,19 +3190,27 @@ static void GenerateHeaderSearchArgs(const HeaderSearchOptions &Opts, auto It = Opts.UserEntries.begin(); auto End = Opts.UserEntries.end(); - // Add -I... and -F... options in order. - for (; It < End && Matches(*It, {frontend::Angled}, std::nul

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-12-06 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: nitpick https://github.com/llvm/llvm-project/pull/105738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-12-06 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/105738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix double-quotes in diagnostic when attempting to access a ext_vector of bools (PR #118186)

2024-12-06 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for your contribution, please add a more detailed summary to your PR. Your summary should if your title describes the problem sufficiently describe how you will fix the problem. https://github.com/llvm/llvm-project/pull/118186

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Looks good, looking forward to the follow-up PR. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] Deleting destructors can be noexcept (PR #118687)

2024-12-04 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -fcxx-exceptions -Wno-unevaluated-expression -std=c++20 %s shafik wrote: We already have https://github.com/llvm/llvm-project/blob/main/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp mayb

[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)

2024-12-03 Thread Shafik Yaghmour via cfe-commits
@@ -1615,22 +1615,24 @@ QualType CallExpr::getCallReturnType(const ASTContext &Ctx) const { return FnType->getReturnType(); } -const Attr *CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const { +std::pair +CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const { +

[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)

2024-12-03 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Looks like this caused a regression: https://github.com/llvm/llvm-project/issues/117975 https://github.com/llvm/llvm-project/pull/112521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang] Fix crash when compiling error with invalid decl (PR #77893)

2024-12-03 Thread Shafik Yaghmour via cfe-commits
@@ -40,7 +40,11 @@ static_assert( "Type is insufficiently aligned"); APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V) -: Ptr(P ? cast(P->getCanonicalDecl()) : nullptr), Local{I, V} {} +: Ptr(P ? cast(P->getCanonicalDecl()->isInvalidDecl()

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
@@ -10264,6 +10264,11 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays; " shafik wrote: Maybe "Compari

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
@@ -15,15 +15,15 @@ void test(const char *d) { if (NULL == "/") return; if ("/" != DELIM) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}} -return; +return; // cxx

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
@@ -15,15 +15,15 @@ void test(const char *d) { if (NULL == "/") return; if ("/" != DELIM) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}} -return; +return; // cxx

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This looks good but I want agreement on the diagnostic message. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Note paper [Remove Deprecated Array Comparisons from C++26](https://wg21.link/p2865) although the lastest version is not public yet. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-11-15 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Just wanted to ping on this and see how it was going. https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-11-15 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Looks like this PR was the cause of this regression: https://github.com/llvm/llvm-project/issues/116440 https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] Recommit "[RISCV][FMV] Support target_version" (#111096)" (PR #111333)

2024-11-07 Thread Shafik Yaghmour via cfe-commits
shafik wrote: It looks like this change caused a regression: https://github.com/llvm/llvm-project/issues/115000 https://github.com/llvm/llvm-project/pull/111333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [Clang] Distinguish expanding-packs-in-place cases for SubstTemplateTypeParmTypes (PR #114220)

2024-11-07 Thread Shafik Yaghmour via cfe-commits
@@ -3149,9 +3156,15 @@ struct ExpandPackedTypeConstraints assert(SemaRef.ArgumentPackSubstitutionIndex != -1); +TemplateArgument Arg = TemplateArgs(T->getDepth(), T->getIndex()); + +std::optional PackIndex; +if (Arg.getKind() == TemplateArgument::Pack) +

[clang] [Clang][Parser] Don't evaluate concept when its definition is invalid (PR #111179)

2024-11-05 Thread Shafik Yaghmour via cfe-commits
shafik wrote: This crash looks linked to this change: https://github.com/llvm/llvm-project/issues/115004 https://github.com/llvm/llvm-project/pull/79 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] Add Shafik and hstk30 as maintainers for issue triage (PR #114781)

2024-11-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. Assuming it passes the test LGTM https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-10-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/114217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-10-30 Thread Shafik Yaghmour via cfe-commits
@@ -74,7 +74,7 @@ int test13(int *a) { } int test14(int *a, int b) { - a = (int *)__builtin_assume_aligned(b, 32); // expected-error {{incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *}} + a = (int *)__builtin_assume_aligned(b, 32);

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-10-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix, I think this makes sense. Please add the tests I commented on and a release note. https://github.com/llvm/llvm-project/pull/114217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -17957,6 +17957,8 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, << Name; Invalid = true; } + if (TUK == TagUseKind::Declaration && Name) shafik wrote: Why do we need to check `Name` as we

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: The fix looks good to me but I guess everyone needs to be happy w/ the test first. https://github.com/llvm/llvm-project/pull/112111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: So I think on my last comment, using `break` as opposed to `continue` makes sense. Agree @cor3ntin https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
shafik wrote: So this is the commit that introduced this 06e41ae5c77c6 and it looks like code like this: ```objc id x(id(0)); ``` we are trying to differentiate a protocol Vs the next parameter? https://github.com/llvm/llvm-project/pull/109298 ___ c

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, AccessSpecifier LexicalAS) { if (!PrevMemberDecl) { // Use the lexical access specifier. -MemberDecl->setAccess(LexicalAS); shafik wrote:

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -3702,20 +3702,32 @@ user-declared functions. For example: .. code-block:: c++ +#include +#include + +using namespace std::literals; + // Returns m[key] if key is present, or default_value if not. template const U &get_or_default(const std::map

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM, other than the minor comment. https://github.com/llvm/llvm-project/pull/113437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/113437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (PR #114071)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. https://github.com/llvm/llvm-project/pull/114071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-10-28 Thread Shafik Yaghmour via cfe-commits
shafik wrote: ping https://github.com/llvm/llvm-project/pull/84146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure in value-dependent initializer expressions (PR #112612)

2024-10-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM https://github.com/llvm/llvm-project/pull/112612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure in value-dependent initializer expressions (PR #112612)

2024-10-24 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/112612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-10-21 Thread Shafik Yaghmour via cfe-commits
shafik wrote: This is also linked to this clang-19 regression: https://github.com/llvm/llvm-project/issues/110914 https://github.com/llvm/llvm-project/pull/84146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [Clang] prevent assertion failure in value-dependent initializer expressions (PR #112612)

2024-10-18 Thread Shafik Yaghmour via cfe-commits
@@ -11536,6 +11536,9 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr( LValue Subobject = This; Subobject.addArray(Info, ExprToVisit, CAT); auto Eval = [&](const Expr *Init, unsigned ArrayIndex) { +if (Init->isValueDependent()) shafik wrot

[clang] [Clang] prevent assertion failure in value-dependent initializer expressions (PR #112612)

2024-10-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik requested changes to this pull request. https://github.com/llvm/llvm-project/pull/112612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an assertion in expression recovery (PR #112888)

2024-10-18 Thread Shafik Yaghmour via cfe-commits
@@ -1989,7 +1989,7 @@ Expr *CastExpr::getSubExprAsWritten() { SubExpr = IgnoreExprNodes(cast(SubExpr)->getArg(0), ignoreImplicitSemaNodes); } else if (E->getCastKind() == CK_UserDefinedConversion) { - assert((isa(SubExpr) || isa(Su

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, AccessSpecifier LexicalAS) { if (!PrevMemberDecl) { // Use the lexical access specifier. -MemberDecl->setAccess(LexicalAS); shafik wrote:

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, AccessSpecifier LexicalAS) { if (!PrevMemberDecl) { // Use the lexical access specifier. -MemberDecl->setAccess(LexicalAS); shafik wrote:

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: After answering my questions this makes sense to me but I want a second set of eyes. https://github.com/llvm/llvm-project/pull/112081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
@@ -9827,6 +9827,9 @@ static IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth, return IntRange(BitField->getBitWidthValue(C), BitField->getType()->isUnsignedIntegerOrEnumerationType()); shafik wrote: I think that

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
@@ -9827,6 +9827,9 @@ static IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth, return IntRange(BitField->getBitWidthValue(C), BitField->getType()->isUnsignedIntegerOrEnumerationType()); shafik wrote: So why doesn'

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
@@ -9827,6 +9827,9 @@ static IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth, return IntRange(BitField->getBitWidthValue(C), BitField->getType()->isUnsignedIntegerOrEnumerationType()); shafik wrote: What expr is

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
@@ -180,7 +180,7 @@ namespace { bool HandleTopLevelDecl(DeclGroupRef DG) override { // FIXME: Why not return false and abort parsing? - if (Diags.hasErrorOccurred()) + if (Diags.hasUnrecoverableErrorOccurred()) shafik wrote: Is this really

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
shafik wrote: This is linked to the following regression: https://github.com/llvm/llvm-project/issues/111293 Please investigate. https://github.com/llvm/llvm-project/pull/84146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang] Fix C23 constexpr crashes (PR #112708)

2024-10-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-14 Thread Shafik Yaghmour via cfe-commits
shafik wrote: It looks like this is linked to this crash: https://github.com/llvm/llvm-project/issues/11 https://github.com/llvm/llvm-project/pull/111852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang][Sema] Fix templated array size calculation. (PR #96464)

2024-10-14 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. If you have approvals you don't have to wait for other reviewers unless they have made a comment that required a change and you them to confirm the fix or they explicitly blocked the review. https://github.com/llvm/llvm-project/pull/96464

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-10-14 Thread Shafik Yaghmour via cfe-commits
shafik wrote: This crash is due to this set of changes: https://github.com/llvm/llvm-project/issues/11 https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang-tools-extra] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-10-08 Thread Shafik Yaghmour via cfe-commits
shafik wrote: This regression: https://github.com/llvm/llvm-project/issues/104720 seems to be linked to this change. https://github.com/llvm/llvm-project/pull/91339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][Parser] Remove the concept from the DeclContext if the definition is invalid (PR #111179)

2024-10-04 Thread Shafik Yaghmour via cfe-commits
@@ -337,6 +343,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, ExprResult ConstraintExprResult = Actions.CorrectDelayedTyposInExpr(ParseConstraintExpression()); if (ConstraintExprResult.isInvalid()) { +if (AddedToScope) ---

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-26 Thread Shafik Yaghmour via cfe-commits
@@ -115,7 +115,7 @@ C++ Language Changes - Allow single element access of GCC vector/ext_vector_type object to be constant expression. Supports the `V.xyzw` syntax and other tidbits as seen in OpenCL. Selecting multiple elements is left as a future work. -- Implement `CWG18

[clang] [clang] Use std::optional::value_or (NFC) (PR #109894)

2024-09-26 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Next time please provide a better summary for your PR. This is super important for downstream folks debugging build breaks. In general this is important for reviews to compare what they expect with the actual diff. In this case something like "replace the use of conditional opera

[clang] [clang] Allow class with anonymous union member to be const-default-constructible even if a union member has a default member initializer (#95854) (PR #96301)

2024-09-23 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s + +struct A { shafik wrote: We should also test this case: ```cpp struct A { union { int n; int m=0; }; }; const A a; ``` https://github.com/llvm/llvm-project/pull/96301 _

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread Shafik Yaghmour via cfe-commits
shafik wrote: CC @tbaederr this does not look like equivalent code to me based on your original isue but maybe I am confused. https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

  1   2   3   4   5   6   7   8   >