[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-10-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 557614. to268 added a comment. Fix arm buildbot issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-10-04 Thread Guillot Tony via Phabricator via cfe-commits
to268 added a comment. > Do you need me to land this on your behalf? If so, I can fix up the NFC > changes I found for you, but what email address would you like me to use for > patch attribution? It is probably the best thing to do, and yes I need you to land this on your behalf. `Guillot

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-09-20 Thread Guillot Tony via Phabricator via cfe-commits
to268 added a comment. I need thoughts about this. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:4805-4806 if (!getLangOpts().CPlusPlus && InitList) { -Diag(Init->getBeginLoc(), diag::err_auto_init_list_from_c); +Diag(Init->getBeginLoc(),

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-09-20 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 557115. to268 added a comment. Fixed the initializer list diagnotic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-16 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 556892. to268 marked an inline comment as done. to268 added a comment. I have fixed the ReleaseNote formatting error. Please land this patch on my behalf "Guillot Tony " Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 556871. to268 marked an inline comment as done. to268 added a comment. Added recommendation by @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159522/new/ https://reviews.llvm.org/D159522 Files:

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 556868. to268 added a comment. I have added the missing ReleaseNote. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159522/new/ https://reviews.llvm.org/D159522 Files: clang/docs/ReleaseNotes.rst

[PATCH] D159522: [Clang][C] Fixed a bug where we reject an _Atomic qualified integer in a switch statment

2023-09-15 Thread Guillot Tony via Phabricator via cfe-commits
to268 created this revision. to268 added a reviewer: aaron.ballman. to268 added a project: clang. Herald added a project: All. to268 requested review of this revision. Herald added a subscriber: cfe-commits. We are currently rejecting an _Atomic qualified integer in a switch statment. This fixes

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-09-06 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 556008. to268 added a comment. This updates fixes the `_Atomic auto` diagnostic, the previous diagnostic was confusing since it was referencing a C++ feature (std::is_trivially_copyable). I have a few diagnostic issues remaining, some parts need to take place

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-08-16 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 550874. to268 marked 4 inline comments as done. to268 added a comment. This update is mostly a followup of a change upstream that consist of renaming all C2x references to C23. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-18 Thread Guillot Tony via Phabricator via cfe-commits
to268 added inline comments. Comment at: clang/test/Sema/c2x-auto.c:119 + return x; +} aaron.ballman wrote: > aaron.ballman wrote: > > Some additional test cases to consider: > > ``` > > _Complex auto i = 12.0; // Should be rejected because _Complex is a type

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-18 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 541538. to268 marked 17 inline comments as done. to268 added a comment. Added recommendations from @aaron.ballman. Adjusting diagnostic messages still need to be done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-13 Thread Guillot Tony via Phabricator via cfe-commits
to268 marked an inline comment as done. to268 added a comment. Thank you for your feedback @aaron.ballman! I really appreciate that you are pointing out all my formatting mistakes, and giving me more guidelines. The direction of the patch is clearer now. In D133289#4489883

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 537422. to268 added a comment. Minor code reformatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 537331. to268 added a comment. I have fixed the misleading diagnostic with auto array declarations. The diagnostics now says that `'auto' is not allowed in array declarations`. I am not sure with the way i have currently implemented it in ` SemaDecl.cpp`,

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-06-21 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 533214. to268 marked 8 inline comments as done. to268 added a comment. I have updated and fixed all minors comments about the test cases. I have added the diagnostic to warn users about using a Clang extension when declaring an explicit `auto*` in pedantic

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-05-08 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 520447. to268 added a comment. Fixed auto char arrays with explicit brackets c auto foo[] = "bar"; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-04-18 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 514789. to268 added a comment. I have *hopefully* fixed my broken patch. This is all the things in need to address: auto str2[] = "string"; [[clang::overloadable]] auto test(auto x) { return x; } and maybe retry to support `auto` in compound literals,

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-04-16 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 514051. to268 added a comment. I have improved some diagnostics and i am now testing `nullptr` with `auto`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-03-11 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 504381. to268 added a comment. Patch update: Reverting `auto` as a type specifier. I am currently figuring out what behavior the `auto` keyword need to match. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-01-09 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 487427. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/DeclSpec.cpp

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-12-08 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 481339. to268 added a comment. Removed compound literal diagnostic in ParseExpr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-11-27 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 478113. to268 marked 5 inline comments as done. to268 added a comment. Added test cases and added an explicit `auto*` diagnostic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-11-13 Thread Guillot Tony via Phabricator via cfe-commits
to268 marked 7 inline comments as done. to268 added a comment. This is a status update of the patch. Comment at: clang/lib/Parse/ParseExpr.cpp:1526 +// This is a temporary fix while we don't support C2x 6.5.2.5p4 +if (getLangOpts().C2x && GetLookAheadToken(2).getKind()

[PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-11-11 Thread Guillot Tony via Phabricator via cfe-commits
to268 accepted this revision. to268 added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137724/new/ https://reviews.llvm.org/D137724 ___ cfe-commits mailing list

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-10-28 Thread Guillot Tony via Phabricator via cfe-commits
to268 added a comment. Also i'm not sure if must add C2x to this condition just in case (falling back or add an assertion) Comment at: clang/lib/Sema/DeclSpec.cpp:1362 // type specifier. if (S.getLangOpts().CPlusPlus && TypeSpecType == TST_unspecified &&

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-10-28 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 471535. to268 added a comment. Reworked the parsing side of the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-10-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 465312. to268 added a comment. Added a check to not diagnose a missing type specifier in C2x mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-10-04 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 465280. to268 added a comment. Added a check to not diagnose a missing type specifier in C2x mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files:

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-27 Thread Guillot Tony via Phabricator via cfe-commits
to268 added a comment. Here are all the details that i've said earlier Comment at: clang/lib/Parse/ParseExpr.cpp:1515 +// This is a temporary fix while we don't support C2x 6.5.2.5p4 +if (getLangOpts().C2x && GetLookAheadToken(2).getKind() == tok::l_brace) { +

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-27 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 463415. to268 marked 3 inline comments as done. to268 added a comment. I've fixed the diagnostic message and all of the bad TODOs comments from the Sema test. I've explained in details why i'm only able to handle `auto` in compound literals. In

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-20 Thread Guillot Tony via Phabricator via cfe-commits
to268 added a comment. Also i have found that we don't parse the compound literal with the `auto` keyword correctly in `ParseExpr.cpp` between line 939 to 973 which is the beginning of `Parser::ParseCastExpression(...)` int test_cl = (int){12}; // Compound literal is detected auto

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-20 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 461790. to268 marked 2 inline comments as done. to268 added a comment. I've added more test cases, added a diagnostic when using `auto` in compound literals and advised fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-13 Thread Guillot Tony via Phabricator via cfe-commits
to268 marked 6 inline comments as done. to268 added a comment. In D133289#3784042 , @aaron.ballman wrote: > auto auto k = 12; // 99% this is intended to be accepted; first `auto` is > the storage class specifier, second `auto` is a redundant storage

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-06 Thread Guillot Tony via Phabricator via cfe-commits
to268 added a comment. Also @aaron.ballman said me that he was thinking about maybe adding an extension to add support for `auto` in a function return or in a parameter list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-06 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 458358. to268 added a comment. I've added a test case with scopes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/lib/Parse/ParseDecl.cpp

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 458092. to268 added a comment. Fixed `DeclSpec.cpp` formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/lib/Parse/ParseDecl.cpp

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 458089. to268 added a comment. I have fixed my CodeGen test with the windows platform. (Linux uses an i64 for the long type instead windows is using an i32) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 created this revision. to268 added reviewers: aaron.ballman, clang-language-wg, jyknight. Herald added a project: All. to268 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patches implements the `auto` keyword from the N3007