[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

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

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-09-29 Thread Shafik Yaghmour via cfe-commits
@@ -31,6 +31,33 @@ static_assert(b, ""); constexpr int one = true; static_assert(one == 1, ""); +constexpr bool b2 = bool(); +static_assert(!b2, ""); + +namespace ScalarTypes { + constexpr int ScalarInitInt = int(); + static_assert(ScalarInitInt == 0, ""); + constexpr

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

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

[clang] [clang] Add test for CWG2267 (PR #67931)

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

[clang] [NFC][clang] change remaining context-dependent type nodes to ContextualFoldingSet (PR #67751)

2023-10-02 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Thank you for improving the description. The description is usually what ends up in the git log and so it is important for that summary there to be as helpful and descriptive as possible. https://github.com/llvm/llvm-project/pull/67751

[clang] [Sema] Add check for bitfield assignments to larger integral types (PR #68276)

2023-10-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Why not wrap this into `-Wconversion` on clang as well? https://github.com/llvm/llvm-project/pull/68276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -3605,8 +3605,11 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState , Info = (); } else { // In C++14, generic lambdas allow 'auto' in their parameters. -if (!SemaRef.getLangOpts().CPlusPlus14 || !Auto || -

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > FWIW, I spoke offline with the original author of the PR and he said that > he's fine with me picking up the changes and carrying the review forward. > > Because I don't know of any better way to commandeer a patch in GitHub, I'll > probably grab the changes, get them into my

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, const CGCallee break; } } + +if (const auto *MD = +dyn_cast_if_present(OCE->getCalleeDecl()); +MD && MD->isStatic()) + StaticOperator = true; } -

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -7806,7 +7806,8 @@ class ExprEvaluatorBase // Overloaded operator calls to member functions are represented as normal // calls with '*this' as the first argument. const CXXMethodDecl *MD = dyn_cast(FD); - if (MD &&

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, const CGCallee break; } } + +if (const auto *MD = +dyn_cast_if_present(OCE->getCalleeDecl()); +MD && MD->isStatic()) + StaticOperator = true; } -

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM, just fill out the description with some more details so folks reading git log will have more context, https://github.com/llvm/llvm-project/pull/67147 ___ cfe-commits mailing list

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-09 Thread Shafik Yaghmour via cfe-commits
@@ -1629,6 +1629,8 @@ def IFunc : Attr, TargetSpecificAttr { def Restrict : InheritableAttr { let Spellings = [Declspec<"restrict">, GCC<"malloc">]; + let Args = [IdentifierArgument<"Deallocator", /*opt*/ 1>, + ParamIdxArgument<"DeallocatorPtrArgIndex",

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

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

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Just a nit https://github.com/llvm/llvm-project/pull/68059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-09 Thread Shafik Yaghmour via cfe-commits
@@ -1629,6 +1629,8 @@ def IFunc : Attr, TargetSpecificAttr { def Restrict : InheritableAttr { let Spellings = [Declspec<"restrict">, GCC<"malloc">]; + let Args = [IdentifierArgument<"Deallocator", /*opt*/ 1>, + ParamIdxArgument<"DeallocatorPtrArgIndex",

[clang] [Clang] Handle consteval expression in array bounds expressions (PR #66222)

2023-10-04 Thread Shafik Yaghmour via cfe-commits
@@ -15090,8 +15093,9 @@ static void CheckImplicitConversion(Sema , Expr *E, QualType T, if (SourceBT && TargetBT && SourceBT->isIntegerType() && TargetBT->isFloatingType() && !IsListInit) { // Determine the number of precision bits in the source integer type. -

[clang] [Clang] Handle consteval expression in array bounds expressions (PR #66222)

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

[clang] [Clang] Handle consteval expression in array bounds expressions (PR #66222)

2023-10-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM after fixing nits. https://github.com/llvm/llvm-project/pull/66222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle consteval expression in array bounds expressions (PR #66222)

2023-10-04 Thread Shafik Yaghmour via cfe-commits
@@ -14143,8 +14145,9 @@ static void AnalyzeComparison(Sema , BinaryOperator *E) { } // Otherwise, calculate the effective range of the signed operand. - IntRange signedRange = GetExprRange( - S.Context, signedOperand, S.isConstantEvaluated(), /*Approximate*/ true);

[clang] [Clang] Fix constant evaluating a captured variable in a lambda (PR #68090)

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

[clang] [clang] fix hasAnyBase not binding submatchers (PR #67939)

2023-10-04 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I think you should also add `[ASTMatcher]` to the subject after `[Clang]` at least that is what past PRs seem to do. https://github.com/llvm/llvm-project/pull/67939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][doc] Add documentation for the ASTs used to represent C++ templates (PR #66436)

2023-10-04 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I would hate to lose the non-diagram part of this documentation. Do the criticism mainly apply to the diagrams and the text documentation is ok for most? https://github.com/llvm/llvm-project/pull/66436 ___ cfe-commits mailing list

[clang] 33b6b67 - [clang] Fix crash in __builtin_strncmp and other related builtin functions

2023-08-25 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-08-25T13:54:50-07:00 New Revision: 33b6b674620d77e615d569f504b306aac528bab7 URL: https://github.com/llvm/llvm-project/commit/33b6b674620d77e615d569f504b306aac528bab7 DIFF:

[clang] 5ff992b - [DEBUG-INFO] Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-21 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-04-21T14:58:50-07:00 New Revision: 5ff992bca208a0e37ca6338fc735aec6aa848b72 URL: https://github.com/llvm/llvm-project/commit/5ff992bca208a0e37ca6338fc735aec6aa848b72 DIFF:

[clang] aea82d4 - [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum

2022-07-25 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-07-25T16:01:01-07:00 New Revision: aea82d4551139ded0290afab739f0b367d055628 URL: https://github.com/llvm/llvm-project/commit/aea82d4551139ded0290afab739f0b367d055628 DIFF:

[clang] 80dec2e - [Clang] Modify CXXMethodDecl::isMoveAssignmentOperator() to look through type sugar

2022-07-14 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-07-14T16:09:52-07:00 New Revision: 80dec2ecfffe30f86ecfeec8f553b16bb992c48b URL: https://github.com/llvm/llvm-project/commit/80dec2ecfffe30f86ecfeec8f553b16bb992c48b DIFF:

[clang] a0d6105 - [Clang] Fix handling of Max from getValueRange(...) in IntExprEvaluator::VisitCastExpr(...)

2022-07-29 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-07-29T19:17:42-07:00 New Revision: a0d61051628825e2f394240dc442ad5d81fa78bc URL: https://github.com/llvm/llvm-project/commit/a0d61051628825e2f394240dc442ad5d81fa78bc DIFF:

[clang] 28cd7f8 - Revert "[Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values"

2022-07-27 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-07-27T15:31:41-07:00 New Revision: 28cd7f86ed0e94ea3ae56a49ba85f0ccb7b51dd4 URL: https://github.com/llvm/llvm-project/commit/28cd7f86ed0e94ea3ae56a49ba85f0ccb7b51dd4 DIFF:

[clang] a371058 - [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-07-27T14:59:35-07:00 New Revision: a3710589f285de0bb22ff92b1fc24df9411e986f URL: https://github.com/llvm/llvm-project/commit/a3710589f285de0bb22ff92b1fc24df9411e986f DIFF:

[clang] 21dfe48 - [Clang] Fix assert in Sema::LookupTemplateName so that it does not attempt an unconditional cast to TagType

2022-08-26 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-26T09:40:43-07:00 New Revision: 21dfe482e13e3b64801372f8b3db75eeb85b3135 URL: https://github.com/llvm/llvm-project/commit/21dfe482e13e3b64801372f8b3db75eeb85b3135 DIFF:

[clang] b9f7678 - [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...)

2022-08-30 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-30T18:08:44-07:00 New Revision: b9f767884669db0b5a56d87b0e8733614d8f884d URL: https://github.com/llvm/llvm-project/commit/b9f767884669db0b5a56d87b0e8733614d8f884d DIFF:

[clang] 9f6b319 - [Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is not deleted before attempting to call DefineDefaultedFunction(...)

2022-09-02 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-09-02T18:59:15-07:00 New Revision: 9f6b3199d33c146937f29feb62e123f34138f770 URL: https://github.com/llvm/llvm-project/commit/9f6b3199d33c146937f29feb62e123f34138f770 DIFF:

[clang] aa7ce60 - [Clang] Avoid crashes when parsing using enum declarations

2022-08-27 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-27T15:18:36-07:00 New Revision: aa7ce60536a642e825d26d89b4a4347a36b63360 URL: https://github.com/llvm/llvm-project/commit/aa7ce60536a642e825d26d89b4a4347a36b63360 DIFF:

[clang] f8a37a6 - [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()

2022-09-18 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-09-18T11:54:32-07:00 New Revision: f8a37a6ce67470f9f6b3a4dacb65c637c2958b8d URL: https://github.com/llvm/llvm-project/commit/f8a37a6ce67470f9f6b3a4dacb65c637c2958b8d DIFF:

[clang] 4e45876 - [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-10 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-10T11:12:01-07:00 New Revision: 4e458765aaef7988e687e190d865f331727825c0 URL: https://github.com/llvm/llvm-project/commit/4e458765aaef7988e687e190d865f331727825c0 DIFF:

[clang] 2608f55 - [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-11T13:44:26-07:00 New Revision: 2608f553b8fd02bfd5a81d9e45406cee0c2dfe26 URL: https://github.com/llvm/llvm-project/commit/2608f553b8fd02bfd5a81d9e45406cee0c2dfe26 DIFF:

[clang] 1067745 - [Clang] Fix for Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-11T15:34:58-07:00 New Revision: 106774515b77d55edeab6e80555c410efc1f586a URL: https://github.com/llvm/llvm-project/commit/106774515b77d55edeab6e80555c410efc1f586a DIFF:

[clang] 8de5137 - [Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

2022-08-17 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-17T14:14:00-07:00 New Revision: 8de51375f12d91675a18d17f262276e65f43fbe0 URL: https://github.com/llvm/llvm-project/commit/8de51375f12d91675a18d17f262276e65f43fbe0 DIFF:

[clang] cc10411 - [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2022-08-08 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-08T16:23:07-07:00 New Revision: cc104113ddecbdcec2cca848adbb6afa1214e9de URL: https://github.com/llvm/llvm-project/commit/cc104113ddecbdcec2cca848adbb6afa1214e9de DIFF:

[clang] a013839 - [Clang] Diagnose undefined behavior in a constant expression while evaluating a compound assignment with remainder as operand

2023-01-12 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-01-12T08:04:04-08:00 New Revision: a0138390dd2ac2130c9f76e6778d6e45e4dc5526 URL: https://github.com/llvm/llvm-project/commit/a0138390dd2ac2130c9f76e6778d6e45e4dc5526 DIFF:

[clang] 475cc44 - [Clang] Modify sanity check assert in AggExprEmitter::VisitInitListExpr to cover anonymous struct in a union GNU extension

2022-12-21 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-12-21T10:50:05-08:00 New Revision: 475cc44a2cba45c5449a323c6b331ddc593bd8de URL: https://github.com/llvm/llvm-project/commit/475cc44a2cba45c5449a323c6b331ddc593bd8de DIFF:

[clang] 54be300 - [Clang] Fix Sema::ClassifyName so that it classifies EnumConstantDecl as NonType when they are brought into scope via using enum

2022-11-29 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-11-29T10:39:21-08:00 New Revision: 54be300f7e0bc4edaf54e9289b2380bd210a37bc URL: https://github.com/llvm/llvm-project/commit/54be300f7e0bc4edaf54e9289b2380bd210a37bc DIFF:

[clang] 9332ddf - [Clang] Extend the number of case Sema::CheckForIntOverflow covers

2022-11-15 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-11-15T12:07:03-08:00 New Revision: 9332ddfba69c38f9ceef4175b042fba0bb8e67bb URL: https://github.com/llvm/llvm-project/commit/9332ddfba69c38f9ceef4175b042fba0bb8e67bb DIFF:

[clang] ef10f81 - [Clang] Adjust assert from Sema::BuildCXXTypeConstructExpr

2022-12-01 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-12-01T09:40:18-08:00 New Revision: ef10f81985f665c553c818e1c5962aebb8f36f0c URL: https://github.com/llvm/llvm-project/commit/ef10f81985f665c553c818e1c5962aebb8f36f0c DIFF:

[clang] 6ec446d - [Clang] Add sanity check in Sema::getDestructorName to prevent nullptr dereference

2023-01-25 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-01-25T10:49:04-08:00 New Revision: 6ec446ddcee33777a8420c227374f7b422a7df1b URL: https://github.com/llvm/llvm-project/commit/6ec446ddcee33777a8420c227374f7b422a7df1b DIFF:

[clang] 2bd8aee - [Clang] Fix unconditional access to Attr pointer when checking if _Nullable is applicable to a type

2023-01-30 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-01-30T13:28:29-08:00 New Revision: 2bd8aeea7e7d885fbf6c70c0e181b1e8e6b808a5 URL: https://github.com/llvm/llvm-project/commit/2bd8aeea7e7d885fbf6c70c0e181b1e8e6b808a5 DIFF:

[clang] 67ee18c - [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context

2023-01-31 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-01-31T09:35:12-08:00 New Revision: 67ee18cc7a308ae8418689c4f03a1be73b8b874a URL: https://github.com/llvm/llvm-project/commit/67ee18cc7a308ae8418689c4f03a1be73b8b874a DIFF:

[clang] c41be8f - [Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an unevaluated context is not within a CXXRecordDecl or CXXMethodDecl

2023-03-14 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-03-14T16:37:58-07:00 New Revision: c41be8fc741dec82e6c628d0cad742285be293f6 URL: https://github.com/llvm/llvm-project/commit/c41be8fc741dec82e6c628d0cad742285be293f6 DIFF:

[clang] d6d59e6 - [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a non-placemaker token and placemaker token as a non-placemaker token

2023-02-17 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-02-17T14:57:32-08:00 New Revision: d6d59e660bc75d14f423fb3817834f832bbf4543 URL: https://github.com/llvm/llvm-project/commit/d6d59e660bc75d14f423fb3817834f832bbf4543 DIFF:

[clang] 6d0fab4 - [Clang] Fix defaulted equality operator so that it does not attempt to compare unnamed bit-fields

2023-04-14 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-04-14T15:01:00-07:00 New Revision: 6d0fab467efbc7ce92bd890d9618259c4995ddcc URL: https://github.com/llvm/llvm-project/commit/6d0fab467efbc7ce92bd890d9618259c4995ddcc DIFF:

[clang] 20a3fb9 - [Clang] Fix how ReadMacroParameterList handles comments in macro parameter-list when in -CC mode

2023-03-30 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-03-30T13:37:21-07:00 New Revision: 20a3fb9740ddadc61fbc8bc76836935d1a408d83 URL: https://github.com/llvm/llvm-project/commit/20a3fb9740ddadc61fbc8bc76836935d1a408d83 DIFF:

[clang] d89c653 - [Clang] Fix filtering of inline namespaces for friend functions

2023-04-07 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-04-07T08:58:39-07:00 New Revision: d89c6530fdb57da31f4750bf941a0e4a090c4474 URL: https://github.com/llvm/llvm-project/commit/d89c6530fdb57da31f4750bf941a0e4a090c4474 DIFF:

[clang] f9b854b - [Clang] Fix buildbots after Fix filtering of inline namespaces for friend functions commit

2023-04-07 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-04-07T09:18:15-07:00 New Revision: f9b854bc8f0bfe2a38b00fab401bb1982eb8e61e URL: https://github.com/llvm/llvm-project/commit/f9b854bc8f0bfe2a38b00fab401bb1982eb8e61e DIFF:

[clang] b206cde - [Clang][Attributes] Add MeaningfulToClassTemplateDefinition to unavailable attribute

2023-04-06 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-04-06T14:40:39-07:00 New Revision: b206cde3504c0078469f02bd74aeb5eb5ab875f5 URL: https://github.com/llvm/llvm-project/commit/b206cde3504c0078469f02bd74aeb5eb5ab875f5 DIFF:

[clang] c9ef33e - [Clang] Fix crash when emitting diagnostic for out of order designated initializers in C++

2023-07-14 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-07-14T15:57:51-07:00 New Revision: c9ef33e1d8a8aeb68a18f24af6d9fc9ab4ecf257 URL: https://github.com/llvm/llvm-project/commit/c9ef33e1d8a8aeb68a18f24af6d9fc9ab4ecf257 DIFF:

[clang] 2a23de0 - [Clang] Switch from TransformExpr to TransformInitializer in places we need to revert initializer to it syntactic form for Sema

2023-05-25 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-05-25T09:50:56-07:00 New Revision: 2a23de01e51545d01055229baea4d4a296b65058 URL: https://github.com/llvm/llvm-project/commit/2a23de01e51545d01055229baea4d4a296b65058 DIFF:

[clang] 086183c - [Clang] Add check to Sema::AddAlignedAttr to verify active bits is not out of range

2023-06-08 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-06-08T13:53:33-07:00 New Revision: 086183c6c65fc8106b8cae99af95c4974b975f51 URL: https://github.com/llvm/llvm-project/commit/086183c6c65fc8106b8cae99af95c4974b975f51 DIFF:

[clang] cc1b666 - [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases

2023-07-28 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-07-28T15:21:57-07:00 New Revision: cc1b6668c57170cd440d321037ced89d6a61a9cb URL: https://github.com/llvm/llvm-project/commit/cc1b6668c57170cd440d321037ced89d6a61a9cb DIFF:

[clang] d1fcce9 - [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-29 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-06-29T15:42:18-07:00 New Revision: d1fcce97a6af872e64b365d80d5b85eb94487dc8 URL: https://github.com/llvm/llvm-project/commit/d1fcce97a6af872e64b365d80d5b85eb94487dc8 DIFF:

[clang] 96bc786 - [Clang] Update warning on some designator initializer cases involving unions

2023-05-08 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-05-08T11:14:33-07:00 New Revision: 96bc78631f16fe5ce2e7e6000b74d790b32f7a16 URL: https://github.com/llvm/llvm-project/commit/96bc78631f16fe5ce2e7e6000b74d790b32f7a16 DIFF:

[clang] b4692f2 - [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-05-04T11:07:16-07:00 New Revision: b4692f29263006c7ea519c7b11c9082384f0af53 URL: https://github.com/llvm/llvm-project/commit/b4692f29263006c7ea519c7b11c9082384f0af53 DIFF:

[clang] 7887af0 - Fix build bots due to missing a commit thay change 2b to 23

2023-05-04 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2023-05-04T11:33:58-07:00 New Revision: 7887af027ee5eff27bbc953074726ab8d9d9f592 URL: https://github.com/llvm/llvm-project/commit/7887af027ee5eff27bbc953074726ab8d9d9f592 DIFF:

[llvm] [clang] [clang-tools-extra] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-20 Thread Shafik Yaghmour via cfe-commits
@@ -11321,9 +11321,20 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-02-08 Thread Shafik Yaghmour via cfe-commits
@@ -39,7 +39,43 @@ namespace addressof { struct U { int n : 5; } u; int *pbf = __builtin_addressof(u.n); // expected-error {{address of bit-field requested}} - S *ptmp = __builtin_addressof(S{}); // expected-error {{taking the address of a temporary}} expected-warning

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

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

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

2024-02-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Just a quick question https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-08 Thread Shafik Yaghmour via cfe-commits
@@ -1600,12 +1600,25 @@ Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo, return ExprError(Diag(TyBeginLoc, diag::err_init_for_function_type) << Ty << FullRange); - // C++17 [expr.type.conv]p2: - // If the type is cv void and the

[clang] [clang-tools-extra] [Sema][clangd] add noexcept to override functions during code completion (PR #75937)

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

[clang] [clang-tools-extra] [Sema][clangd] add noexcept to override functions during code completion (PR #75937)

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

[clang] [clang-tools-extra] [Sema][clangd] add noexcept to override functions during code completion (PR #75937)

2024-02-09 Thread Shafik Yaghmour via cfe-commits
@@ -183,7 +184,7 @@ class ResultBuilder { /// Overloaded C++ member functions found by SemaLookup. /// Used to determine when one overload is dominated by another. - llvm::DenseMap, ShadowMapEntry> + llvm::DenseMap, ShadowMapEntry> shafik wrote:

[clang] [C23] Do not diagnose binary literals as an extension (PR #81658)

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

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/82407 In 765d8a192180f8f33618087b15c022fe758044af we impelemented a fix for incorrect deletion of default constructors in unions. This fix missed a case and so this PR will extend the fix to cover the additional case.

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -9442,9 +9442,21 @@ bool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall( int DiagKind = -1; - if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::NoMemberOrDeleted) -DiagKind = !Decl ? 0 : 1; - else if (SMOR.getKind() ==

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/82407 >From 5fcaeaddccc0f7e370bf7bebce113d8d52e1b1bd Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 20 Feb 2024 11:22:39 -0800 Subject: [PATCH] [Clang][Sema] Fix incorrect rejection default construction of

[clang] [Clang] Fix assert when transforming a pack indexing type. (PR #82234)

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

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM, thanks for submitting a fix. https://github.com/llvm/llvm-project/pull/82251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -2343,17 +2349,9 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, // - if the class is a union having variant members, exactly one of them // shall be initialized; shafik wrote: We need add a reference to

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -2471,6 +2480,23 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, return true; } +static bool +checkUnionConstructorIntializer(Sema , const FunctionDecl *Dcl, +const CXXConstructorDecl *Constructor, +

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -2471,6 +2480,23 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, return true; } +static bool +checkUnionConstructorIntializer(Sema , const FunctionDecl *Dcl, shafik wrote: I really don't like this name, I don't feel like it

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -2471,6 +2480,23 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, return true; } +static bool +checkUnionConstructorIntializer(Sema , const FunctionDecl *Dcl, +const CXXConstructorDecl *Constructor, +

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

2024-02-20 Thread Shafik Yaghmour via cfe-commits
@@ -2393,6 +2391,17 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, Kind)) return false; } +} else if (!Constructor->isDelegatingConstructor()) { shafik wrote: Can

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/82407 >From 5fcaeaddccc0f7e370bf7bebce113d8d52e1b1bd Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 20 Feb 2024 11:22:39 -0800 Subject: [PATCH] [Clang][Sema] Fix incorrect rejection default construction of

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/82407 >From 5fcaeaddccc0f7e370bf7bebce113d8d52e1b1bd Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 20 Feb 2024 11:22:39 -0800 Subject: [PATCH] [Clang][Sema] Fix incorrect rejection default construction of

[clang] [Clang][Sema] Fix incorrect rejection default construction of union with nontrivial member (PR #82407)

2024-02-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/82407 >From 5fcaeaddccc0f7e370bf7bebce113d8d52e1b1bd Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 20 Feb 2024 11:22:39 -0800 Subject: [PATCH] [Clang][Sema] Fix incorrect rejection default construction of

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-21 Thread Shafik Yaghmour via cfe-commits
@@ -1760,6 +1760,21 @@ class BuiltinTemplateDecl : public TemplateDecl { BuiltinTemplateKind getBuiltinTemplateKind() const { return BTK; } }; +/// Provides information about an explicit instantiation of a variable or class +/// template. +struct ExplicitInstantiationInfo {

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-21 Thread Shafik Yaghmour via cfe-commits
@@ -1760,6 +1760,21 @@ class BuiltinTemplateDecl : public TemplateDecl { BuiltinTemplateKind getBuiltinTemplateKind() const { return BTK; } }; +/// Provides information about an explicit instantiation of a variable or class +/// template. +struct ExplicitInstantiationInfo {

[clang] Diagnosis for constexpr constructor not initializing a union member Resolves #46689 (PR #81042)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you the PR. Your summary is blank but should describe the problem you are trying to solve, how the PR solves it and should at the end link to any llvm issues this relates to. Having solid summaries is critical since this is normally what one sees

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think this makes sense but I would like @cor3ntin to approve. https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

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

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -168,3 +168,30 @@ auto lambda4 = [] requires(sizeof(char) == 1){}; // expected-error {{expected bo #if __cplusplus <= 202002L // expected-warning@-2{{lambda without a parameter clause is a C++23 extension}} #endif + +namespace GH78524 { + +template T Foo; + +template

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -1385,6 +1385,11 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // The

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
shafik wrote: @AaronBallman since this involves compound literals a C-ism, I would like you to review this as well. https://github.com/llvm/llvm-project/pull/80519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++14 -verify -fcxx-exceptions -Werror=c++14-extensions -Werror=c++20-extensions %s + +template struct C { +union { + int i; +}; +constexpr C() {} // expected-error {{constexpr union constructor that does not

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -224,6 +224,9 @@ struct TemplateInit { }; // FIXME: This is ill-formed (no diagnostic required). We should diagnose it. constexpr TemplateInit() {} // desired-error {{must initialize all members}} +#ifndef CXX2A shafik wrote: We normally do this

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2023-12-18 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Can we please have a more detailed summary for this PR? We rely on more detailed summaries in git logs. https://github.com/llvm/llvm-project/pull/75590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix CTAD not respect default template arguments that were added after the definition. (PR #75569)

2023-12-18 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Can we please add more detailed summaries, we want the git log to be sufficient for triaging various issues without having to dig into each commit individually. https://github.com/llvm/llvm-project/pull/75569 ___ cfe-commits mailing

[clang] [clang] Fix CTAD not respect default template arguments that were added after the definition. (PR #75569)

2023-12-18 Thread Shafik Yaghmour via cfe-commits
@@ -2061,13 +2070,13 @@ DeclResult Sema::CheckClassTemplate( if (!(TUK == TUK_Friend && CurContext->isDependentContext()) && CheckTemplateParameterList( TemplateParams, - PrevClassTemplate - ?

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2023-12-18 Thread Shafik Yaghmour via cfe-commits
@@ -283,6 +283,28 @@ bool ByteCodeExprGen::VisitCastExpr(const CastExpr *CE) { case CK_ToVoid: return discard(SubExpr); + case CK_IntegralRealToComplex: + case CK_FloatingRealToComplex: { +// We're creating a complex value here, so we need to +// allocate

[clang] [clang] Fix CTAD not work for C++ explicit type conversion (functional annotation). (PR #75779)

2023-12-18 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Can you please update your summary to explain the problem and how the fix addresses the problem. This is usually what goes into the git log and we want those to be as descriptive as possible but also it help code reviewers to understand what they are reviewing quicker.

<    1   2   3   4   5   6   7   >