arphaman (Alex Lorenz)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 25 2014, 4:17 PM (191 w, 3 d)

Recent Activity

Yesterday

arphaman committed rC325994: [Sema][ObjC] Process category attributes before checking protocol uses.
[Sema][ObjC] Process category attributes before checking protocol uses
Fri, Feb 23, 3:54 PM
arphaman committed rL325994: [Sema][ObjC] Process category attributes before checking protocol uses.
[Sema][ObjC] Process category attributes before checking protocol uses
Fri, Feb 23, 3:54 PM

Mon, Feb 12

arphaman accepted D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.

LGTM, I didn't find any issues

Mon, Feb 12, 5:28 PM

Thu, Feb 8

arphaman committed rC324651: PR36307: Consume the #pragma options align annotation token after.
PR36307: Consume the #pragma options align annotation token after
Thu, Feb 8, 1:22 PM
arphaman committed rL324651: PR36307: Consume the #pragma options align annotation token after.
PR36307: Consume the #pragma options align annotation token after
Thu, Feb 8, 1:22 PM

Wed, Feb 7

arphaman abandoned D42933: [Sema] Avoid -Wformat warning for NSInteger/NSUInteger 'int' values with %zu/%zi long specifiers.

Thanks for your input. You're right, this warning is quite correct (even though it seems like too much).

Wed, Feb 7, 2:10 PM
arphaman committed rC324514: [PR36008] Avoid -Wsign-compare warning for enum constants in.
[PR36008] Avoid -Wsign-compare warning for enum constants in
Wed, Feb 7, 12:49 PM
arphaman committed rL324514: [PR36008] Avoid -Wsign-compare warning for enum constants in.
[PR36008] Avoid -Wsign-compare warning for enum constants in
Wed, Feb 7, 12:49 PM
arphaman closed D42561: [PR36008] Avoid -Wsign-compare warning for enum constants in typeof expressions.
Wed, Feb 7, 12:49 PM · Restricted Project

Mon, Feb 5

arphaman updated the diff for D42561: [PR36008] Avoid -Wsign-compare warning for enum constants in typeof expressions.

Address review comments and fix the inverted check case.

Mon, Feb 5, 3:58 PM · Restricted Project
arphaman created D42933: [Sema] Avoid -Wformat warning for NSInteger/NSUInteger 'int' values with %zu/%zi long specifiers.
Mon, Feb 5, 3:00 PM

Wed, Jan 31

arphaman committed rL323921: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack.
[PR32482] Fix bitfield layout for -mms-bitfield and pragma pack
Wed, Jan 31, 2:02 PM
arphaman committed rC323921: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack.
[PR32482] Fix bitfield layout for -mms-bitfield and pragma pack
Wed, Jan 31, 2:02 PM
arphaman closed D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack.
Wed, Jan 31, 2:02 PM

Tue, Jan 30

arphaman added a comment to D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack.

Oops, that logic turned out to be incorrect. We simply have to start a new storage unit when the new bitfield's size is wider than the available bits.

Tue, Jan 30, 1:17 PM
arphaman updated the diff for D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack.

Fix packing logic.

Tue, Jan 30, 1:17 PM

Mon, Jan 29

arphaman created D42660: [PR32482] Fix bitfield layout for -mms-bitfield and pragma pack.
Mon, Jan 29, 2:20 PM

Jan 25 2018

arphaman created D42561: [PR36008] Avoid -Wsign-compare warning for enum constants in typeof expressions.
Jan 25 2018, 4:32 PM · Restricted Project

Jan 19 2018

arphaman accepted D41688: [Lex] Fix crash on code completion in comment in included file..

I think that's a sensible fix, thanks!

Jan 19 2018, 3:14 PM

Jan 4 2018

arphaman accepted D41750: Fix TLS support check for Darwin 32-bit simulator targets..

LGTM, thanks

Jan 4 2018, 6:25 PM

Jan 3 2018

arphaman committed rL321775: PR35815: Separate out the ns-consumed diagnostic into an error and.
PR35815: Separate out the ns-consumed diagnostic into an error and
Jan 3 2018, 3:54 PM
arphaman committed rC321775: PR35815: Separate out the ns-consumed diagnostic into an error and.
PR35815: Separate out the ns-consumed diagnostic into an error and
Jan 3 2018, 3:53 PM

Dec 29 2017

arphaman committed rL321559: [driver][darwin] Take the OS version from -m<os>-version-min argument when.
[driver][darwin] Take the OS version from -m<os>-version-min argument when
Dec 29 2017, 9:43 AM
arphaman committed rC321559: [driver][darwin] Take the OS version from -m<os>-version-min argument when.
[driver][darwin] Take the OS version from -m<os>-version-min argument when
Dec 29 2017, 9:43 AM

Dec 21 2017

arphaman abandoned D41526: [libclang] Avoid builtin trap for __debug parser_crash pragma.

It turns out there's already something that works much better: #pragma clang __debug handle_crash. Sorry about the redundant patch!

Dec 21 2017, 4:23 PM
arphaman accepted D41528: [Sema] Don't emit the -Wstrict-prototypes warning for variadic functions..

LGTM, thank you

Dec 21 2017, 4:06 PM
arphaman created D41526: [libclang] Avoid builtin trap for __debug parser_crash pragma.
Dec 21 2017, 3:16 PM
arphaman updated the diff for D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option.

Address review comments

Dec 21 2017, 1:22 PM
arphaman added a comment to D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option.

Hi Alex,

Thanks for improving this.

  • Instead of adding -cc1gen-reproducer, why can't you run that through -cc1 and have a flag similar to -###, which just prints the reproducer line?
Dec 21 2017, 1:22 PM

Dec 20 2017

arphaman committed rL321222: Fix an assertion failure regression in isDesignatorAtObjectEnd for.
Fix an assertion failure regression in isDesignatorAtObjectEnd for
Dec 20 2017, 1:04 PM
arphaman committed rC321222: Fix an assertion failure regression in isDesignatorAtObjectEnd for.
Fix an assertion failure regression in isDesignatorAtObjectEnd for
Dec 20 2017, 1:04 PM
arphaman closed D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct .
Dec 20 2017, 1:04 PM
arphaman added a comment to D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct .

LGTM assuming my nit gets addressed.

Thank you!

Maybe someone who's more familiar with this builtin could point to the cause of this discrepancy

Yeah, the documentation for this builtin is pretty sparse. My guess: clang assumes that the array's size is unknown because it's both an array and at the end of a struct. This exists because code will do clever things like

struct string {
  size_t len;
  char buf[1]; // actual string is accessed from here; `string` just gets overallocated to hold it all.
};

in FreeBSD-land, they also recommend overallocation with sockaddrs, which have a 14-length trailing element: https://www.freebsd.org/doc/en/books/developers-handbook/sockets-essential-functions.html

...So, the best compatible heuristic we've been able to settle on here, sadly, is "are we touching the final element in a struct, and is that element an array?" On the bright side, clang failing just means LLVM gets to try to figure it out, so only some hope of getting a useful answer is lost. :)

It's interesting that GCC tries to do better here, since AIUI it has a similar heuristic meant to cope with code like the above.

Dec 20 2017, 12:53 PM

Dec 19 2017

arphaman committed rC321145: [darwin][driver] Warn about mismatching -<os>-version-min rather than.
[darwin][driver] Warn about mismatching -<os>-version-min rather than
Dec 19 2017, 6:32 PM
arphaman committed rL321145: [darwin][driver] Warn about mismatching -<os>-version-min rather than.
[darwin][driver] Warn about mismatching -<os>-version-min rather than
Dec 19 2017, 6:32 PM
arphaman closed D41425: [darwin][driver] Warn about mismatching -<os>-version-min rather than superfluous -<os>-version-min compiler option.
Dec 19 2017, 6:32 PM
arphaman added inline comments to D41425: [darwin][driver] Warn about mismatching -<os>-version-min rather than superfluous -<os>-version-min compiler option.
Dec 19 2017, 6:30 PM
arphaman added inline comments to D41425: [darwin][driver] Warn about mismatching -<os>-version-min rather than superfluous -<os>-version-min compiler option.
Dec 19 2017, 6:10 PM
arphaman created D41425: [darwin][driver] Warn about mismatching -<os>-version-min rather than superfluous -<os>-version-min compiler option.
Dec 19 2017, 5:40 PM
arphaman abandoned D41424: [darwin][driver] Warn about mismatching -<os>-version-min rather than superfl.
Dec 19 2017, 5:37 PM
arphaman created D41424: [darwin][driver] Warn about mismatching -<os>-version-min rather than superfl.
Dec 19 2017, 5:37 PM
arphaman committed rC321102: [driver][darwin] Set the 'simulator' environment when it's specified.
[driver][darwin] Set the 'simulator' environment when it's specified
Dec 19 2017, 11:57 AM
arphaman committed rL321102: [driver][darwin] Set the 'simulator' environment when it's specified.
[driver][darwin] Set the 'simulator' environment when it's specified
Dec 19 2017, 11:57 AM
arphaman closed D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'.
Dec 19 2017, 11:57 AM
arphaman committed rL321099: [driver][darwin] Take the OS version specified in "-target" as the target.
[driver][darwin] Take the OS version specified in "-target" as the target
Dec 19 2017, 11:06 AM
arphaman committed rC321099: [driver][darwin] Take the OS version specified in "-target" as the target.
[driver][darwin] Take the OS version specified in "-target" as the target
Dec 19 2017, 11:05 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Dec 19 2017, 11:05 AM
arphaman added a comment to D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct .

Note that even though there is a discrepancy between GCC and Clang, this patch does not change Clang's behavior in this instance as it emitted -1 previously as well

Dec 19 2017, 11:03 AM
arphaman created D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct .
Dec 19 2017, 11:01 AM

Dec 15 2017

arphaman added inline comments to D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message.
Dec 15 2017, 2:16 PM
arphaman updated the diff for D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message.
  • Remove redundant checks.
  • Remove the ARC-specific check.
Dec 15 2017, 2:16 PM
arphaman added a comment to D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.

I'm concerned here about the check for the names as written vs. the canonical names. @compnerd pointed out one specific case with armv7, and I see that you've got special handling for "darwin", but I think there are more. What about "arm64" vs. the canonical "aarch64"? Look through the triple parsing code in Triple.cpp and I'm pretty sure you'll find more. I had been thinking about using the canonical names. However, that's not ideal either because the canonical names intentionally exclude suffixes that some users may want to distinguish (e.g., armv7 vs armv7k).

Dec 15 2017, 12:09 PM
arphaman committed rL320854: __is_target_environment: Check the environment after parsing it.
__is_target_environment: Check the environment after parsing it
Dec 15 2017, 12:08 PM
arphaman committed rC320854: __is_target_environment: Check the environment after parsing it.
__is_target_environment: Check the environment after parsing it
Dec 15 2017, 12:08 PM
arphaman committed rC320853: __is_target_arch: Check the arch and subarch instead of the arch name.
__is_target_arch: Check the arch and subarch instead of the arch name
Dec 15 2017, 11:59 AM
arphaman committed rL320853: __is_target_arch: Check the arch and subarch instead of the arch name.
__is_target_arch: Check the arch and subarch instead of the arch name
Dec 15 2017, 11:59 AM

Dec 14 2017

arphaman added a comment to D36952: [libclang] Add support for checking abstractness of records.

Fixed in r320766. Sorry about that!

Dec 14 2017, 3:41 PM · Restricted Project
arphaman committed rL320766: Remove duplicate python libclang changes from r320748.
Remove duplicate python libclang changes from r320748
Dec 14 2017, 3:41 PM
arphaman committed rC320766: Remove duplicate python libclang changes from r320748.
Remove duplicate python libclang changes from r320748
Dec 14 2017, 3:41 PM
arphaman added a comment to D36952: [libclang] Add support for checking abstractness of records.

Thanks! However, compared to diff 126298 (https://reviews.llvm.org/differential/diff/126298/), there seems to be duplication in the committed change (maybe some artifacts due to rebasing/merging?). Should I submit a follow-up patch to fix this?

Dec 14 2017, 3:38 PM · Restricted Project
arphaman added a comment to D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message.

ping

Dec 14 2017, 2:17 PM
arphaman committed rC320748: [libclang] Add support for checking abstractness of records.
[libclang] Add support for checking abstractness of records
Dec 14 2017, 2:02 PM
arphaman committed rL320748: [libclang] Add support for checking abstractness of records.
[libclang] Add support for checking abstractness of records
Dec 14 2017, 2:02 PM
arphaman closed D36952: [libclang] Add support for checking abstractness of records.
Dec 14 2017, 2:02 PM · Restricted Project
arphaman added a comment to D36952: [libclang] Add support for checking abstractness of records.

Sure, I'll do it today.

Dec 14 2017, 11:57 AM · Restricted Project
arphaman committed rL320735: Commit missing tests for r320734.
Commit missing tests for r320734
Dec 14 2017, 11:23 AM
arphaman committed rC320735: Commit missing tests for r320734.
Commit missing tests for r320734
Dec 14 2017, 11:23 AM
arphaman committed rL320734: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like.
[Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like
Dec 14 2017, 11:22 AM
arphaman committed rC320734: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like.
[Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like
Dec 14 2017, 11:22 AM
arphaman closed D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
Dec 14 2017, 11:22 AM

Dec 13 2017

arphaman updated the diff for D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
  • Use separate functions for checks.
  • "ARM" should match "thumb" arch too.
Dec 13 2017, 3:39 PM
arphaman added inline comments to D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
Dec 13 2017, 11:42 AM
arphaman added inline comments to D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
Dec 13 2017, 11:41 AM

Dec 12 2017

arphaman updated the diff for D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
  • Change error message.
  • Take sub arch into account.
Dec 12 2017, 10:43 AM
arphaman added inline comments to D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
Dec 12 2017, 10:42 AM

Dec 11 2017

arphaman accepted D36952: [libclang] Add support for checking abstractness of records.

LGTM

Dec 11 2017, 1:18 PM · Restricted Project
arphaman created D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros.
Dec 11 2017, 12:50 PM
arphaman added a dependency for D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target': D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment.
Dec 11 2017, 10:42 AM
arphaman added a dependent revision for D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment: D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'.
Dec 11 2017, 10:42 AM
arphaman created D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'.
Dec 11 2017, 10:42 AM
arphaman abandoned D41075: [driver][darwin] Infer the 'simuluator.

Accidental 'return', will reopen

Dec 11 2017, 10:40 AM
arphaman created D41075: [driver][darwin] Infer the 'simuluator.
Dec 11 2017, 10:40 AM
arphaman updated the diff for D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment.

Don't warn about the redundant environment variable

Dec 11 2017, 9:43 AM

Dec 8 2017

arphaman committed rL320238: Fix Driver/darwin-version.c test.
Fix Driver/darwin-version.c test
Dec 8 2017, 6:57 PM
arphaman committed rC320238: Fix Driver/darwin-version.c test.
Fix Driver/darwin-version.c test
Dec 8 2017, 6:57 PM
arphaman committed rL320235: [driver][darwin] Refactor the target selection code, NFC.
[driver][darwin] Refactor the target selection code, NFC
Dec 8 2017, 6:28 PM
arphaman committed rC320235: [driver][darwin] Refactor the target selection code, NFC.
[driver][darwin] Refactor the target selection code, NFC
Dec 8 2017, 6:27 PM
arphaman closed D41035: [driver][darwin] Refactor the target selection code, NFC by committing rC320235: [driver][darwin] Refactor the target selection code, NFC.
Dec 8 2017, 6:27 PM
arphaman updated the diff for D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment.

I rewrote the patch on top of https://reviews.llvm.org/D41035 as suggested by Duncan.

Dec 8 2017, 4:54 PM
arphaman updated the diff for D41035: [driver][darwin] Refactor the target selection code, NFC.

Add static_assert

Dec 8 2017, 3:18 PM
arphaman added a comment to D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment.

Preparation refactoring patch: https://reviews.llvm.org/D41035

Dec 8 2017, 2:49 PM
arphaman added a dependency for D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment: D41035: [driver][darwin] Refactor the target selection code, NFC.
Dec 8 2017, 2:49 PM
arphaman added a dependent revision for D41035: [driver][darwin] Refactor the target selection code, NFC: D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment.
Dec 8 2017, 2:49 PM
arphaman created D41035: [driver][darwin] Refactor the target selection code, NFC.
Dec 8 2017, 2:47 PM

Dec 7 2017

arphaman created D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment.
Dec 7 2017, 6:58 PM
arphaman abandoned D40997: [driver] Take target.

Sorry, accidental Return. Will close and reopen.

Dec 7 2017, 6:55 PM
arphaman created D40997: [driver] Take target.
Dec 7 2017, 6:55 PM
arphaman created D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option.
Dec 7 2017, 1:46 PM
arphaman committed rL320085: [libclang] Record code-completion invocations to a temporary file when.
[libclang] Record code-completion invocations to a temporary file when
Dec 7 2017, 12:38 PM
arphaman committed rC320085: [libclang] Record code-completion invocations to a temporary file when.
[libclang] Record code-completion invocations to a temporary file when
Dec 7 2017, 12:38 PM