[PATCH] D62009: [clang] perform semantic checking in constant context

2019-06-15 Thread Tyker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363488: [clang] perform semantic checking in constant context (authored by Tyker, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-06-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, looks great. Comment at: clang/lib/Sema/SemaChecking.cpp:13941 /// +/// \param isConstantEvaluated wether the evalaution should be permormed in +/// constant

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-06-07 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @rsmith ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62009/new/ https://reviews.llvm.org/D62009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-29 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. @rsmith friendly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62009/new/ https://reviews.llvm.org/D62009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-22 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 200662. Tyker added a comment. most comments were fixed. but there is a few point on which the direction isn't clear. > I think all of the new warnings in the test cases here are undesirable (they > duplicate errors produced by the constant evaluator) in

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Interesting. I think all of the new warnings in the test cases here are undesirable (they duplicate errors produced by the constant evaluator), but the removed warnings all look like improvements. Generally, I think our goals should be: For code patterns that might

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-20 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. I changed the approach in the last revision. the information is now propagated using the expression evaluation context and then via booleans. I should have added a comment to make it clear. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62009/new/

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D62009#1506415 , @Tyker wrote: > there are issues with using ConstantExpr to mark expressions as constant for > semantic checking: > > - #1 multpile Expr::Ignore* operation remove ConstantExpr from the expression. `Ignore*`

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-20 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 200231. Tyker edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62009/new/ https://reviews.llvm.org/D62009 Files: clang/include/clang/AST/Expr.h clang/include/clang/Sema/Sema.h clang/lib/AST/ExprConstant.cpp

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-17 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. I checked how we can propagate the information about constant context through semantic checking. there are issues with using ConstantExpr to mark expressions as constant for semantic checking: - #1 multpile Expr::Ignore* operation remove ConstantExpr from the expression.

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D62009#1505263 , @Tyker wrote: > i added this bit because when we eventually store the result of evaluation in > ConstantExpr we will probably want to trail-allocate the APValue's possible > representations separately to limit

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-16 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. i added this bit because when we eventually store the result of evaluation in ConstantExpr we will probably want to trail-allocate the APValue's possible representations separately to limit memory consumption. but if we do this the ConstantExpr node will need to be

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. The approach we've been taking for this up until now is to use a `ConstantExpr` node to mark the entry point of a constant context; it looks like that would continue to work here, but we're missing those nodes in some cases? (This is preferable to using a flag because

[PATCH] D62009: [clang] perform semantic checking in constant context

2019-05-16 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 199830. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62009/new/ https://reviews.llvm.org/D62009 Files: clang/include/clang/AST/Expr.h clang/include/clang/AST/Stmt.h clang/lib/AST/ExprConstant.cpp clang/lib/Sema/SemaDecl.cpp