[PATCH] D92733: Fix PR25627 - false positive diagnostics involving implicit-captures in dependent lambda expressions.

2020-12-15 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders requested changes to this revision. wchilders added a comment. This revision now requires changes to proceed. I'm still "chewing on this", I'm not sure I fully understand the problem well enough to give great "big picture" feedback. In any case, I've left a few comments where I had a p

[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum

2020-11-13 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1762 }; +using FDK = FunctionDefinitionKind; wchilders wrote: > aaron.ballman wrote: > > rsmith wrote: > > > I don't think it's OK to have an initialism like this in the `clang`

[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum

2020-11-13 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1762 }; +using FDK = FunctionDefinitionKind; aaron.ballman wrote: > rsmith wrote: > > I don't think it's OK to have an initialism like this in the `clang` > > namespace scope --

[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum

2020-11-13 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added a comment. Replying to inline comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91035/new/ https://reviews.llvm.org/D91035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D90976: Fixed an issue where diagnostics printed expressions in a roundabout way

2020-11-09 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders updated this revision to Diff 303953. wchilders added a comment. Formatting fixes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90976/new/ https://reviews.llvm.org/D90976 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/AST/Expr.h clang/include/clan

[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum

2020-11-09 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added a comment. Generally agree with this direction; Are there plans for migrating https://github.com/llvm/llvm-project/blob/master/clang/include/clang/Basic/Specifiers.h in a similar fashion, for consistency? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D91011: [NFC, Refactor] Rename the (scoped) enum DeclaratorContext's enumerators to avoid redundancy

2020-11-09 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders accepted this revision. wchilders added a comment. +1 Nice QOL change :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91011/new/ https://reviews.llvm.org/D91011 ___ cfe-commits mailing list cf

[PATCH] D90976: Fixed an issue where diagnostics printed expressions in a roundabout way

2020-11-06 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: yaxunl, hans, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. wchilders requested review of this revision. Previously expressions were being printed in diagnostics via an implicit conversion to an expressio

[PATCH] D85933: Don't track consteval references for dependent members

2020-08-14 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:1761 + llvm::SaveAndRestore DisableIITracking( + S.RebuildingImmediateInvocation, true); + Tyker wrote: > I don't think RebuildingImmediateInvocation should be used here si

[PATCH] D85933: Don't track consteval references for dependent members

2020-08-13 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: Tyker, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. wchilders requested review of this revision. Previously dependent references to consteval (`ReferenceToConsteval`) were tracked, and dependent expressi

[PATCH] D76443: Use ConstantExpr cached APValues if present for code generation

2020-06-15 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders abandoned this revision. wchilders added a comment. Abandoned in favor of https://reviews.llvm.org/D76420 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76443/new/ https://reviews.llvm.org/D76443 ___ cfe-commits mailing list cfe-co

[PATCH] D76724: Prevent immediate evaluations inside of decltype

2020-03-26 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders abandoned this revision. wchilders added a comment. Thanks Tyker, you're right, there is a general problem that needs handled, if this is to be handled; I had a bit of tunnel vision here. However, I'm retracting/abandoning this patch entirely as upon further review, it's not standard

[PATCH] D76443: Use ConstantExpr cached APValues if present for code generation

2020-03-25 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders updated this revision to Diff 252610. wchilders added a comment. Updated to remove duplicated (and out dated) APValue generation logic, and fixed formatting issues. (Thanks for pointing out something was awry Tyker) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76443/new/ htt

[PATCH] D76724: Prevent immediate evaluations inside of decltype

2020-03-24 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: Tyker, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes an issue where immediate invocations were queued inside of decltype, resulting in decltype's operand being evaluated. Repository: rG LLV

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-24 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders updated this revision to Diff 252357. wchilders added a comment. Updated the patch to correct formatting issues, and removed application of the `ConstantEvaluated` evaluation context to var decls as it introduces too much complexity. Additionally removed a fix for `decltype` with imme

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-20 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders updated this revision to Diff 251763. wchilders marked an inline comment as done. wchilders added a comment. Dropped the override for constexpr evaluator, LValue evaluation base class CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76438/new/ https://reviews.llvm.org/D76438 Fil

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-20 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added a comment. I should note, I don't have commit access, so I'm unable to commit this myself. Attribution would be `Wyatt Childers ` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76438/new/ https://reviews.llvm.org/D76438 ___

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-20 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked 2 inline comments as done. wchilders added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7325-7329 + // Override to perform additional checks to ensure the cached APValue + // is actually an LValue. + bool VisitConstantExpr(const ConstantExpr *E)

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-20 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders updated this revision to Diff 251732. wchilders added a comment. Updated to assume LValue `ConstantExpr`s have LValue `APValue`s, with verification in debug mode. Additionally, added a missing LValue -> RValue conversion for `VerifyIntegerConstantExpression`. CHANGES SINCE LAST ACTIO

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-20 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked 2 inline comments as done. wchilders added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7329 + if (Result.isLValue()) +return Success(Result, E); +} rsmith wrote: > wchilders wrote: > > rsmith wrote: > > > wchilder

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16793-16797 + if (isManifestlyEvaluatedVar(*this, D)) { +using ExpressionKind = ExpressionEvaluationContextRecord::ExpressionKind; + +PushExpressionEvaluationContext( +ExpressionEvaluatio

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7329 + if (Result.isLValue()) +return Success(Result, E); +} rsmith wrote: > wchilders wrote: > > This doesn't seem to be the

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15597 + (Rec.isConstantEvaluated() && + Rec.ExprContext != ExpressionKind::EK_ConstexprVarInit)) { ExprCleanupObjects.erase(ExprCleanupObjects.begi

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: Tyker, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15597 + (Rec

[PATCH] D76443: Use ConstantExpr cached APValues if present for code generation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:1095 +// preventing the cached results from being used. +if (!isa(fe)) { + enterFullExpression(fe); This one is a bit weird, I think the comment explains it well, but I feel th

[PATCH] D76443: Use ConstantExpr cached APValues if present for code generation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: void, Tyker, rsmith. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. wchilders added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:1095 +// preventing the cached results from be

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/AST/Expr.cpp:2875 - else if (auto *CE = dyn_cast(E)) -return CE->getSubExpr(); - return E; } `IgnoreParensSingleStep` for some reason has been unwrapping `ConstantExpr`s. This results in the const

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: Tyker, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch allows the constant evaluator to use `APValueResult`s from `ConstantExpr`s. There are some outstanding concerns I'll mark with inline comme

[PATCH] D76396: Allow immediate invocation of constructors

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders abandoned this revision. wchilders added a comment. In D76396#1930773 , @Tyker wrote: > I have already a patch aiming to do the same thing. D74007 > Oof, okay, sounds good. I was not aware of this patch, it lo

[PATCH] D76396: Allow immediate invocation of constructors

2020-03-18 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6466 if (Entity.allowsNRVO()) CurInit = S.BuildCXXConstructExpr(Loc, Step.Type, Step.Function.FoundDecl, -

[PATCH] D76396: Allow immediate invocation of constructors

2020-03-18 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6466 if (Entity.allowsNRVO()) CurInit = S.BuildCXXConstructExpr(Loc, Step.Type, Step.Function.FoundDecl, -

[PATCH] D76396: Allow immediate invocation of constructors

2020-03-18 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: rsmith, Tyker. Herald added a project: clang. Herald added a subscriber: cfe-commits. wchilders retitled this revision from "Allow immediate invocations of constructors" to "Allow immediate invocation of constructors". Hi all, This is a