ABataev added a comment. In D66559#1651756 <https://reviews.llvm.org/D66559#1651756>, @cchen wrote:
> "parallel_for_codegen" cannot pass now since it has two test cases for "!=" > and it's hard to just add "fopenmp-version=50" since it will break lots of > other test cases that have different codegen for OpenMP 5.0. > I can remove the "!=" case from "parallel_for_codegen" and add a new file > such as "omp50_parallel_for_codegen" to test it but I doubt it's the right > way to do it. Add a new RUN directive(s) for openmp 5.0 and add a definition specific for OpenMP 5.0 run. In the code use `#ifdef...endif` to check that version is OpenMP 5.0 and the test with!= must be under this guard. ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:5440 BO->getSourceRange(), BO->getOperatorLoc()); - } else if (BO->getOpcode() == BO_NE) - return setUB(getInitLCDecl(BO->getLHS()) == LCDecl ? + } else if (BO->getOpcode() == BO_NE) { + if (SemaRef.getLangOpts().OpenMP >= 50) { ---------------- Just make `if(OpenMP >= 50 && opcode == BO_NE)` and remove `else` branch ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:5478 + CE->getOperatorLoc()); + } else { + SemaRef.Diag(CondLoc, diag::err_omp_loop_not_canonical_cond) ---------------- `else` branch is not required here, the control will go to the default path with diagnostics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66559/new/ https://reviews.llvm.org/D66559 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits