[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 510807. Fznamznon added a comment. Add a comment, rebase, fix format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147531/new/ https://reviews.llvm.org/D147531 Files: clang/docs/ReleaseNotes.rst clang/li

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15177 : ExprEvalContexts.back().Context); +ExprEvalContexts.back().InImmediateFunctionContext = FD->isConsteval(); cor3ntin wrote: > I think it might be wort

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 510843. Fznamznon added a comment. Fix grammar, add checks to the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147531/new/ https://reviews.llvm.org/D147531 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon marked 2 inline comments as done. Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15186 + // different handling. + ExprEvalContexts.back().InImmediateFunctionContext = FD->isConsteval(); + cor3ntin wrote: > shafik wrote: > > I

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-04-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5e1a93ea10f: [clang] Fix crash when handling nested immediate invocations (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D146234?vs=509039&id=511027#toc Repository: rG LL

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Due to missing check on union, there was a null expression added to init list that caused crash later. Fixes https://gi

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFlexibleArrayMember()) ++NumElems; --

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG55bbcbf511b4: [clang] Reset track of immediate function context when entering new function (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D147531?vs=510843&id=511357#toc Rep

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFlexibleArrayMember()) ++NumElems; --

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-04-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. After resolving several outstanding issues now is the time to mark it as fully supported. Fixes https://github.com/llvm

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-11 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFlexibleArrayMember()) ++NumElems; --

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In some cases non-null non-constant yet valid expression may reach point where `ConditionResult` is created. For example

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513276. Fznamznon added a comment. Rebase, evaluate the expression only only time Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 Files: clang/docs/ReleaseNotes.r

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Sema/Sema.h:12855 +!Condition.get()->isValueDependent() && +Condition.get()->isIntegerConstantExpr(S.Context)), KnownValue(HasKnownValue &&

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-13 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513290. Fznamznon added a comment. Use std::optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sema

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513497. Fznamznon added a comment. Rebase, fix format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Sem

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before checking that template partial specialization is "reachable", ensure it exists. Fixes https://github.com/llvm/ll

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:134 "specifier in SFINAE context?"); if (!hasReachableDefinition(PartialSpec)) diagnoseMissingImport(SS.getLastQualifierNameLoc()

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon marked an inline comment as not done. Fznamznon added inline comments. Comment at: clang/test/SemaCXX/undefined-partial-specialization.cpp:12 +template +void boo::foo(){} // expected-error{{nested name specifier 'boo::' for declaration does not refer into a class, class

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513575. Fznamznon added a comment. Rebase, fix error message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148330/new/ https://reviews.llvm.org/D148330 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/S

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaCXX/undefined-partial-specialization.cpp:12 +template +void boo::foo(){} // expected-error{{nested name specifier 'boo::' for declaration does not refer into a class, class template or class template partial specializat

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 513581. Fznamznon added a comment. Test c++17 too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148330/new/ https://reviews.llvm.org/D148330 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaCXXScope

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaCXX/undefined-partial-specialization.cpp:1 +// RUN: %clang_cc1 -std=c++20 -verify %s + erichkeane wrote: > nit: can you add a c++17 run line here too? Only 20 crashed, but I want to > make sure these h

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. @aaron.ballman , are you ok with the change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148206/new/ https://reviews.llvm.org/D148206 ___ cfe-commits mailing list cfe-commits

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:134 "specifier in SFINAE context?"); -if (!hasReachableDefinition(PartialSpec)) +if (PartialSpec->hasDefinition() && +

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon marked an inline comment as not done. Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFl

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:808 unsigned NumElems = numStructUnionElements(ILE->getType()); - if (RDecl->hasFlexibleArrayMember()) + if (!RDecl->isUnion() && RDecl->hasFlexibleArrayMember()) ++NumElems; --

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-04-17 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d9046f06d55: [clang] Do not crash after suggesting typo correction to constexpr if condition (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D148206?vs=513497&id=514174#toc

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Friendly ping. It is been a while. @cjdb , any chance for an update? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147717/new/ https://reviews.llvm.org/D147717 ___ cfe-commits

[PATCH] D148206: [clang] Do not crash after suggesting typo correction to constexpr if condition

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaCXX/invalid-if-constexpr.cpp:7 +} +void a() { if constexpr (__adl_swap<>) {}} // expected-error{{use of undeclared identifier '__adl_swap'; did you mean '__sync_swap'?}} \ + //

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. @aaron.ballman , WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150435/new/ https://reviews.llvm.org/D150435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/Sema/flexible-array-in-union.c:1-16 +// RUN: %clang_cc1 %s -verify -fsyntax-only -DERROR +// RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ +// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility +// RUN: %clang_cc1

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-22 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f8e450b6682: [clang] Fix crash on attempt to initialize union with flexible array member (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D150435?vs=523723&id=524278#toc Repo

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2495 } else { + EnterExpressionEvaluationContext Ctx( + Actions, Sema::ExpressionEvaluationContext::PotentiallyEvaluated); What is the point for an additional expression

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Out of curiosity - does something like these examples - https://godbolt.org/z/Eqb58Wqoo work as expected? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ https://reviews.llvm.org/D151094 __

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaCXX/cxx2b-consteval-propagate.cpp:8 + +namespace examples { + cor3ntin wrote: > Fznamznon wrote: > > These examples exactly match the ones provided by P2564R3, should they be > > in a separate test in `

[PATCH] D151235: [Clang] Switch from TransformExpr to TransformInitializer in places we need to revert initializer to it syntactic form for Sema

2023-05-24 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/CodeGenCXX/gh62818.cpp:1 +// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s + Why no opaque pointers? AFAIK since LLVM 17 typed pointers are not su

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-05-26 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang used to reject consteval operators if they're used inside a template due to TreeTransform putting two different `D

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-05-26 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11940-11943 - ExprResult Callee = getDerived().TransformExpr(E->getCallee()); - if (Callee.isInvalid()) -return ExprError(); - cor3ntin wrote: > I don't understand why we would not

[PATCH] D151753: [Clang][Sema] Do not try to analyze dependent alignment during -Wcast-align

2023-05-31 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added reviewers: erichkeane, shafik. Fznamznon added a comment. The change looks reasonable for me, though I'm not experienced in related code. Have you checked that it fixes the non-reduced original example? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-05-31 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. In D151553#4380667 , @erichkeane wrote: > Like @cor3ntin I'm concerned about removing the transform call. I'm just as > concerned that it caused no regressions... > > If we have to transform the arguments, then this can be a

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-01 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11940-11943 - ExprResult Callee = getDerived().TransformExpr(E->getCallee()); - if (Callee.isInvalid()) -return ExprError(); - rsmith wrote: > Fznamznon wrote: > > cor3ntin wrote: >

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 527808. Fznamznon added a comment. Transform the callee, add a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https://reviews.llvm.org/D151553 Files: clang/docs/ReleaseNotes.rst clang/lib

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-06-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Nothing more from me, but I would wait for someone else's approval. Comment at: clang/lib/Sema/SemaExpr.cpp:18204 +const NamedDecl *ND = cast(DR->getDecl()); +if (const auto *MD = llvm::dyn_cast(ND); MD && (MD->isLambdaStaticInvoker()

[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-06-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per P1975R0 an expression like `static_cast(...)` defines the type of the expression as U[1]. Fixes https://github.com/

[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-06-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:8824 + if (auto *Cast = dyn_cast(E)) { +if (auto *SubInit = dyn_cast(Cast->getSubExpr())) { + const Type *InnerType = SubInit->getType().getTypePtr(); erichkeane wrote: > I am not

[PATCH] D143411: [NFC][clang] Fix static analyzer concern about uninitialized variable

2023-02-07 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8681797e595d: [NFC][clang] Fix static analyzer concern about uninitialized variable (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

[PATCH] D142534: [clang][codegen] Fix emission of consteval constructor of derived type

2023-02-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142534/new/ https://reviews.llvm.org/D142534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D142534: [clang][codegen] Fix emission of consteval constructor of derived type

2023-02-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. I discovered that this patch also helps to fix crash reported in https://github.com/llvm/llvm-project/issues/59223 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142534/new/ https://reviews.llvm.org/D142534 ___

[PATCH] D142534: [clang][codegen] Fix emission of consteval constructor of derived type

2023-02-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 495851. Fznamznon added a comment. Rebase and add a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142534/new/ https://reviews.llvm.org/D142534 Files: clang/docs/ReleaseNotes.rst clang/lib/Co

[PATCH] D142534: [clang][codegen] Fix emission of consteval constructor of derived type

2023-02-09 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2929683eef27: [clang][codegen] Fix emission of consteval constructor of derived type (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D143734: [NFC][clang][Modules] Refine test checks by adding `:`

2023-02-10 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Fznamznon added reviewers: ChuanqiXu, Bigcheese. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The test can fail if wokring directory where the test was launched has

[PATCH] D143734: [NFC][clang][Modules] Refine test checks by adding `:`

2023-02-21 Thread Mariya Podchishchaeva 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 rG440f45acff1c: [NFC][clang][Modules] Refine test checks by adding `:` (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D144495: [NFC][clang] Refine tests by adding `:` to checks

2023-02-21 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a subscriber: arphaman. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The tests can fail if wokring directory where the tests were launched has a `error`

[PATCH] D149904: Generic selection expressions that accept a type operand

2023-05-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7033-7036 + if (E->isExprPredicate()) +ToControllingExpr = importChecked(Err, E->getControllingExpr()); + else +ToControllingType = importChecked(Err, E->getControllingType()); J

[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration

2023-05-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11141-11145 if (!Chunk.Fun.hasTrailingReturnType()) { + IsValid = false; Diag(D.getName().getBeginLoc(), diag::err_deduction_guide_no_trailing_return_type); break;

[PATCH] D150036: [Clang] Correctly handle allocation in template arguments

2023-05-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/docs/ReleaseNotes.rst:385 +- Fix handling of constexpr dynamic memory allocations in template + arguments. (`#62462 `) Not an expert in this, but I assume `_`

[PATCH] D150108: [clang] Evaluate non-type default template argument when it is required

2023-05-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a subscriber: arphaman. Herald added a reviewer: shafik. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before this change a default template argument for

[PATCH] D150108: [clang] Evaluate non-type default template argument when it is required

2023-05-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:1614 -TemplateArgument SugaredConverted, CanonicalConverted; -ExprResult DefaultRes = CheckTemplateArgument( shafik wrote: > Out of curiosity where is the template argument bei

[PATCH] D150108: [clang] Evaluate non-type default template argument when it is required

2023-05-09 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG74fd474eea53: [clang] Evaluate non-type default template argument when it is required (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D150108?vs=520325&id=520622#toc Reposito

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. > Well that's... a bit shorter... than I would have expected that union to be. > (I'm not apologizing for the pun.) In clang `union x { short x[]; }; static_assert(sizeof(x)==2);` evaluates to '0 == 2'. That is even shorter, I guess? This is also the reason why uni

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Due to missing check on union, there was a null expression added to init list that caused crash later. Fixes https://gi

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. I posted a pure crash fix here - https://reviews.llvm.org/D150435 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 ___ cfe-commits m

[PATCH] D150435: [clang] Fix crash on attempt to initialize union with flexible array member

2023-05-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 523723. Fznamznon added a comment. Move the test to a separate file, test C++ and MSVC compatibility mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150435/new/ https://reviews.llvm.org/D150435 Files: c

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. expr.prim.lambda.capture p5 says: If an identifier in a capture appears as the declarator-id of a parameter of the lambd

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:134 "specifier in SFINAE context?"); -if (!hasReachableDefinition(PartialSpec)) +if (PartialSpec->hasDefinition() && +

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp:7 + // expected-note {{variable 'x' is explicitly captured here}} + auto h = [y = 0](y) { return 0; }; // expected-e

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 515256. Fznamznon added a comment. Rebase, mention C++23, add a test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148712/new/ https://reviews.llvm.org/D148712 Files: clang/lib/Sema/SemaLambda.cpp c

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon marked 2 inline comments as done. Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1381 +if (Capture.Id == TP->getIdentifier()) { + Diag(Capture.Loc, diag::err_template_param_shadow) << Capture.Id; + Diag(TP->getLocati

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 515257. Fznamznon added a comment. Modify comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148712/new/ https://reviews.llvm.org/D148712 Files: clang/lib/Sema/SemaLambda.cpp clang/test/CXX/expr/expr.

[PATCH] D147626: [clang] Do not crash when initializing union with flexible array member

2023-04-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 515287. Fznamznon added a comment. Reject flexible array members in unions in C++ as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 Files: clang/docs/Relea

[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

2023-04-27 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c97dc20ab61: [clang] Do not crash on undefined template partial specialization (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D148330?vs=513581&id=517496#toc Repository:

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-27 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 517502. Fznamznon added a comment. Rebase to double check that pre-commit fail is unrelated, add a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148712/new/ https://reviews.llvm.org/D148712 File

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 517834. Fznamznon added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148712/new/ https://reviews.llvm.org/D148712 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaLambda.cpp cla

[PATCH] D149436: [clang] Do not attempt to zero-extend _BitInt(1) when not required

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `ConvertTypeForMem` doesn't return wider type for _BitInt unless it is used in a bitfield, so no need to extend when try

[PATCH] D148712: [clang] Diagnose shadowing of lambda's template parameter by a capture

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0fb84bc7fdec: [clang] Diagnose shadowing of lambda's template parameter by a capture (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6241-6244 def ext_flexible_array_empty_aggregate_ms : Extension< "flexible array member %0 in otherwise empty " "%select{struct|interface|union|class|enum}1 is a Microsoft extensi

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-04-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 517985. Fznamznon edited the summary of this revision. Fznamznon added a comment. Apply some of the comments, rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-05-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. In D147717#4275410 , @cjdb wrote: > I'm gonna get started on this today! @cjdb , how is this going? I've seen https://github.com/llvm/llvm-project/issues/62224, but no more issues with consteval label. Repository: rG LLVM

[PATCH] D149436: [clang] Do not attempt to zero-extend _BitInt(1) when not required

2023-05-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7133283835fb: [clang] Do not attempt to zero-extend _BitInt(1) when not required (authored by Fznamznon). Changed prior to commit: https://reviews.llvm.org/D149436?vs=517863&id=518688#toc Repository:

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 518695. Fznamznon added a comment. Rebase, add a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ https://reviews.llvm.org/D147626 Files: clang/docs/ReleaseNotes.rst clang/include/clang/

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-02 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6241-6244 def ext_flexible_array_empty_aggregate_ms : Extension< "flexible array member %0 in otherwise empty " "%select{struct|interface|union|class|enum}1 is a Microsoft extensi

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG22e2db6010b0: [clang] Reject flexible array member in a union in C++ (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147626/new/ http

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-03 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. I've got an error from buildbot on Windows: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winioctl.h:13404:51: error: flexible array member 'Lev1Depends' in a union is not allowed STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY Lev1Depends[];

[PATCH] D147626: [clang] Reject flexible array member in a union in C++

2023-05-04 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. > Any indication we're going to hit something similar with GCC compatibility in > a glibc (or other system) header? I haven't seen non-Windows problems. Though I agree that if we somehow are going to support this for MSVC compatibility, there is no harm in allowing th

[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-06-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:8824 + if (auto *Cast = dyn_cast(E)) { +if (auto *SubInit = dyn_cast(Cast->getSubExpr())) { + const Type *InnerType = SubInit->getType().getTypePtr(); erichkeane wrote: > Fznamznon

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-06-05 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. In D147717#4393019 , @cor3ntin wrote: > I think we should make sure to land this for clang 17. The rate of consteval > bugs is no greater than that of any other feature at this point. There is https://github.com/llvm/llvm-proj

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 528769. Fznamznon added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https://reviews.llvm.org/D151553 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/TreeTransform.h cl

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. libcxx CI seems to be failing for other patches as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https://reviews.llvm.org/D151553 ___ cfe-commits mailing list

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-06 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:12002 + + UnresolvedSet<16> Functions; + if (ImplicitCastExpr *ICE = dyn_cast(Callee)) cor3ntin wrote: > Can `Functions` ever held more than one element here? Good catch! I don't think

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-07 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 529220. Fznamznon added a comment. Use 1-element UnresolvedSet, rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https://reviews.llvm.org/D151553 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-07 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:15216-15217 - if (Op == OO_Subscript) { -SourceLocation LBrace; -SourceLocation RBrace; - -if (DeclRefExpr *DRE = dyn_cast(Callee)) { - DeclarationNameLoc NameLoc = DRE->getNameInfo().

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-07 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 529229. Fznamznon added a comment. Remove RequiresADL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https://reviews.llvm.org/D151553 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/TreeTran

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-07 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 529244. Fznamznon added a comment. Remove dead code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https://reviews.llvm.org/D151553 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/TreeTransf

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-06-08 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa1e5430b6adf: [clang] Fix consteval operators in template contexts (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151553/new/ https:

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-06-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 530434. Fznamznon added a comment. Rebase, update value of macro since P2564 is implemented now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147717/new/ https://reviews.llvm

[PATCH] D147717: [C++20] Claim full support for consteval again

2023-06-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. https://github.com/llvm/llvm-project/issues/62886 has been fixed, I'm trying to figure out or at least reduce https://github.com/llvm/llvm-project/issues/60709 so it doesn't have headers included, but no progress so far. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D147717: [C++20] Claim full support for consteval again

2023-06-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. In D147717#4413522 , @aaron.ballman wrote: > LGTM (though I wonder if we should add a release note as well) I can add a note saying that the macro is now defined. Is somewhere under `C++ Language Changes` title the right plac

[PATCH] D147717: [C++20] Claim full support for consteval again

2023-06-12 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 530477. Fznamznon added a comment. Rebase, add a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147717/new/ https://reviews.llvm.org/D147717 Files: clang/docs/ReleaseNotes.rst clang/lib/Front

<    1   2   3   4   5   >