Page MenuHomePhabricator

fcloutier (Félix Cloutier)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 29 2021, 10:57 AM (112 w, 2 d)

Recent Activity

Dec 6 2022

fcloutier committed rGcd95d7998c1d: [Clang][Sema] Fix attribute((format)) bug on non-variadic functions (authored by fcloutier).
[Clang][Sema] Fix attribute((format)) bug on non-variadic functions
Dec 6 2022, 1:09 PM · Restricted Project, Restricted Project
fcloutier closed D137603: [Clang][Sema] Fix attribute((format)) bug on non-variadic functions.
Dec 6 2022, 1:09 PM · Restricted Project, Restricted Project

Dec 2 2022

fcloutier updated the diff for D137603: [Clang][Sema] Fix attribute((format)) bug on non-variadic functions.

Fix new fixit test for Windows, where directory separators are backslashes instead of forward slashes.

Dec 2 2022, 10:57 AM · Restricted Project, Restricted Project

Dec 1 2022

fcloutier updated the diff for D137603: [Clang][Sema] Fix attribute((format)) bug on non-variadic functions.

Addressed Aaron's comment about fixits, ran clang-format.

Dec 1 2022, 3:01 PM · Restricted Project, Restricted Project

Nov 11 2022

fcloutier accepted D137714: Do not merge traps in functions annotated optnone.
Nov 11 2022, 1:44 PM · Restricted Project, Restricted Project

Nov 10 2022

fcloutier requested changes to D137714: Do not merge traps in functions annotated optnone.
Nov 10 2022, 8:51 AM · Restricted Project, Restricted Project

Nov 7 2022

fcloutier requested review of D137603: [Clang][Sema] Fix attribute((format)) bug on non-variadic functions.
Nov 7 2022, 7:49 PM · Restricted Project, Restricted Project

Nov 2 2022

fcloutier closed D136805: [NFC] Make format() more amenable to format attributes.

Merged to mainline; sadly forgot to update the commit message to include the differential ID, so manually closing. I'll see if I can find existing git hooks that check for that in the future.

Nov 2 2022, 2:00 PM · Restricted Project, Restricted Project
fcloutier committed rGcf239c2f1777: [NFC] Make format() more amenable to format attributes (authored by fcloutier).
[NFC] Make format() more amenable to format attributes
Nov 2 2022, 1:57 PM · Restricted Project, Restricted Project

Nov 1 2022

fcloutier updated the diff for D136805: [NFC] Make format() more amenable to format attributes.

Fix whitespace difference that clang-format didn't like.

Nov 1 2022, 10:50 AM · Restricted Project, Restricted Project

Oct 31 2022

fcloutier added a comment to D136805: [NFC] Make format() more amenable to format attributes.

since the undefined behavior was evaluated at build time, UBSan wouldn't catch it.

Can you file a bug for this? Opportunistic constant evaluation like that shouldn't bypass ubsan.

Oct 31 2022, 4:14 PM · Restricted Project, Restricted Project
fcloutier updated the diff for D136805: [NFC] Make format() more amenable to format attributes.

Fix failing test when parsing "%" as a format string.

Oct 31 2022, 3:55 PM · Restricted Project, Restricted Project

Oct 26 2022

fcloutier updated the diff for D136805: [NFC] Make format() more amenable to format attributes.

Add comment explaining what specifierBit does.

Oct 26 2022, 6:51 PM · Restricted Project, Restricted Project
fcloutier requested review of D136805: [NFC] Make format() more amenable to format attributes.
Oct 26 2022, 5:35 PM · Restricted Project, Restricted Project
fcloutier added a reverting change for rGfb1e90ef07fe: [NFC] Make format() more amenable to format attributes: rGbca75abc01f3: Revert "[NFC] Make format() more amenable to format attributes".
Oct 26 2022, 12:53 PM · Restricted Project, Restricted Project
fcloutier committed rGbca75abc01f3: Revert "[NFC] Make format() more amenable to format attributes" (authored by fcloutier).
Revert "[NFC] Make format() more amenable to format attributes"
Oct 26 2022, 12:53 PM · Restricted Project, Restricted Project
fcloutier added a reverting change for D132413: [NFC] Make format() more amenable to format attributes: rGbca75abc01f3: Revert "[NFC] Make format() more amenable to format attributes".
Oct 26 2022, 12:53 PM · Restricted Project, Restricted Project
fcloutier added a comment to D132413: [NFC] Make format() more amenable to format attributes.

I will revert now and continue the investigation since it has been about 15 minutes.

Oct 26 2022, 12:52 PM · Restricted Project, Restricted Project
fcloutier added a comment to D132413: [NFC] Make format() more amenable to format attributes.

That's what it complained about: https://buildkite.com/llvm-project/premerge-checks/builds/118482#01840c08-5dd5-40e8-8ebd-bcab1405d1ff

Oct 26 2022, 12:29 PM · Restricted Project, Restricted Project
fcloutier committed rGfb1e90ef07fe: [NFC] Make format() more amenable to format attributes (authored by fcloutier).
[NFC] Make format() more amenable to format attributes
Oct 26 2022, 12:12 PM · Restricted Project, Restricted Project
fcloutier closed D132413: [NFC] Make format() more amenable to format attributes.
Oct 26 2022, 12:12 PM · Restricted Project, Restricted Project
fcloutier added a comment to D132413: [NFC] Make format() more amenable to format attributes.

Failing tests are from clangd and WebAssembly backend, which are not touched by this change.

Oct 26 2022, 12:03 PM · Restricted Project, Restricted Project

Oct 25 2022

fcloutier updated the diff for D132413: [NFC] Make format() more amenable to format attributes.

Addressing final comments, running diff again for automated testing.

Oct 25 2022, 3:21 PM · Restricted Project, Restricted Project

Oct 24 2022

fcloutier updated the diff for D132413: [NFC] Make format() more amenable to format attributes.
Oct 24 2022, 3:04 PM · Restricted Project, Restricted Project

Sep 16 2022

fcloutier accepted D134038: [ConstraintElimination] Add initial usub.with.overflow tests..
Sep 16 2022, 8:51 AM · Restricted Project, Restricted Project

Sep 9 2022

fcloutier added inline comments to D132413: [NFC] Make format() more amenable to format attributes.
Sep 9 2022, 4:49 PM · Restricted Project, Restricted Project
fcloutier updated the diff for D132413: [NFC] Make format() more amenable to format attributes.

Address @ahatanak's comments.

Sep 9 2022, 4:48 PM · Restricted Project, Restricted Project

Sep 8 2022

fcloutier added a comment to D132413: [NFC] Make format() more amenable to format attributes.

Clang is being more zealous than the standard by warning you about this because integer-type variadic arguments undergo integer promotion (6.5.2.2:6 in n2310 numbering). It is effectively impossible to pass an integer smaller than int to a variadic function. This means %hu and %hhu are constraints that the format function needs to read an unsigned short or unsigned char from the va_list, but anything smaller than unsigned will be converted to unsigned as it is being passed to the variadic function, and va_arg(ap, unsigned char) is necessarily equivalent to (unsigned char)va_arg(ap, unsigned). This is reiterated and explicitly spelled out in 7.21.6.1:7, which describes format strings:

Sep 8 2022, 2:57 PM · Restricted Project, Restricted Project

Aug 22 2022

fcloutier requested review of D132413: [NFC] Make format() more amenable to format attributes.
Aug 22 2022, 2:43 PM · Restricted Project, Restricted Project

Jul 5 2022

fcloutier committed rG92edd74b37c7: Allow non-variadic functions to be attributed with `__attribute__((format))` (authored by fcloutier).
Allow non-variadic functions to be attributed with `__attribute__((format))`
Jul 5 2022, 5:27 PM · Restricted Project, Restricted Project
fcloutier closed D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.
Jul 5 2022, 5:27 PM · Restricted Project, Restricted Project
fcloutier updated the diff for D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

There was a merge conflict on the release notes, updating the differential to get a CI build.

Jul 5 2022, 2:23 PM · Restricted Project, Restricted Project
fcloutier added inline comments to D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.
Jul 5 2022, 12:31 PM · Restricted Project, Restricted Project
fcloutier updated the diff for D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Address documentation comments.

Jul 5 2022, 12:31 PM · Restricted Project, Restricted Project
fcloutier added a comment to D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

I'm afraid that's also not possible: D is a Decl, so it doesn't have getType(). Decl is the tightest-fitting superclass of BlockDecl, FunctionDecl and ObjCMethodDecl (because BlockDecl is a direct subclass of it).

Jul 5 2022, 9:31 AM · Restricted Project, Restricted Project

Jul 1 2022

fcloutier updated the diff for D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Thanks, Aaron. I wasn't sure how to follow up given how long it had been since the review started. I understand that we're all busy (which explains the week delay on my part here as well).

Jul 1 2022, 8:47 AM · Restricted Project, Restricted Project

Jun 22 2022

fcloutier added a comment to D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Would it be better if I asked a colleague to finish the review?

Jun 22 2022, 6:04 PM · Restricted Project, Restricted Project

Jun 16 2022

fcloutier added a comment to D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Ping

Jun 16 2022, 11:10 AM · Restricted Project, Restricted Project

Jun 8 2022

fcloutier updated the diff for D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Apologies the long delay: things happened and I was pulled away. I have some time to finish this change now. I recommend re-reading the discussion up to now since it's not _that_ long and it provides a lot of very useful context.

Jun 8 2022, 12:47 PM · Restricted Project, Restricted Project

May 12 2022

fcloutier committed rG91ed7e194181: [clang] Allow all string types for all attribute(format) styles (authored by fcloutier).
[clang] Allow all string types for all attribute(format) styles
May 12 2022, 11:13 AM · Restricted Project, Restricted Project
fcloutier closed D125254: [clang] Allow all string types for all attribute(format) styles.
May 12 2022, 11:13 AM · Restricted Project, Restricted Project

May 9 2022

fcloutier requested review of D125254: [clang] Allow all string types for all attribute(format) styles.
May 9 2022, 11:55 AM · Restricted Project, Restricted Project

Jan 5 2022

fcloutier accepted D116635: Add warning to detect when calls passing arguments are made to functions without prototypes..

I think that this is a good warning and I'll defer to the experts for what has to happen when prototypes merge with K&R definitions :)

Jan 5 2022, 8:35 AM · Restricted Project, Restricted Project

Nov 12 2021

fcloutier committed rG12ab3e6c8402: format_arg attribute does not support nullable instancetype return type (authored by fcloutier).
format_arg attribute does not support nullable instancetype return type
Nov 12 2021, 1:41 PM
fcloutier closed D113636: format_arg attribute does not support nullable instancetype return type.
Nov 12 2021, 1:41 PM · Restricted Project

Nov 10 2021

fcloutier requested review of D113636: format_arg attribute does not support nullable instancetype return type.
Nov 10 2021, 6:10 PM · Restricted Project

Oct 29 2021

fcloutier added a comment to D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Thanks Arthur for your feedback.

Oct 29 2021, 5:25 PM · Restricted Project, Restricted Project
fcloutier added a comment to D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.

Thanks for looking, Aaron. You're right that the main utility of the aggregation of format warnings is to extend C's type checking because there is no other good way, or good place, to do it. I have built hundreds of millions of shipping lines of C, C++ and Objective-C, and this change seems like it would be an effective fix in several places where we don't currently have anywhere else to go.

Oct 29 2021, 3:34 PM · Restricted Project, Restricted Project

Oct 28 2021

fcloutier committed rG6a5f7437720e: format_arg attribute should allow instancetype in NSString definition (authored by fcloutier).
format_arg attribute should allow instancetype in NSString definition
Oct 28 2021, 8:33 PM
fcloutier closed D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.
Oct 28 2021, 8:32 PM · Restricted Project
fcloutier updated the diff for D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.

Add test for a protocol method with format_arg, second NSString method accepting a NSString instead of a C string

Oct 28 2021, 8:20 PM · Restricted Project
fcloutier updated the diff for D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.
Oct 28 2021, 8:02 PM · Restricted Project
fcloutier added a comment to D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.

Apologies, Phabricator showed the comment below line 197 in the diff, but the email showed it to be below line 3404. I can check if the return type is instancetype in handleFormatArgAttr and use that instead.

Oct 28 2021, 7:37 PM · Restricted Project
fcloutier added inline comments to D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.
Oct 28 2021, 7:35 PM · Restricted Project
fcloutier updated the diff for D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.

Forgot to run clang-format.

Oct 28 2021, 3:29 PM · Restricted Project

Oct 27 2021

fcloutier committed rGd378a0febc7e: [Sema] Recognize format argument indicated by format attribute inside blocks (authored by fcloutier).
[Sema] Recognize format argument indicated by format attribute inside blocks
Oct 27 2021, 3:49 PM
fcloutier closed D112569: -Wformat-nonliteral should not trigger for format strings passed to blocks with __attribute__((format)).
Oct 27 2021, 3:48 PM · Restricted Project
fcloutier requested review of D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface.
Oct 27 2021, 3:32 PM · Restricted Project
fcloutier updated the diff for D112569: -Wformat-nonliteral should not trigger for format strings passed to blocks with __attribute__((format)).
Oct 27 2021, 2:13 PM · Restricted Project

Oct 26 2021

fcloutier requested review of D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`.
Oct 26 2021, 3:35 PM · Restricted Project, Restricted Project
fcloutier updated the diff for D112569: -Wformat-nonliteral should not trigger for format strings passed to blocks with __attribute__((format)).

Thanks Artem for pointing out that I was completely misusing getFunctionScopeIndex. This should be better. I added a test that you can pick a non-1 value for the format parameter in blocks.

Oct 26 2021, 2:16 PM · Restricted Project
fcloutier requested review of D112569: -Wformat-nonliteral should not trigger for format strings passed to blocks with __attribute__((format)).
Oct 26 2021, 12:14 PM · Restricted Project

Feb 5 2021

fcloutier updated the summary of D96196: [Sema][NFC] Create Sema::BuildImplicitCast.
Feb 5 2021, 8:28 PM · Restricted Project
fcloutier requested review of D96196: [Sema][NFC] Create Sema::BuildImplicitCast.
Feb 5 2021, 8:19 PM · Restricted Project

Feb 3 2021

fcloutier committed rG554cf3729e65: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic… (authored by fcloutier).
[clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic…
Feb 3 2021, 11:43 AM
fcloutier closed D95695: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic argument is specified.
Feb 3 2021, 11:43 AM · Restricted Project

Feb 2 2021

fcloutier added inline comments to D95695: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic argument is specified.
Feb 2 2021, 2:22 PM · Restricted Project
fcloutier updated the diff for D95695: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic argument is specified.

Address Aaron's feedback

Feb 2 2021, 2:20 PM · Restricted Project

Jan 29 2021

fcloutier updated the diff for D95695: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic argument is specified.

Updating the diff using arcanist, which I'm told produces better results. Sorry for the churn!

Jan 29 2021, 1:24 PM · Restricted Project
fcloutier updated the summary of D95695: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic argument is specified.
Jan 29 2021, 12:57 PM · Restricted Project
fcloutier requested review of D95695: [clang-tblgen] AnnotateAttr::printPretty has spurious comma when no variadic argument is specified.
Jan 29 2021, 12:51 PM · Restricted Project