[PATCH] D115573: [Clang][OpenMP] Return error ahead of time if there are multiple mutex clauses in atomic directive
Shilei Tian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 11 14:59:44 PST 2021
tianshilei1992 updated this revision to Diff 393702.
tianshilei1992 added a comment.
add another error return for memory order clauses
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115573/new/
https://reviews.llvm.org/D115573
Files:
clang/lib/Sema/SemaOpenMP.cpp
Index: clang/lib/Sema/SemaOpenMP.cpp
===================================================================
--- clang/lib/Sema/SemaOpenMP.cpp
+++ clang/lib/Sema/SemaOpenMP.cpp
@@ -10942,6 +10942,7 @@
<< SourceRange(C->getBeginLoc(), C->getEndLoc());
Diag(AtomicKindLoc, diag::note_omp_previous_mem_order_clause)
<< getOpenMPClauseName(AtomicKind);
+ return StmtError();
} else {
AtomicKind = C->getClauseKind();
AtomicKindLoc = C->getBeginLoc();
@@ -10958,6 +10959,7 @@
<< SourceRange(C->getBeginLoc(), C->getEndLoc());
Diag(MemOrderLoc, diag::note_omp_previous_mem_order_clause)
<< getOpenMPClauseName(MemOrderKind);
+ return StmtError();
} else {
MemOrderKind = C->getClauseKind();
MemOrderLoc = C->getBeginLoc();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115573.393702.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211211/938af3cb/attachment.bin>
More information about the cfe-commits
mailing list