diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-01-30 20:41:24 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-01-30 20:41:37 +0000 |
commit | fdf27841010464ad65c8791077a07000cdb01013 (patch) | |
tree | d9d9b9d19a4de4c7da4922b83371b9b4c31f8bd6 /contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | |
parent | 33ee87fa0ae80cb48fa5bba2bc2b090fc622e413 (diff) |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp b/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp index c0cd2bf18a77..fc05f040b0d4 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp @@ -7342,7 +7342,7 @@ bool OpenMPIterationSpaceChecker::setLCDeclAndLB(ValueDecl *NewLCDecl, // State consistency checking to ensure correct usage. assert(LCDecl == nullptr && LB == nullptr && LCRef == nullptr && UB == nullptr && Step == nullptr && !TestIsLessOp && !TestIsStrictOp); - if (!NewLCDecl || !NewLB) + if (!NewLCDecl || !NewLB || NewLB->containsErrors()) return true; LCDecl = getCanonicalDecl(NewLCDecl); LCRef = NewLCRefExpr; @@ -7365,7 +7365,7 @@ bool OpenMPIterationSpaceChecker::setUB(Expr *NewUB, // State consistency checking to ensure correct usage. assert(LCDecl != nullptr && LB != nullptr && UB == nullptr && Step == nullptr && !TestIsLessOp && !TestIsStrictOp); - if (!NewUB) + if (!NewUB || NewUB->containsErrors()) return true; UB = NewUB; if (LessOp) @@ -7380,7 +7380,7 @@ bool OpenMPIterationSpaceChecker::setUB(Expr *NewUB, bool OpenMPIterationSpaceChecker::setStep(Expr *NewStep, bool Subtract) { // State consistency checking to ensure correct usage. assert(LCDecl != nullptr && LB != nullptr && Step == nullptr); - if (!NewStep) + if (!NewStep || NewStep->containsErrors()) return true; if (!NewStep->isValueDependent()) { // Check that the step is integer expression. |