[PATCH] D158372: [Clang] Treat invalid UDL as two tokens

2023-08-22 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. OK, will do it by the end of this week. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158372/new/ https://reviews.llvm.org/D158372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D158372: [Clang] Treat invalid UDL as two tokens

2023-08-21 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:1994-2009 if (!isAsciiIdentifierStart(C)) { if (C == '\\' && tryConsumeIdentifierUCN(CurPtr, Size, Result)) Consumed = true; else if (!isASCII(C) && tryConsumeIdentifierUTF8Char(CurPtr))

[PATCH] D158372: [Clang] Treat invalid UDL as two tokens

2023-08-21 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 552060. rZhBoYao marked 5 inline comments as done. rZhBoYao edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158372/new/ https://reviews.llvm.org/D158372 Files: clang/docs/ReleaseNotes.rst

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-20 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. D158372 addresses comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 ___ cfe-commits

[PATCH] D158372: [Clang] Treat invalid UDL as two tokens

2023-08-20 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: clang-language-wg, aaron.ballman, jyknight. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As a language extension, if an invalid a UDL's

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. I’ll see what I can do regarding reviving the string concat behavior. It feels like that a more refined treatment than before can be achieved. Maybe adds an imaginary preceding whitespace only when we can find a macro with the same name. Repository: rG LLVM Github

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. In D153156#4599324 , @jyknight wrote: > If proper spec-conformance means we can no longer support the ability to > allow such out-of-spec pre-c++11 code to work anymore, that's probably > OK...but, in that case, we also need

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-18 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. In D153156#4598915 , @steelannelida wrote: > Unfortunately the option -Wno-reserved-user-defined-literal fails after this: > > #define MYTHING "_something_" > > const char* f() { > return "ONE"MYTHING"TWO"; > } > >

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-17 Thread PoYao Chang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf2583f3acf59: [Clang] CWG1473: do not err on the lack of space after operator (authored by rZhBoYao). Repository: rG LLVM Github Monorepo

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-08-17 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 551138. rZhBoYao marked 2 inline comments as done. rZhBoYao added a comment. Thank Aaron and Vlad for reviewing this! Just updating the diff to reflect the final version. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/

[PATCH] D155081: Specify the developer policy around links to external resources

2023-08-11 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added inline comments. Comment at: llvm/docs/DeveloperPolicy.rst:359 + If the patch fixes a bug in GitHub Issues, we encourage adding + "Fixes https://github.com/llvm/llvm-project/issues/12345; to automate closing + the issue in GitHub. If the patch has been

[PATCH] D156063: [Clang] Reject programs declaring namespace std to be inline

2023-07-24 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Thanks for all the suggestions and review comments! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156063/new/ https://reviews.llvm.org/D156063 ___ cfe-commits mailing list

[PATCH] D156063: [Clang] Reject programs declaring namespace std to be inline

2023-07-24 Thread PoYao Chang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbed75faf7d76: [Clang] Reject programs declaring namespace std to be inline (authored by rZhBoYao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156063/new/

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-07-24 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 543559. rZhBoYao added a comment. Refactor VisitCXXOperatorCallExpr and mark CWG2571 as done in Clang 15 (deliberately the same version P2128R6 was implemented) since this patch only fix the diagnostics around it. CHANGES SINCE LAST ACTION

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-07-24 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Thanks for the reminder. I am aware of that. Browsing through 762672a73a1e and a560ccf2af7a , I believe the indeterminately sequenced requirement is

[PATCH] D156063: [Clang] Reject programs declaring namespace std to be inline

2023-07-24 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 543514. rZhBoYao marked an inline comment as done. rZhBoYao added a comment. Addressed comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156063/new/ https://reviews.llvm.org/D156063 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-07-24 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a subscriber: cor3ntin. rZhBoYao added a comment. BTW, I am not sure if CWG2571 is implemented by @cor3ntin? If so, can we mark it as done on https://clang.llvm.org/cxx_dr_status.html#2571? This patch handles the warning around it tho. CHANGES SINCE

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-07-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 543315. rZhBoYao marked an inline comment as done. rZhBoYao added a comment. Improve the test. Not sure what the lack of C++17 checks was referring to in your conversation with Aaron. Can @aaron.ballman confirm whether it is addressed by this patch?

[PATCH] D156063: [Clang] Reject programs declaring namespace std to be inline

2023-07-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. https://eel.is/c++draft/namespace.std#7 is in the library clause. Couldn't find a better place to put the test other than clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p7.cpp which is for https://eel.is/c++draft/namespace.def.general#4.sentence-2. Repository:

[PATCH] D156063: [Clang] Reject programs declaring namespace std to be inline

2023-07-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: philnik, clang-language-wg. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-07-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 543295. rZhBoYao added a comment. Put `-Windeterminately-sequenced` under `-Wsequence-point`'s control CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156057/new/ https://reviews.llvm.org/D156057 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-07-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: aaron.ballman, Endill, clang-language-wg. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add -Windeterminately-sequenced and fix -Wunsequenced

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-20 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Gentle ping :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-18 Thread PoYao Chang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5ce5e983f82c: [Clang] Add warnings for CWG2521 (authored by rZhBoYao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152632/new/

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-17 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. There seems to be no clear objection to this and https://reviews.llvm.org/D152632 and the CI are passing for both. Any chance that I merge these two before llvm 17 branch out (IIRC the next Monday)? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/

[PATCH] D155475: [Clang][Sema] Add -Wctad-selects-copy to diagnose copy deduction candidate

2023-07-17 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 541151. rZhBoYao retitled this revision from "[Clang][Sema] Add -Wctad-copy-not-wrap to diagnose copy deduction candidate" to "[Clang][Sema] Add -Wctad-selects-copy to diagnose copy deduction candidate". rZhBoYao edited the summary of this revision.

[PATCH] D155475: [Clang][Sema] Add -Wctad-copy-not-wrap to diagnose copy deduction candidate

2023-07-17 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: EricWF, rsmith. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. 1. '-Wctad-copy-not-wrap' warns when copy deduction candidate is selected in

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-14 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Hmm… I don’t see why check-format keeps failing. I `git clang-format` thrice before uploading. https://buildkite.com/llvm-project/premerge-checks/builds/164452 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152632/new/ https://reviews.llvm.org/D152632

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-13 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 540104. rZhBoYao marked an inline comment as done. rZhBoYao edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-13 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 540072. rZhBoYao marked 6 inline comments as done. rZhBoYao edited the summary of this revision. rZhBoYao added a comment. -Wdeprecated-literal-operator will be on by default in https://reviews.llvm.org/D153156 CHANGES SINCE LAST ACTION

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-10 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 538707. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticLexKinds.td clang/lib/Lex/Lexer.cpp clang/lib/Sema/SemaExprCXX.cpp

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-10 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked 6 inline comments as done. rZhBoYao added a comment. In D152632#4443284 , @shafik wrote: > I am wondering why we don't fold this into `-Wreserved-identifier` The "ud-suffix" of the user-defined-string-literal or the identifier in a

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-10 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 538688. rZhBoYao edited the summary of this revision. rZhBoYao added a comment. Reverse the dependency chain. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-10 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 538678. rZhBoYao edited the summary of this revision. rZhBoYao added a comment. Defaults to on for C++23 only. Enable for all the language modes in another patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152632/new/

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-06-16 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 532223. rZhBoYao edited the summary of this revision. rZhBoYao added a comment. Depends on D153156 PS: I'm going on a vacation for 2 weeks. See you guys in July :) CHANGES SINCE LAST ACTION

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-06-16 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: Endill, aaron.ballman. Herald added a subscriber: jvesely. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. [Clang] CWG1473: do not err on the

[PATCH] D150023: [ABI] [C++20] [Modules] Don't generate vtable if the class is defined in other module unit

2023-06-14 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. > Looks like this breaks check-clang on Mac: > http://45.33.8.238/macm1/62779/step_7.txt Same here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150023/new/ https://reviews.llvm.org/D150023

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-06-13 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:411 + "identifier '%0' preceded by space(s) in the literal operator declaration " + "is deprecated">, InGroup, DefaultIgnore; def warn_reserved_module_name : Warning<

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-06-11 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 530304. rZhBoYao added a comment. Overhaul for `dr25xx.cpp`. For each test case, tried to support as many language modes as possible. Not sure what those `-triple x86_64-unknown-unknown` are for? I leave them there nonetheless.

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-06-11 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 530292. rZhBoYao added a comment. Addressed comments. Thanks for letting me know how to structure tests for DRs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152632/new/ https://reviews.llvm.org/D152632 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-06-10 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a reviewer: clang-language-wg. rZhBoYao added a comment. Few questions: I think this applies to all the language modes? Somehow, https://wg21.link/CWG2521 is not redirecting to https://cplusplus.github.io/CWG/issues/2521.html. Is this normal? Repository: rG LLVM Github

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-06-10 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added a reviewer: serge-sans-paille. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. 1. Teach -Wuser-defined-literals to warn on using double underscores in

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-05-15 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao abandoned this revision. rZhBoYao added a comment. In D139586#4324857 , @cor3ntin wrote: > @rZhBoYao are you still working on this? Thanks! No. Sorry that I don't have the capacity to work on this. Repository: rG LLVM Github Monorepo

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2022-12-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Consider: struct T { const int *begin() const; const int *end() const; T () [[clang::lifetimebound]]; T t(); }; const T (const T [[clang::lifetimebound]]) { return t; } T g(); void foo() { for (auto e : f1(g())) {} for (auto e

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2022-12-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added a reviewer: clang-language-wg. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Implemented the C++23 paper P2718R0 Repository: rG LLVM Github Monorepo

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-11 Thread PoYao Chang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG50b1faf5c188: [Clang] CWG 1394: Incomplete types as parameters of deleted functions (authored by rZhBoYao). Repository: rG LLVM Github Monorepo

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-08 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Revisiting @ChuanqiXu 's code suggestion... Comment at: clang/include/clang/Sema/Sema.h:2899-2909 +/// C++ [dcl.fct.def.general]p1 +/// function-body: +/// = delete ; +/// = default ; +Delete, +Default, +

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-08 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 421589. rZhBoYao marked 2 inline comments as done. rZhBoYao set the repository for this revision to rG LLVM Github Monorepo. rZhBoYao added a comment. Reordered enumerators. Does this look good to you, @ChuanqiXu ? Repository: rG LLVM Github Monorepo

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked 2 inline comments as done. rZhBoYao added inline comments. Comment at: clang/include/clang/Sema/Sema.h:2899-2909 +/// C++ [dcl.fct.def.general]p1 +/// function-body: +/// = delete ; +/// = default ; +Delete, +Default, +

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked an inline comment as done. rZhBoYao added inline comments. Comment at: clang/include/clang/Sema/Sema.h:2899-2909 +/// C++ [dcl.fct.def.general]p1 +/// function-body: +/// = delete ; +/// = default ; +Delete, +Default, +

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 421345. rZhBoYao added a comment. Added release note. Also, push to my repo to make sure the release note is correctly rendered: https://github.com/poyaoc97/llvm-project/commit/1167f0fc6b91 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122981/new/

[PATCH] D122981: [Clang] CWG 1394: Incomplete types as parameters of deleted functions

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 421338. rZhBoYao retitled this revision from "[Clang] Diagnose incomplete return/param types only when function is not deleted" to "[Clang] CWG 1394: Incomplete types as parameters of deleted functions". rZhBoYao edited the summary of this revision.

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 421328. rZhBoYao marked 5 inline comments as done. rZhBoYao added a comment. Removed member function test cases and addressed comments, which includes: 1. Sema::SetFunctionBodyKind 2. Change enum names 3. Be clear about delete being C++ specific. CHANGES

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked an inline comment as done. rZhBoYao added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1306 + bool Delete = + Tok.is(tok::equal) && NextToken().is(tok::kw_delete) ? true : false; Decl *Res = Actions.ActOnStartOfFunctionDef(getCurScope(), D,

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 421305. rZhBoYao added a comment. Handling of eagerly parsed deleted or defaulted function must happen AFTER `D.complete(Res);`. A nice looking diff: https://github.com/poyaoc97/llvm-project/commit/dc37a262582f6a2d8143c6f1f586dc657b4b5311 CHANGES SINCE

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked 2 inline comments as done. rZhBoYao added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1306 + bool Delete = + Tok.is(tok::equal) && NextToken().is(tok::kw_delete) ? true : false; Decl *Res = Actions.ActOnStartOfFunctionDef(getCurScope(), D,

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked 3 inline comments as done. rZhBoYao added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1306 + bool Delete = + Tok.is(tok::equal) && NextToken().is(tok::kw_delete) ? true : false; Decl *Res = Actions.ActOnStartOfFunctionDef(getCurScope(), D,

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-06 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 420764. rZhBoYao marked 2 inline comments as done. rZhBoYao added a reviewer: erichkeane. rZhBoYao added a comment. I think an extra parameter is inevitable without complicating things too much. CHANGES SINCE LAST ACTION

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-05 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked 2 inline comments as done. rZhBoYao added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1339 bool Delete = false; SourceLocation KWLoc; I'm thinking should we merge `FnDeleted` and `Deleted` into one variable or leave it as

[PATCH] D122981: [Clang] Diagnose incomplete return/param types only when function is not deleted

2022-04-02 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: ChuanqiXu, rsmith. rZhBoYao added a project: clang. Herald added a project: All. rZhBoYao requested review of this revision. Herald added a subscriber: cfe-commits. According to dcl.fct.def.general p2

[PATCH] D115248: [Clang] Fix PR28101

2022-03-23 Thread PoYao Chang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG355f1c75aa66: [Clang] Fix PR28101 (authored by rZhBoYao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115248/new/ https://reviews.llvm.org/D115248 Files:

[PATCH] D115248: [Clang] Fix PR28101

2022-03-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 417648. rZhBoYao edited the summary of this revision. rZhBoYao set the repository for this revision to rG LLVM Github Monorepo. rZhBoYao added a comment. Added an entry in release notes. Waiting for CI... Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D115248: [Clang] Fix PR28101

2022-03-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. By 'release notes' do you mean a more detailed commit message? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115248/new/ https://reviews.llvm.org/D115248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D115248: [Clang] Fix PR28101

2022-03-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 417632. rZhBoYao marked 3 inline comments as done. rZhBoYao added a comment. This passes check-clang-semacxx on my machine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115248/new/ https://reviews.llvm.org/D115248 Files:

[PATCH] D115248: [Clang] Fix PR28101

2022-03-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao marked 3 inline comments as done. rZhBoYao added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:3430 << D.getName().TemplateId->LAngleLoc; + if (cast(CurContext)->getDeclName() == Name) +Diag(Loc, diag::err_member_name_of_class) <<

[PATCH] D115248: [Clang] Fix PR28101

2022-03-23 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 417504. rZhBoYao set the repository for this revision to rG LLVM Github Monorepo. rZhBoYao added a comment. Diagnose "same name as its class" before setting the declarator invalid as otherwise it would not be diagnosed. This also aligns with gcc's behavior.

[PATCH] D115248: [Clang] Fix PR28101

2022-03-22 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 417475. rZhBoYao added a comment. Don't break template declarations. re-clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115248/new/ https://reviews.llvm.org/D115248 Files: clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D115248: [Clang] Fix PR28101

2022-03-22 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 417461. rZhBoYao retitled this revision from "[clang] Fix PR28101" to "[Clang] Fix PR28101". rZhBoYao edited the summary of this revision. rZhBoYao added a reviewer: cor3ntin. rZhBoYao set the repository for this revision to rG LLVM Github Monorepo. rZhBoYao

[PATCH] D115248: [clang] Fix Bug 28101

2021-12-08 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 392774. rZhBoYao edited the summary of this revision. rZhBoYao added a comment. I added a test. There were 17 module and PCH related failed tests on my local machine; however, when I ran the test on then ToT

[PATCH] D115248: [clang] Fix Bug 28101

2021-12-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 392399. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115248/new/ https://reviews.llvm.org/D115248 Files: clang/lib/Parse/ParseDecl.cpp clang/lib/Sema/SemaDeclCXX.cpp Index: clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D115248: [clang] Fix Bug 28101

2021-12-07 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: rsmith, aaron.ballman, erichkeane, v.g.vassilev, rnk. rZhBoYao added a project: clang. rZhBoYao requested review of this revision. Herald added a subscriber: cfe-commits. This should fix Bug 28101