[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 11:15:46 PDT 2019
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5784
Expr::EvalResult Result;
- if (CollapseLoopCountExpr->EvaluateAsInt(Result, SemaRef.getASTContext()))
+ if (!CollapseLoopCountExpr->isValueDependent() &&
+ !CollapseLoopCountExpr->isTypeDependent() &&
----------------
I would suggest to modify the code of this function if we cannot get the value of the loops.
```
if (CollapseLoopCountExpr->isValueDependent() || CollapseLoopCountExpr->isTypeDependent() || OrderedLoopCountExpr->isValueDependent() || OrderedLoopCountExpr->isTypeDependent()) {
Built.clear(/* size */0);
return 1;
}
```
at the beginning of the function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61522/new/
https://reviews.llvm.org/D61522
More information about the cfe-commits
mailing list