[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-17 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL361050: Added an assertion to constant evaluation enty points that prohibits dependent… (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/ https://reviews.llvm.org/D61522

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:6369 // very difficult. Ideally, we should handle them more gracefully. -if (!EIA->getCond()->EvaluateWithSubstitution( +if (EIA->getCond()->isValueDependent()

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-17 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. @ABataev @rsmith Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/ https://reviews.llvm.org/D61522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-09 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:6369 // very difficult. Ideally, we should handle them more gracefully. -if (!EIA->getCond()->EvaluateWithSubstitution( +if

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:6369 // very difficult. Ideally, we should handle them more gracefully. -if (!EIA->getCond()->EvaluateWithSubstitution( +if (EIA->getCond()->isValueDependent() || +

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-08 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added a comment. In D61522#1494155 , @rsmith wrote: > The right thing to check in all of these cases should be only > `isValueDependent()`. Every type-dependent expression should generally also > be

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-08 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr updated this revision to Diff 198603. gribozavr added a comment. Addressed review comments: - Simplified error handling in SemaOpenMP, - Only check isValueDependent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. The right thing to check in all of these cases should be only `isValueDependent()`. Every type-dependent expression should generally also be value-dependent (because the type is part of the value), but value-dependent exactly means "dependent in a way that prevents

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if (!CollapseLoopCountExpr->isValueDependent() && +

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. > Can you add tests for the bugs you fixed? thanks The bugs were detected by existing tests (those tests triggered the newly added assertions). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784 Expr::EvalResult Result; -if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext())) +if (!CollapseLoopCountExpr->isValueDependent() && +

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Can you add tests for the bugs you fixed? thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/ https://reviews.llvm.org/D61522 ___ cfe-commits mailing list

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Constant evaluator does not work on value-dependent or type-dependent expressions. Also fixed bugs uncovered by these assertions. Repository: rG LLVM Github Monorepo