[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-27 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 456111. inclyc added a comment. Delete extra newline. Currently this patch has not fully implemented `wchar_t` related support, this type seems to be even platform dependent in C language, if possible, maybe we can consider support in subsequent patches? Rep

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. inclyc added a reviewer: aaron.ballman. Herald added a project: All. inclyc added reviewers: rsmith, clang-language-wg. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes: https://github.com/llvm/llv

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-08-30 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/include/clang/Sema/Sema.h:1760 +// Special builder emitting no diagnostics +SemaDiagnosticBuilder(Sema &S) : S(S) {} SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID, erichkeane wrote:

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-31 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 457153. inclyc added a comment. Update comments according to review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132568/new/ https://reviews.llvm.org/D132568 Files: clang/docs/ReleaseNotes.rst cla

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-31 Thread YingChi Long 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 rGe3bd67eddf65: [clang][Sema] check default argument promotions for printf (authored by inclyc). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D133085: [clang] trim trailing space in format tests. NFC

2022-08-31 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. inclyc added a reviewer: clang-language-wg. Herald added a project: All. inclyc requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Found in https://reviews.llvm.org/D132568 Repository: rG LLVM Github Monorepo

[PATCH] D133085: [clang] trim trailing space in format tests. NFC

2022-08-31 Thread YingChi Long via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5ee51e815425: [clang] trim trailing space in format tests. NFC (authored by inclyc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133085/new/ https://revie

[PATCH] D133085: [clang] trim trailing space in format tests. NFC

2022-08-31 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D133085#3763198 , @ChuanqiXu wrote: > Do you have commit access? If you have, I remember LLVM encourages to land > such fixes directly without reviewed. (+ @aaron.ballman to make sure) Thanks! I'm just not sure whether these c

[PATCH] D133085: [clang] trim trailing space in format tests. NFC

2022-09-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Thank you for your patience and detailed explanation! Sorry for waste your time though ( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133085/new/ https://reviews.llvm.org/D133085 __

[PATCH] D133197: [clang] Fix crash when parsing scanf format string with missing arguments

2022-09-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a reviewer: aaron.ballman. inclyc accepted this revision. inclyc added a subscriber: aaron.ballman. inclyc added a comment. This revision is now accepted and ready to land. Thanks @serge-sans-paille! Basically LGTM. Maybe we need to backport this patch though? @aaron.ballman Reposi

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-09-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5340 +if (!getLangOpts().CPlusPlus) + return false; if (NextToken().is(tok::kw_new) ||// ::new Maybe we can make a new `error` diagnostic definition and fire that here? ==

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-09-04 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Sema/warn-vla.c:8-12 +void test2(int n, int v[n]) { // c99 no-warning +#if __STDC_VERSION__ < 199901L +// expected-warning@-2{{variable length arrays are a C99 feature}} +#endif } aaron.ballman wrote: > The di

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-09-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. > Yeah, that's a different way of delineating than I was thinking originally > and it's worth more thought. I was thinking the separation would be "this is > a VLA" (for people who want to avoid all VLA stack allocations due to the > security concerns) and "this is a por

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a project: All. inclyc updated this revision to Diff 459034. inclyc added a comment. inclyc added reviewers: aaron.ballman, clang-language-wg. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459037. inclyc added a comment. Add release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133574/new/ https://reviews.llvm.org/D133574 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diag

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459039. inclyc added a comment. Use double backquotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133574/new/ https://reviews.llvm.org/D133574 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/

[PATCH] D133609: [Sema] compat warning of using deduced type in non-type template parameter

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. inclyc added reviewers: aaron.ballman, mizvekov, clang-language-wg. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Seems we are mi

[PATCH] D133609: [Sema] compat warning of using deduced type in non-type template parameter

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/SemaCXX/template-nontype-args-compat.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -Wpre-c++20-compat -std=c++20 -verify=cpp20 %s + I cannot find other tests of compatibility warnings though. Is it necessary to ad

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459248. inclyc added a comment. Use RAII object to maintain the Parser state > have you explored making a new DeclSpecContext and modifying > isDefiningTypeSpecifierContext()? I think that would likely be a cleaner > approach. Emm, I've tried passing a Decl

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-12 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459458. inclyc added a comment. Use declaration context Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133574/new/ https://reviews.llvm.org/D133574 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basi

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-12 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459633. inclyc added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133574/new/ https://reviews.llvm.org/D133574 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagn

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-12 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459634. inclyc added a comment. git-clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133574/new/ https://reviews.llvm.org/D133574 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagn

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-14 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/include/clang/Parse/Parser.h:2311 case DeclSpecContext::DSC_association: +case DeclSpecContext::DSC_offsetof: return true; aaron.ballman wrote: > Is this correct? I don't think we can deduce the type

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-14 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Sema/offsetof.c:79 +int a; +struct B // no-error, struct B is not defined within __builtin_offsetof directly +{ aaron.ballman wrote: > inclyc wrote: > > aaron.ballman wrote: > > > I think this is d

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-14 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Sema/offsetof.c:79 +int a; +struct B // no-error, struct B is not defined within __builtin_offsetof directly +{ inclyc wrote: > aaron.ballman wrote: > > inclyc wrote: > > > aaron.ballman wrote: > >

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a project: All. inclyc edited the summary of this revision. inclyc updated this revision to Diff 449023. inclyc added a comment. inclyc added reviewers: mizvekov, rsmith, aaron.ballman. inclyc added a project: clang. inclyc added a subscriber: clang. incly

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Sema/format-strings-scanf.c:235 scanf(0 ? "%s" : "%d", i); // no warning - scanf(1 ? "%s" : "%d", i); // expected-warning{{format specifies type 'char *'}} + scanf(1 ? "%s" : "%d", i); // expected-warning{{format specifie

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8507 +if (Result.Val.isLValue()) { + auto *LVE = Result.Val.getLValueBase().dyn_cast(); + if (LVE && LVE->getStmtClass() == Stmt::StringLiteralClass) { tbaeder wrote: > I thin

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449191. inclyc added a comment. Make if statements concise and add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Sema/format-strings-scanf.c:236 + scanf(1 ? "%s" : "%d", i); // expected-warning{{format specifies type 'char *'}} \ + // expected-note{{format string is defined here}} scanf(0 ? "%d %d" : "%d",

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-01 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449195. inclyc added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/format-strings-scanf.

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8507 +if (Result.Val.isLValue()) { + auto *LVE = Result.Val.getLValueBase().dyn_cast(); + if (LVE && LVE->getStmtClass() == Stmt::StringLiteralClass) { tbaeder wrote: > tbaede

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449236. inclyc added a comment. update comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/format-strin

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449510. inclyc added a comment. Now only checks functions calls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/S

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449511. inclyc added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaChecking.cpp clang/t

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. The previous version of this patch checked constant string literals before checking various types of statements, while the current version only checks for compile-time evaluation literals after function calls, and now other regression tests remain as they are. Reposito

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449517. inclyc added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaChecking.cpp clang/test/S

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Thank you! I already have the commit access, I can commit this myself ^_^ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 ___ cfe-commi

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 449947. inclyc added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130906/new/ https://reviews.llvm.org/D130906 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaChecking.cpp clang/test/S

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread YingChi Long 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 rGf417583f319b: [clang] format string checking for conpile-time evaluated str literal (authored by inclyc). Repository: rG LLVM Github Monorepo CHA

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D130906#3699335 , @aaron.ballman wrote: > In D130906#3699323 , @inclyc wrote: > >> Thank you! I already have the commit access, I can commit this myself ^_^ > > Excellent! Feel free to

[PATCH] D130906: [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Last question, issue https://github.com/llvm/llvm-project/issues/55805 mentioned another case, some `initListExpr` evaulated as "StringLiteral"(`Array` in fact, but maybe able to consider as a literal), should we implement this? Repository: rG LLVM Github Monorepo C

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a project: All. inclyc added reviewers: aaron.ballman, rsmith, mizvekov, tbaeder. inclyc added a project: clang. inclyc added a subscriber: clang. inclyc published this revision for review. Herald added a subscriber: cfe-commits. this patch enhances clang

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 450494. inclyc added a comment. typo fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX/format-strings.c

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 450495. inclyc added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX/format-strings.cpp Ind

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 450496. inclyc added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX/format-strings.cpp Ind

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. There are too many things changed in this patch, I think the function of displaying the evaluation results, `FIXME` warning, these can be done in subsequent patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 450528. inclyc added a comment. Use isa<> to check Expr class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sem

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 450530. inclyc added a comment. rebase && qualify `const` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX

[PATCH] D131277: clang: fix typo availbility

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc accepted this revision. inclyc added a comment. This revision is now accepted and ready to land. LGTM. Could you please provide your real name and email address, like Name ? So that I can commit this for you. Also feel free to ask for commit access. Repository: rG LLVM Github Monorep

[PATCH] D131258: [Sema] Merge variable template specializations

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Modules/merge-var-template-spec-cxx-modules.cpp:45 +export import var_def; \ No newline at end of file Missing newline Comment at: clang/test/Modules/merge-var-template-spec.cpp:68 +#endif /

[PATCH] D131277: clang: fix typo availbility

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D131277#3704510 , @sloorush wrote: > @inclyc, Here is my real name and email address in the requested format: > > Aarush Bhat > > I would love to get commit access. What exactly is the process? Do I have to > email as mentione

[PATCH] D131277: clang: fix typo availbility

2022-08-06 Thread YingChi Long 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 rGa6cb8419b175: clang: fix typo availbility (authored by sloorush, committed by inclyc). Changed prior to commit: https://reviews.llvm.org/D131277?v

[PATCH] D131277: clang: fix typo availbility

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Copied from github comments: Thanks for working on this, changes on serialization may still cause issue related to backward compatibility. Even though this patch passed all regression tests, if in the future some one reports clang must give `availbility` (typo), we may

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-06 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 450569. inclyc added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 Files: clang/lib/Sema/SemaChecking.cpp clang/test/SemaCXX/format-strings.cpp

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-07 Thread YingChi Long via Phabricator via cfe-commits
inclyc accepted this revision. inclyc added a comment. (Not a serious review) It seems like that your patch has already been accepted, so that I can commit this patch for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://revie

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-07 Thread YingChi Long 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 rG87dc7d4b619d: [clang][CodeGen] Factor out Swift ABI hooks (NFCI) (authored by barannikov88, committed by inclyc). Repository: rG LLVM Github Monor

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-07 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. I think in fact you are now fully qualified to apply for commit access. Don't worry, Lattner generally trusts all developers willing to contribute to LLVM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://r

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131314/new/ https://reviews.llvm.org/D131314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a project: All. inclyc added reviewers: aaron.ballman, gribozavr2. inclyc added a subscriber: clang. inclyc added a reviewer: NoQ. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Crash inpu

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. GCC MSVC ICC seems to have some different behavior, clang after introducing this patch will think there is no problem with the code and output binary files, and `x` evaluates to `false` https://godbolt.org/z/hvbqTYMsx Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a project: All. inclyc added reviewers: rsmith, aaron.ballman, shafik. inclyc updated this revision to Diff 451047. inclyc added a comment. inclyc edited the summary of this revision. inclyc published this revision for review. Herald added a project: clang

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451049. inclyc edited the summary of this revision. inclyc added a comment. Address reviewer's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131466/new/ https://reviews.llvm.org/D131466 Files: clang/

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc reclaimed this revision. inclyc added a comment. It seems that we are missing checks about if there is no enough parameter to intrinsic template `__is_constructible` here, and we should report an error. [WIP] Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-08 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451056. inclyc added a comment. check argument number before evaulating Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/lib/Sema/SemaExprCXX.cpp clang

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5445 + } +} + tbaeder wrote: > This function copies the two conditions for the if-statements from > `evaluateTypeTrait()`. Is just doing it in `evaluateTypeTrait()` too late? > Duplicatin

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5445 + } +} + inclyc wrote: > tbaeder wrote: > > This function copies the two conditions for the if-statements from > > `evaluateTypeTrait()`. Is just doing it in `evaluateTypeTrait()` too

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451195. inclyc added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131466/new/ https://reviews.llvm.org/D131466 Files: clang/lib/AST/APValue.cpp clang/test/SemaCXX/try-print-as-s

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/SemaCXX/try-print-as-string-literal-type-check.cpp:7 +struct X { + char arr[2]; + constexpr X() {} The `ArrayRef Inits` points to here does not ends with `Int`, so `!Inits.back().getInt()` gets assertion fai

[PATCH] D131314: [clang] format string checks for `InitListExpr`

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D131314#3710331 , @aaron.ballman wrote: > In D131314#3707131 , @inclyc wrote: > >> ping > > FWIW, we usually only ping a review that hasn't had any activity in a week or > more (it's n

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc planned changes to this revision. inclyc added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5431 +static bool CheckTypeTraitArgNumber(TypeTrait Kind, size_t N) { + if (Kind <= UTT_Last) +return N == 1; I think we should report a warning

[PATCH] D131466: [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long 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 rG55d3b79d159b: [clang] add APValue type check in `TryPrintAsStringLiteral` (authored by inclyc). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-10 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. @aaron.ballman @shafik (Help wanted). These type traits will not cause clang to crash if current patch applied, but the `bool x` in that test case will evaluate to `false`. I think the problem behind the github issue is that we don't check the number of arguments for b

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-17 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Parser/while-loop-outside-function.c:3-4 + +while(1) {}; // expected-error {{expected identifier or '('}} \ + // expected-note {{while loop outside of functions}} + mizvekov wrote: > How about just

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 445455. inclyc edited the summary of this revision. inclyc added a comment. Now it only generates 1 error encountering token "while" ./local/while_loop_outside_func.cpp:1:1: error: while loop outside of function while (true) { ^ 1 error generated. CH

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 445458. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129573/new/ https://reviews.llvm.org/D129573 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/lib/Parse/ParseDecl.cpp clang/test/Parser/while-loop-outside-function.c clang/tes

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Parser/while-loop-outside-function.c:8 + +void some_fn(); + mizvekov wrote: > Can you add a few more test cases showing how error recovery is performing > here? > > Have we parsed this function declaration at

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Parser/while-loop-outside-function.c:3 + +while(1) {}; // expected-error {{while loop outside of function}} + mizvekov wrote: > You could break this down further into more lines to test exactly where the > err

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Parser/while-loop-outside-function.c:8 + +void some_fn(); + mizvekov wrote: > inclyc wrote: > > mizvekov wrote: > > > Can you add a few more test cases showing how error recovery is > > > performing here? > >

[PATCH] D129573: [Clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/Parser/while-loop-outside-function.c:8 + +void some_fn(); + inclyc wrote: > mizvekov wrote: > > inclyc wrote: > > > mizvekov wrote: > > > > Can you add a few more test cases showing how error recovery is > > >

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 445668. inclyc retitled this revision from "[Clang] add a diagnostic note 'while loop outside functions' at global scope" to "[clang] add a diagnostic note 'while loop outside functions' at global scope". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-19 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 445712. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129573/new/ https://reviews.llvm.org/D129573 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/lib/Parse/ParseDecl.cpp clang/test/Parser/while-loop-outside-function.c clang/tes

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-19 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 445771. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129573/new/ https://reviews.llvm.org/D129573 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/lib/Parse/ParseDecl.cpp clang/test/Parser/while-loop-outside-function.c clang/tes

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-20 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Is the build error related to this patch? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129573/new/ https://reviews.llvm.org/D129573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-20 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. Could you please review the latest patch ? I have removed some redundant test cases mentioned above CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129573/new/ https://reviews.llvm.org/D129573 ___ cfe-commits mailing li

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-21 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 446690. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129573/new/ https://reviews.llvm.org/D129573 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/lib/Parse/ParseDecl.cpp clang/test/Parser/while-loop-outside-function.c clang/tes

[PATCH] D129573: [clang] add a diagnostic note 'while loop outside functions' at global scope

2022-07-21 Thread YingChi Long via Phabricator via cfe-commits
inclyc marked 2 inline comments as not done. inclyc added inline comments. Comment at: clang/test/Parser/while-loop-outside-function.c:3 + +while // expected-error {{while loop outside of a function}} +(1) {}; Thanks a lot for your suggestion, I replaced this sta

[PATCH] D129573: [clang] better error message for while loops outside of control flow

2022-07-24 Thread YingChi Long 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 rGedaae251cca0: [clang] better error message for while loops outside of control flow (authored by inclyc). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread YingChi Long 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 rG94e8bd002c81: [clang] Fix crash upon stray coloncolon token in C2x mode (authored by Jialun Hu , committed by inclyc). Reposit

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D133248#3865010 , @SuibianP wrote: > @aaron.ballman Thanks for the guidance! I have rectified the parentheses and > appended to the release notes. Please feel free to point out any additional > issues with the Differential. >

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-10-30 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. > That is OK for glibc system because glibc includes this file manually. But > with other libc (e.g. musl), which does not manually include this, clang will > fail but GCC can get it compiled. FWIW currently we cannot build libedit using clang on x86_64-unknown-linux-mus

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451931. inclyc added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/include/clang/Basic/TypeTraits.h clang/include/clang/

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451932. inclyc added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/include/clang/Basic/TypeTraits.h clang/include/clang/Sema/Sema.

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:3783 - if (Arity && Args.size() != Arity) { -Diag(EndLoc, diag::err_type_trait_arity) Before this patch, we check the `Arity` here, so using type traits with unexpected number of a

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Basic/TypeTraits.cpp:64 +#define TYPE_TRAIT_N(Spelling, Name, Key) 0, +#include "clang/Basic/TokenKinds.def" +}; shafik wrote: > @aaron.ballman do we really have to include this three times? We are defining > d

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Basic/TypeTraits.cpp:64 +#define TYPE_TRAIT_N(Spelling, Name, Key) 0, +#include "clang/Basic/TokenKinds.def" +}; inclyc wrote: > shafik wrote: > > @aaron.ballman do we really have to include this three times? We

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-12 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 452120. inclyc added a comment. move implemention of CheckTypeTraitArity into SemaExprCXX, since type traits are C++ specific language extension Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https:/

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-12 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 452198. inclyc added a comment. add release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Type

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-12 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 452199. inclyc added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TypeTraits.h clang

  1   2   >