[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-06-26 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 534606. yronglin added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153296/new/ https://reviews.llvm.org/D153296 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/ExprConstant.

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-26 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 534610. yronglin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h clan

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-27 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 534920. yronglin added a comment. Poke CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h cla

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-06-27 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. Seems the diagnostic message `:5:9: note: constexpr evaluation hit maximum step limit; possible infinite loop?` was redundant, also gcc dose not emit this message. https://godbolt.org/z/v55P88cdT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-28 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. friendly ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-28 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 535414. yronglin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h clan

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-29 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D153701#4459036 , @cor3ntin wrote: > Sorry, I missed the ping on Discord. > Thanks for working on this > > I don't feel qualified to review this, but I don't think there are nearly > enough tests. > FYI there is a previous at

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-29 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D153701#4459036 , @cor3ntin wrote: > Sorry, I missed the ping on Discord. > Thanks for working on this > > I don't feel qualified to review this, but I don't think there are nearly > enough tests. > FYI there is a previous at

[PATCH] D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors

2023-06-29 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. Please help me, I have no better idea on this issue, do you have any better idea? @erichkeane @shafik Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153296/new/ https://reviews.llvm.org/D153296 ___

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

2023-06-29 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D139586#4403533 , @cor3ntin wrote: > FYI, I'm not actively working on this, > I did mess around with it a bit > https://github.com/cor3ntin/llvm-project/commit/478ff7f1aa7a4046fa8b293dfb86489b930a > but I'm extremely unf

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-21 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524106. yronglin added a comment. Improve the AST fidelity of ``alignas`` and ``_Alignas`` attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-21 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524107. yronglin added a comment. Remove extra include. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Pa

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-21 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524108. yronglin added a comment. Test asm dump. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/Par

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-21 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524158. yronglin added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: jplehr, sstefan1. Fix crash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-21 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524159. yronglin added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/Parser.h

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-21 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524165. yronglin added a comment. Format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/Parser.h

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-05-22 Thread Yurong via Phabricator via cfe-commits
yronglin created this revision. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: yronglin Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151121 Files: clang/lib/Cod

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-05-23 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 524673. yronglin added a comment. Try fix test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151121/new/ https://reviews.llvm.org/D151121 Files: clang/lib/CodeGen/CodeGenFunction.cpp clang/lib/CodeGen/Co

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-24 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D150528#4365688 , @aaron.ballman wrote: > In general, I think this is looking pretty good, thank you! I'll leave it to > @erichkeane to do the final sign-off as attributes code owner since this is > making a fair number of

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-24 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 525224. yronglin added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-24 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added a comment. Thanks, maybe I can do these trivially change in separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 __

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. ping~ @erichkeane Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 525614. yronglin added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/P

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong via Phabricator via cfe-commits
yronglin marked an inline comment as done. yronglin added a comment. Thanks for your comments, @erichkeane ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 ___

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 525636. yronglin added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/P

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added inline comments. Comment at: clang/lib/AST/AttrImpl.cpp:247 + + if (isAlignmentExpr()) { +return alignmentExpr erichkeane wrote: > Typically we don't do curleys on a single-statement... but I am on th

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added a comment. The libcxx CI failure seems not caused bye this patch, I have found that there have a patch to fix this issue. https://reviews.llvm.org/D151508 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas

2023-05-25 Thread Yurong 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 rGf75b73549d4a: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas (authored by yronglin). Repository: rG LLVM Github Mon

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-05-28 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. The col number in diagnostic message seems not correct https://godbolt.org/z/jnG5orhYW Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151121/new/ https://reviews.llvm.org/D151121 __

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-05-31 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151121/new/ https://reviews.llvm.org/D151121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-14 Thread Yurong via Phabricator via cfe-commits
yronglin created this revision. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: yronglin Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150528 Files: clang/docs/Re

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-14 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 522008. yronglin added a comment. Update ReleaseNotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Pars

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-14 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 522012. yronglin added a comment. Format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/Parser.h

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-15 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 522201. yronglin added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150528/new/ https://reviews.llvm.org/D150528 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Parse/

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-15 Thread Yurong via Phabricator via cfe-commits
yronglin marked 3 inline comments as done. yronglin added a comment. Thanks a lot for your review @aaron.ballman ! BTW, does the most good approach is that we just add a new `ParsedAttribute` with `TypeSourceInfo` but not an `UnaryExprOrTypeTraitExpr`? Comment at: clang/docs/

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-15 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added a comment. In D150528#4342600 , @aaron.ballman wrote: > In D150528#4342535 , @yronglin > wrote: > >> Thanks a lot for your review @aaron.ballman ! BTW, d

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-17 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D150528#4343102 , @aaron.ballman wrote: > In D150528#4342646 , @yronglin > wrote: > >> In D150528#4342600 , >> @aaron.ballman wrote: >> >>>

[PATCH] D150528: [Clang] Fix the diagnoses when the argument to alignas is an incomplete type

2023-05-17 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D150528#4349729 , @aaron.ballman wrote: > In D150528#4349711 , @yronglin > wrote: > >> Sorry for the late reply and thanks for your tips! @aaron.ballman I >> followed your advice t

[PATCH] D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type

2023-05-01 Thread Yurong via Phabricator via cfe-commits
yronglin added reviewers: rsmith, rjmccall. yronglin added a comment. Looks good from my side Comment at: clang/lib/Sema/SemaChecking.cpp:7987 + return true; TheCall->setArg(0, FirstArgResult.get()); } Can we add a comments here that we ignored the

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2023-05-01 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7651-7652 + Expr *FirstArg = TheCall->getArg(0); + if (auto *CE = dyn_cast(FirstArg)) +FirstArg = CE->getSubExprAsWritten(); rsmith wrot

[PATCH] D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type

2023-05-02 Thread Yurong via Phabricator via cfe-commits
yronglin added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7979-7986 { ExprResult FirstArgResult = DefaultFunctionArrayLvalueConversion(FirstArg); -if (FirstArgResult.isInvalid()) +if (checkBuiltinArgument(*this, TheCall, 0)) retur

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-06-05 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151121/new/ https://reviews.llvm.org/D151121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-06-05 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D151121#4378402 , @yronglin wrote: > The col number in diagnostic message seems not correct > https://godbolt.org/z/jnG5orhYW Thanks for your review @erichkeane , the column number in diagnostic message seems not correct ht

[PATCH] D152259: [Clang] Make increment bool SFINAE-friendly

2023-06-06 Thread Yurong via Phabricator via cfe-commits
yronglin created this revision. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: yronglin Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D152259 Files: clang/lib/Sem

[PATCH] D152259: [Clang] Make increment bool SFINAE-friendly

2023-06-06 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 528847. yronglin added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152259/new/ https://reviews.llvm.org/D152259 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/

[PATCH] D152259: [Clang] Make increment bool SFINAE-friendly

2023-06-06 Thread Yurong via Phabricator via cfe-commits
yronglin marked an inline comment as done. yronglin added a comment. In D152259#4399217 , @erichkeane wrote: > This should have a release note. > > I think the bug is asking to make this a SFINAE failure (it isn't clear what > you mean by "SFINAE Friend

[PATCH] D152259: [Clang] Make increment bool SFINAE failure

2023-06-06 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 528856. yronglin marked an inline comment as done. yronglin added a comment. Add release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152259/new/ https://reviews.llvm.org/D152259 Files: clang/docs/R

[PATCH] D152259: [Clang] Reject increment of bool value in unevaluated contexts after C++17

2023-06-06 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks for your review @erichkeane ! Seems the CI failure not caused by this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152259/new/ https://reviews.llvm.org/D152259 _

[PATCH] D152259: [Clang] Reject increment of bool value in unevaluated contexts after C++17

2023-06-06 Thread Yurong 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 rG540294845bab: [Clang] Reject increment of bool value in unevaluated contexts after C++17 (authored by yronglin). Repository: rG LLVM Github Monore

[PATCH] D152259: [Clang] Reject increment of bool value in unevaluated contexts after C++17

2023-06-06 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D152259#4399793 , @erichkeane wrote: > In D152259#4399781 , @yronglin > wrote: > >> Thanks for your review @erichkeane ! Seems the CI failure not caused by this >> patch. > > I agre

[PATCH] D138511: [CodeGen][AArch64] Fix AArch64ABIInfo::EmitAAPCSVAArg crash with empty record type in variadic arg

2022-12-04 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. pin~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138511/new/ https://reviews.llvm.org/D138511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D138511: [CodeGen][AArch64] Fix AArch64ABIInfo::EmitAAPCSVAArg crash with empty record type in variadic arg

2022-12-05 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. pin~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138511/new/ https://reviews.llvm.org/D138511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D138511: [CodeGen][AArch64] Fix AArch64ABIInfo::EmitAAPCSVAArg crash with empty record type in variadic arg

2022-12-06 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. In D138511#3971913 , @rjmccall wrote: > Please don't ping every day. We haven't lost track of your patch, we're just > busy reviewing other things. > > This seems reasonable to me. Thanks very much for your review @rjmccall !

[PATCH] D138511: [CodeGen][AArch64] Fix AArch64ABIInfo::EmitAAPCSVAArg crash with empty record type in variadic arg

2022-12-07 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 480853. yronglin added a comment. Rebase and apply changes from https://reviews.llvm.org/D138295 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138511/new/ https://reviews.llvm.org/D138511 Files: clang/lib/C

[PATCH] D133202: [Clang][CodeGen] Fix __builtin_assume_aligned crash

2022-09-02 Thread Lin Yurong via Phabricator via cfe-commits
yronglin created this revision. yronglin added a reviewer: rjmccall. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang will crash when __builtin_assume_aligned's 1st arg is array type(or string lit

[PATCH] D133202: [Clang][CodeGen] Fix __builtin_assume_aligned crash

2022-09-02 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Hi John, I just have a new account, we continue here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133202/new/ https://reviews.llvm.org/D133202 ___ cfe-commits mailing list cfe

[PATCH] D133202: [Clang][CodeGen] Fix __builtin_assume_aligned crash

2022-09-02 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 457580. yronglin added a comment. Format code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133202/new/ https://reviews.llvm.org/D133202 Files: clang/include/clang/Basic/Builtins.def clang/lib/CodeGen/CGB

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-02 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 457643. yronglin added a comment. Update patch with john's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133202/new/ https://reviews.llvm.org/D133202 Files: clang/include/clang/Basic/Builtins.def

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-02 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7697 // The alignment must be a constant integer. - Expr *Arg = TheCall->getArg(1); + Expr *SecondArg = TheCall->getArg(1); rjmccall wrote: > This should be: > > ``` > Expr *Secon

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-02 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. In D133202#3767414 , @rjmccall wrote: > Thanks, LGTM Thanks for your review John, but I don’t have commit access, can you land this patch for me? Please use "yronglin " to commit the change. Repository: rG LLVM Github Mono

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-03 Thread Lin Yurong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ad2fe913ae0: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array… (authored by yronglin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-05 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. In D133202#3768770 , @vitalybuka wrote: > Broken by the patch https://lab.llvm.org/buildbot/#/builders/127/builds/35304 Thanks @vitalybuka , seems `intrin0.inl.h` have a forward declaration `__MACHINE(void * __cdecl __builtin_

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-05 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 458019. yronglin added a project: Sanitizers. yronglin added a comment. Fix windows build bolt broken https://lab.llvm.org/buildbot/#/builders/127/builds/35304 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-06 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 458315. yronglin added a comment. Update ReleaseNotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133202/new/ https://reviews.llvm.org/D133202 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CGBuil

[PATCH] D133202: [Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-06 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks for your review @aaron.ballman , I've updated ReleaseNotes. I don’t have commit access, can you land this patch for me?Please use 'yronglin ' to commit the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1332

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-07 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 458403. yronglin retitled this revision from "[Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type" to "[Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type". Repository: rG LLVM Github Monorepo CHAN

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-07 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133202/new/ https://reviews.llvm.org/D133202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-07 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. In D133202#3774905 , @aaron.ballman wrote: > I've pushed the changes up for you, thanks! > > In D133202#3774801 , @yronglin > wrote: > >> ping~ > > Something to keep in mind for the fut

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-08 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks a lot for your comments @rsmith @rjmccall . Firstly, as far as I know, turning on the `-fsanitizer=alignment` options when calling `__builtin_assume_aligned` in C code, Clang will emit `call void @__ubsan_handle_alignment_assumption(...)` in CodeGen, and CodeGe

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-08 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7651-7652 + Expr *FirstArg = TheCall->getArg(0); + if (auto *CE = dyn_cast(FirstArg)) +FirstArg = CE->getSubExprAsWritten(); rjmccall wrote: > rsmith wrote: > > This looks very su

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-08 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Reproduce windows broken test: ignore.cpp #include void *__builtin_assume_aligned(const void *, size_t, ...) noexcept; void foo() { int a; (void) __builtin_assume_aligned(&a, 4); } FunctionDecl 0x14a80e480 <./ignore.cpp:3:1, col:7> col:7 __buil

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-08 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Seems that a builtin can't be redeclared which has custom type checking https://github.com/llvm/llvm-project/blob/ec8f2905a33ba970543c8edb4141c47f30d325f7/clang/lib/Basic/Builtins.cpp#L210-L214 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-09 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks very much for your comments @rjmccall @rsmith , I've take a look at D45383 , I believe that user code isn't allowed to declare __builtin_*, but seems `intrin0.inl.h` is a system header on windows, should we keep compatibility(li

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-09 Thread Lin Yurong via Phabricator via cfe-commits
yronglin created this revision. yronglin added reviewers: rjmccall, rsmith. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix __builtin_assume_aligned incorrect type descriptor example from @rsmith

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-09 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Hi, should I both fix alignment in this patch or in another separate patch? (this seems have different behavior with gcc https://godbolt.org/z/7dvM8zhnh ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133583/new/ https://

[PATCH] D133202: [Clang] Avoid __builtin_assume_aligned crash when the 1st arg is array type

2022-09-09 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. I've a new patch D133583 , please can you guys take a look Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133202/new/ https://reviews.llvm.org/D133202 ___

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-09 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 459092. yronglin added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133583/new/ https://reviews.llvm.org/D133583 Files: clang/include/clang/Basic/Builtins.def clang/lib/Basic/Builtins.c

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-15 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. In D133583#3792625 , @aaron.ballman wrote: > In D133583#3780460 , @yronglin > wrote: > >> Hi, follow D133202 , should I both fix >> alignment in this

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-16 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 460870. yronglin added a comment. Add test case for C++ polymorphism class Use `typedef __typeof__(sizeof(0)) size_t;` instead of `#include ` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133583/new/ https://r

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-16 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks for your suggestion @aaron.ballman , also I have added a new test case for C++ polymorphism classes Comment at: clang/test/Sema/builtin-redecl.cpp:5-6 +#include + // Redeclaring library builtins is OK. aaron.ballman wrote:

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-20 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks for take a review @aaron.ballman @rjmccall , can you land this patch for me? Please use 'yronglin ' to commit the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133583/new/ https://reviews.llvm.org/D133583

[PATCH] D133583: [clang][ubsan] Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

2022-09-20 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. In D133583#3803002 , @aaron.ballman wrote: > In D133583#3802451 , @yronglin > wrote: > >> Thanks for take a review @aaron.ballman @rjmccall , can you land this patch >> for me? Please

[PATCH] D138137: [CodeGen][ARM] Fix ARMABIInfo::EmitVAAarg crash with empty record type variadic arg

2022-11-16 Thread Lin Yurong via Phabricator via cfe-commits
yronglin created this revision. yronglin added reviewers: rjmccall, asl. Herald added a subscriber: kristof.beyls. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix ARMABIInfo::EmitVAAarg crash with e

[PATCH] D138137: [CodeGen][ARM] Fix ARMABIInfo::EmitVAAarg crash with empty record type variadic arg

2022-11-17 Thread Lin Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 476093. yronglin added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138137/new/ https://reviews.llvm.org/D138137 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/arm-vaarg.c

[PATCH] D138137: [CodeGen][ARM] Fix ARMABIInfo::EmitVAAarg crash with empty record type variadic arg

2022-11-18 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thank you so much for your review, @rjmccall , can you land this patch for me? Please use 'yronglin ' to commit the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138137/new/ https://reviews.llvm.org/D138137 _

[PATCH] D138137: [CodeGen][ARM] Fix ARMABIInfo::EmitVAAarg crash with empty record type variadic arg

2022-11-18 Thread Lin Yurong via Phabricator via cfe-commits
yronglin added a comment. Thank you so much for your review, @rjmccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138137/new/ https://reviews.llvm.org/D138137 ___ cfe-commits mailing list cfe-commits@

<    1   2