Page MenuHomePhabricator

shafik (Shafik Yaghmour)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 12 2018, 2:31 PM (245 w, 3 d)

Recent Activity

Tue, Mar 21

shafik added a comment to D140184: Fix crash with lambda and variadic template.

It looks like we might have another similar bug: https://github.com/llvm/llvm-project/issues/61589

Tue, Mar 21, 8:56 PM · Restricted Project

Mon, Mar 20

shafik added reviewers for D146465: [clang] Fix 2 bugs with parenthesized aggregate initialization: Restricted Project, rsmith, erichkeane, aaron.ballman.
Mon, Mar 20, 5:42 PM · Restricted Project, Restricted Project
shafik added a comment to D146426: [Sema] Fix crash on __fp16 parameters in template instantiations.

As I noted in the bug report not doing D.setInvalidType(); does fix this bug and seems harmless since the error diagnostic should prevent us from getting to codegen but it is not clear to me if this has other negative impacts. Reading your replies it is not obvious you looked at this path or not.

Mon, Mar 20, 1:54 PM · Restricted Project, Restricted Project
shafik added a reviewer for D146426: [Sema] Fix crash on __fp16 parameters in template instantiations: Restricted Project.

Adding clang-language-wg for more visibility

Mon, Mar 20, 9:22 AM · Restricted Project, Restricted Project
shafik added a comment to D146426: [Sema] Fix crash on __fp16 parameters in template instantiations.

Please edit the summary to indicate this fixes: https://github.com/llvm/llvm-project/issues/61441
I am happy someone had more time to dig into this problem after my initial investigation.

Thanks, done!
I wasn't aware of the upstream bug and your prior investigation. It would have definitely saved some time.

Mon, Mar 20, 9:13 AM · Restricted Project, Restricted Project
shafik added inline comments to D146426: [Sema] Fix crash on __fp16 parameters in template instantiations.
Mon, Mar 20, 9:12 AM · Restricted Project, Restricted Project
shafik added inline comments to D146426: [Sema] Fix crash on __fp16 parameters in template instantiations.
Mon, Mar 20, 9:07 AM · Restricted Project, Restricted Project
shafik added a comment to D146426: [Sema] Fix crash on __fp16 parameters in template instantiations.

Please edit the summary to indicate this fixes: https://github.com/llvm/llvm-project/issues/61441

Mon, Mar 20, 9:03 AM · Restricted Project, Restricted Project

Sat, Mar 18

shafik added inline comments to D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables.
Sat, Mar 18, 12:59 PM · Restricted Project, Restricted Project
shafik added a comment to D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables.

Thank you for submitting this fix.

Sat, Mar 18, 12:24 PM · Restricted Project, Restricted Project

Fri, Mar 17

shafik updated the diff for D144511: [Clang] Fix how ReadMacroParameterList handles comments in macro parameter-list when in -CC mode.
  • Switched to LexUnexpandedNonComment in more places
  • Extended test suite to cover the new cases uncovered in the comments
Fri, Mar 17, 3:33 PM · Restricted Project
shafik added a comment to D146329: [Clang] Fix defaulted equality operator so that it does not attempt to compare unnamed bit-fields.

I would have loved to test the case from https://github.com/llvm/llvm-project/issues/61335 directly but I think in order to do it nicely I need __builtin_memset to be usable in a constant expression context. I will add this to my todo list. I am open to other alternatives for testing this.

Fri, Mar 17, 1:47 PM · Restricted Project
shafik requested review of D146329: [Clang] Fix defaulted equality operator so that it does not attempt to compare unnamed bit-fields.
Fri, Mar 17, 1:45 PM · Restricted Project

Thu, Mar 16

shafik added inline comments to D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2.
Thu, Mar 16, 9:48 PM · Restricted Project
shafik updated the diff for D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2.
  • Added release note
  • Update CXX status
Thu, Mar 16, 9:47 PM · Restricted Project
shafik updated the diff for D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2.
  • Updating diagnostic wording
  • Adding Reference to changes from p2448r2 to the comments
  • Modified p3 tests to have an extension pass as well
Thu, Mar 16, 9:37 PM · Restricted Project
shafik added a comment to D146234: [clang] Fix crash when handling nested immediate invocations.

Thank you for the fix.

Thu, Mar 16, 11:09 AM · Restricted Project, Restricted Project
shafik added a comment to D146168: [Sema] Stop stripping CV quals from *this captures in lambdas.

Can we also add the test from the bug report as a regression test, it looks like the existing test are basically covering the same thing but I have seen stranger bugs so it would be good to explicitly cover it.

Thu, Mar 16, 8:29 AM · Restricted Project, Restricted Project
shafik added a comment to D146168: [Sema] Stop stripping CV quals from *this captures in lambdas.

Can you add a summary, I realize folks can goto the release notes edit and see the bug report and then go look it up but at least a cursory summary is a little more reviewer friendly.

Thu, Mar 16, 8:23 AM · Restricted Project, Restricted Project
shafik added a reviewer for D146168: [Sema] Stop stripping CV quals from *this captures in lambdas: Restricted Project.
Thu, Mar 16, 8:17 AM · Restricted Project, Restricted Project

Wed, Mar 15

shafik added a comment to D146156: [clang][Lexer] Fix crash/assert clang::HeaderSearch::search_dir_nth.

Is there a way to test this?

Wed, Mar 15, 11:17 AM · Restricted Project, Restricted Project
shafik added reviewers for D146156: [clang][Lexer] Fix crash/assert clang::HeaderSearch::search_dir_nth: cor3ntin, tahonermann.
Wed, Mar 15, 11:16 AM · Restricted Project, Restricted Project

Tue, Mar 14

shafik added inline comments to D143334: [clang][Interp] Fix diagnosing uninitialized ctor record arrays.
Tue, Mar 14, 9:57 PM · Restricted Project, Restricted Project
shafik accepted D142617: [clang][Interp] Check This pointer without creating InterpFrame.

LGTM

Tue, Mar 14, 9:47 PM · Restricted Project, Restricted Project
shafik added inline comments to D145737: PR60985: Fix merging of lambda closure types across modules..
Tue, Mar 14, 9:05 PM · Restricted Project, Restricted Project
shafik committed rGc41be8fc741d: [Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an… (authored by shafik).
[Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an…
Tue, Mar 14, 4:38 PM · Restricted Project, Restricted Project
shafik closed D142490: [Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an unevaluated context is not within a CXXRecordDecl or CXXMethodDecl.
Tue, Mar 14, 4:38 PM · Restricted Project, Restricted Project
shafik added inline comments to D142490: [Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an unevaluated context is not within a CXXRecordDecl or CXXMethodDecl.
Tue, Mar 14, 2:03 PM · Restricted Project, Restricted Project
shafik updated the diff for D142490: [Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an unevaluated context is not within a CXXRecordDecl or CXXMethodDecl.
  • Switched to using auto in two if statements
  • Added Release notes
Tue, Mar 14, 2:02 PM · Restricted Project, Restricted Project
shafik requested review of D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2.
Tue, Mar 14, 1:52 PM · Restricted Project
shafik added a comment to D145408: Fix false positive with unreachable C++ catch handlers.

Apologies for late review.

Tue, Mar 14, 8:15 AM · Restricted Project, Restricted Project

Mon, Mar 13

shafik added inline comments to D145852: [Clang][AST] Fix __has_unique_object_representations computation for unnamed bitfields..
Mon, Mar 13, 9:25 PM · Restricted Project, Restricted Project
shafik added a comment to D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions.

LGTM, I wlll let @royjacobson give the final approval after reviewing codegen tests.

Mon, Mar 13, 8:55 PM · Restricted Project, Restricted Project

Sun, Mar 12

shafik added inline comments to D145842: [clang][Sema] Avoid duplicate diagnostics for unreachable fallthrough attribute.
Sun, Mar 12, 10:59 AM · Restricted Project, Restricted Project

Fri, Mar 10

shafik added inline comments to D145793: [clang][AST] Improve diagnostic for `nullptr` constexpr function pointer call.
Fri, Mar 10, 2:59 PM · Restricted Project, Restricted Project

Thu, Mar 9

shafik added a reviewer for D145737: PR60985: Fix merging of lambda closure types across modules.: Restricted Project.
Thu, Mar 9, 10:37 PM · Restricted Project, Restricted Project

Tue, Mar 7

shafik added a comment to D145376: [libc++] add declval failure assertion for instantiation.

This change is not correct and cannot proceed.

It changes the meaning of this code:

template <class T, class U, class = U[std::declval<T>()]>
constexpr bool xxx(int) { return true; }

template <class T, class U>
constexpr bool xxx(long) { return false; }

constexpr bool y = xxx<long long, int>(0);

declval has been constructed very carefully to performant, and correct in all the weird cases where Clang will try to eagerly instantiate something (Ex. when it tries to check for C++11 narrowing when evaluating constant expressions).
Please be cautious when modifying weird things like declval.

Tue, Mar 7, 9:35 PM · Restricted Project, Restricted Project

Mon, Mar 6

shafik accepted D145251: [clang] Treat function parameter scope as an immediate function context.

This LGTM, I agree w/ @cor3ntin about quoting [expr.cont] to document this choice.

Mon, Mar 6, 11:44 AM · Restricted Project, Restricted Project
shafik accepted D145178: [clang][NFC] reformats the SARIF diagnostic test so it's human readable.
Mon, Mar 6, 10:52 AM · Restricted Project, Restricted Project
shafik accepted D145362: [clang] Update test according to P1937.

Besides the nitpick, LGTM

Mon, Mar 6, 8:34 AM · Restricted Project, Restricted Project
shafik added a comment to D145376: [libc++] add declval failure assertion for instantiation.

Thank you for fixing this so quickly.

Mon, Mar 6, 7:51 AM · Restricted Project, Restricted Project

Fri, Mar 3

shafik added inline comments to D127259: [CodeGen] guarantee templated static variables are initialized in the reverse instantiation order.
Fri, Mar 3, 7:57 AM · Restricted Project, Restricted Project

Thu, Mar 2

shafik added a comment to D140584: [Clang] Refactor "Designators" into a unified implementation [NFC].

I think these two bug reports: https://github.com/llvm/llvm-project/issues/46132 and https://github.com/llvm/llvm-project/issues/61118 may be related to this change.

Thu, Mar 2, 7:16 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Wed, Mar 1

shafik accepted D141591: [clang][Interp] Properly identify not-yet-defined functions.

LGTM

Wed, Mar 1, 9:18 PM · Restricted Project, Restricted Project
shafik added inline comments to D144866: [clang] Fix aggregate initialization inside lambda constexpr.
Wed, Mar 1, 1:53 PM · Restricted Project, Restricted Project
shafik added inline comments to D144866: [clang] Fix aggregate initialization inside lambda constexpr.
Wed, Mar 1, 11:45 AM · Restricted Project, Restricted Project
shafik accepted D124351: [Clang] Implement Change scope of lambda trailing-return-type.

LGTM

Wed, Mar 1, 11:02 AM · Restricted Project, Restricted Project

Tue, Feb 28

shafik added inline comments to D144866: [clang] Fix aggregate initialization inside lambda constexpr.
Tue, Feb 28, 10:45 AM · Restricted Project, Restricted Project
shafik accepted D144866: [clang] Fix aggregate initialization inside lambda constexpr.

LGTM, the modules failures is a previous known issue.

Tue, Feb 28, 10:21 AM · Restricted Project, Restricted Project
shafik accepted D144272: [clang][Interp] Ignore StaticAssertDecls.

LGTM

Tue, Feb 28, 9:01 AM · Restricted Project, Restricted Project

Mon, Feb 27

shafik added inline comments to D144878: __builtin_FILE_NAME().
Mon, Feb 27, 10:44 AM · Restricted Project, Restricted Project, Restricted Project
shafik added a comment to D144866: [clang] Fix aggregate initialization inside lambda constexpr.

Also please add a release note before landing the fix, thank you.

Mon, Feb 27, 9:54 AM · Restricted Project, Restricted Project
shafik added a comment to D144866: [clang] Fix aggregate initialization inside lambda constexpr.

Thank you for this patch, it looks good.

Mon, Feb 27, 9:32 AM · Restricted Project, Restricted Project

Feb 24 2023

shafik added inline comments to D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type..
Feb 24 2023, 3:46 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
shafik added inline comments to D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type..
Feb 24 2023, 3:27 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
shafik added inline comments to D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type..
Feb 24 2023, 2:53 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Feb 23 2023

shafik added inline comments to D124351: [Clang] Implement Change scope of lambda trailing-return-type.
Feb 23 2023, 6:57 PM · Restricted Project, Restricted Project
shafik added inline comments to D124351: [Clang] Implement Change scope of lambda trailing-return-type.
Feb 23 2023, 6:23 PM · Restricted Project, Restricted Project
shafik added inline comments to D124351: [Clang] Implement Change scope of lambda trailing-return-type.
Feb 23 2023, 6:12 PM · Restricted Project, Restricted Project

Feb 21 2023

shafik requested review of D144511: [Clang] Fix how ReadMacroParameterList handles comments in macro parameter-list when in -CC mode.
Feb 21 2023, 11:48 AM · Restricted Project

Feb 20 2023

shafik added a comment to D144358: [clang][github] Added checking for completeness of lvalue in conditional operator [#59718].

Thank you for taking the time to submit a patch.

Feb 20 2023, 1:24 PM · Restricted Project, Restricted Project
shafik added a reviewer for D144358: [clang][github] Added checking for completeness of lvalue in conditional operator [#59718]: Restricted Project.
Feb 20 2023, 1:22 PM · Restricted Project, Restricted Project

Feb 17 2023

shafik committed rGd6d59e660bc7: [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a… (authored by shafik).
[Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a…
Feb 17 2023, 2:58 PM · Restricted Project, Restricted Project
shafik closed D142604: [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a non-placemaker token and placemaker token as a non-placemaker token.
Feb 17 2023, 2:58 PM · Restricted Project, Restricted Project
shafik updated the diff for D142604: [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a non-placemaker token and placemaker token as a non-placemaker token.
  • Add release note
Feb 17 2023, 2:48 PM · Restricted Project, Restricted Project
shafik added inline comments to D144285: [Clang] Implement CWG2518 - static_assert(false).
Feb 17 2023, 1:48 PM · Restricted Project, Restricted Project

Feb 16 2023

shafik accepted D142448: [clang][Interp] Handle TypeTraitExprs.
Feb 16 2023, 7:47 PM · Restricted Project, Restricted Project
shafik added inline comments to D136751: [clang][Interp] This pointers are writable in constructors.
Feb 16 2023, 7:31 PM · Restricted Project, Restricted Project
shafik added inline comments to D136751: [clang][Interp] This pointers are writable in constructors.
Feb 16 2023, 7:18 PM · Restricted Project, Restricted Project
shafik added inline comments to D141591: [clang][Interp] Properly identify not-yet-defined functions.
Feb 16 2023, 7:01 PM · Restricted Project, Restricted Project
shafik added a comment to D141194: [clang][Interp] Implement bitcasts.

I think VisitCastExpr is the right place to start looking for what to do.

Feb 16 2023, 6:37 PM · Restricted Project, Restricted Project
shafik accepted D140805: [clang][Interp] Add ArrayElemPtr{,Pop} opcode.
Feb 16 2023, 2:58 PM · Restricted Project, Restricted Project
shafik accepted D140723: [clang][Interp] Only check constructors for global variables.

LGTM

Feb 16 2023, 2:42 PM · Restricted Project, Restricted Project
shafik added a comment to D140723: [clang][Interp] Only check constructors for global variables.

So we are only checking global constructors b/c it is valid in a constant expression context to initialize a record and not initialize all their fields as long as we don't use any of those fields.

Feb 16 2023, 2:42 PM · Restricted Project, Restricted Project
shafik added inline comments to D144192: GH60642: Fix ICE when checking a lambda defined in a concept definition.
Feb 16 2023, 2:19 PM · Restricted Project

Feb 15 2023

shafik added inline comments to D144100: [clang] Fix a bug that allowed some overflowing octal escape sequences.
Feb 15 2023, 7:11 PM · Restricted Project, Restricted Project

Feb 14 2023

shafik added inline comments to D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens..
Feb 14 2023, 4:21 PM · Restricted Project, Restricted Project
shafik added a comment to D144011: [clang]Fix warning for signed conversion on LP64.

If I look at the clang docs for Wconversion I see it includes -Wshorten-64-to-32 which I believe this is a case of. I think maybe the warning needs a better warning for this case?

Feb 14 2023, 9:51 AM · Restricted Project, Restricted Project
shafik added a comment to D142604: [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a non-placemaker token and placemaker token as a non-placemaker token.

Ping

Feb 14 2023, 9:22 AM · Restricted Project, Restricted Project

Feb 13 2023

shafik accepted D142316: [clang] Add test for CWG2396.

LGTM

Feb 13 2023, 10:32 AM · Restricted Project, Restricted Project
shafik added a comment to D143891: [Clang] Adjust triviality computation in QualType::isTrivialType to C++20 cases..

This is an ABI breaking change, isn't it? (The type trait now returns something different than it did before, which could change instantiations or object layout.)

Technically it is, but it only affects code that relies on constrained default constructors, which we're only going to support in Clang 16. So if we backport this to 16 it's not very problematic.

Hmmm, if it's true that this only changes the behavior of a type with a constrained default constructor, then I think it's fine despite being an ABI break (we never claimed full support for concepts, so anyone relying on a particular behavior was mistaken to do that). I can't quite convince myself this doesn't impact other cases though -- the logic for computing triviality is nontrivial itself (pun intended), so I'm really only concerned that __is_trivial and friends return a different value for a non-constrained type. However, I also can't come up with a test case whose behavior changes either.

Feb 13 2023, 9:09 AM · Restricted Project, Restricted Project

Feb 6 2023

shafik added a comment to D142867: [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context.

The warning now fires even if overflow is prevented with if constexpr:

if constexpr (width <= 64) {
  if constexpr (width == 64) {
    return 1;
  }
  return -static_cast<int64_t>(uint64_t{1} << (width - 1));
}

https://godbolt.org/z/M3xdcKd3M

Feb 6 2023, 8:53 PM · Restricted Project, Restricted Project
shafik added inline comments to D137113: [Clang] refactor CodeGenFunction::EmitAsmStmt NFC.
Feb 6 2023, 7:02 PM · Restricted Project, Restricted Project
shafik added reviewers for D143142: [clang][lex] Enable Lexer to grow its buffer: aaron.ballman, cor3ntin, tahonermann.

WG21 is meeting all this week, so a bunch of folks who should take a look at this may not get around to it right away.

Feb 6 2023, 6:41 PM · Restricted Project, Restricted Project
shafik added inline comments to D143142: [clang][lex] Enable Lexer to grow its buffer.
Feb 6 2023, 6:40 PM · Restricted Project, Restricted Project

Feb 5 2023

shafik added a comment to D138453: [clang] Add serialization for loop hint annotation tokens.

It looks like https://github.com/llvm/llvm-project/issues/60543 is hitting your added llvm_unreachable("missing serialization code for annotation token"); is this expected.

Feb 5 2023, 2:10 PM · Restricted Project, Restricted Project

Feb 2 2023

shafik added inline comments to D140614: [C++20] Mark lambdas in lambda specifiers as dependent if necessary.
Feb 2 2023, 8:07 AM · Restricted Project, Restricted Project

Feb 1 2023

shafik added reviewers for D143099: [clang][lex] Expose findBeginningOfLine(): cor3ntin, tahonermann.
Feb 1 2023, 10:07 PM · Restricted Project, Restricted Project
shafik added inline comments to D143053: [C++20] [Modules] Pop Expression Evaluation Context when we skip its body during parsing.
Feb 1 2023, 9:12 AM · Restricted Project, Restricted Project

Jan 31 2023

shafik committed rG67ee18cc7a30: [Clang] Add machinery to catch overflow in unary minus outside of a constant… (authored by shafik).
[Clang] Add machinery to catch overflow in unary minus outside of a constant…
Jan 31 2023, 9:35 AM · Restricted Project, Restricted Project
shafik closed D142867: [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context.
Jan 31 2023, 9:35 AM · Restricted Project, Restricted Project
shafik updated the diff for D142867: [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context.
  • Add release note.
Jan 31 2023, 8:51 AM · Restricted Project, Restricted Project

Jan 30 2023

shafik committed rG2bd8aeea7e7d: [Clang] Fix unconditional access to Attr pointer when checking if _Nullable is… (authored by shafik).
[Clang] Fix unconditional access to Attr pointer when checking if _Nullable is…
Jan 30 2023, 1:29 PM · Restricted Project, Restricted Project
shafik closed D142799: [Clang] Fix unconditional access to Attr pointer when checking if _Nullable is applicable to a type.
Jan 30 2023, 1:28 PM · Restricted Project, Restricted Project
shafik added a comment to D142799: [Clang] Fix unconditional access to Attr pointer when checking if _Nullable is applicable to a type.

The build failures look unrelated to this change.

Jan 30 2023, 1:07 PM · Restricted Project, Restricted Project
shafik updated the diff for D142799: [Clang] Fix unconditional access to Attr pointer when checking if _Nullable is applicable to a type.
  • Fix up release notes
Jan 30 2023, 1:07 PM · Restricted Project, Restricted Project
shafik updated the diff for D142799: [Clang] Fix unconditional access to Attr pointer when checking if _Nullable is applicable to a type.
  • Add release note
Jan 30 2023, 10:20 AM · Restricted Project, Restricted Project
shafik added inline comments to D142316: [clang] Add test for CWG2396.
Jan 30 2023, 8:46 AM · Restricted Project, Restricted Project
shafik updated subscribers of D142692: [clang] Store the template param list of an explicit variable template specialization.

Adding clang-language-wg for more visibility.

Jan 30 2023, 8:12 AM · Restricted Project, Restricted Project, Restricted Project

Jan 29 2023

shafik requested review of D142867: [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context.
Jan 29 2023, 10:15 PM · Restricted Project, Restricted Project