[clang] [OpenMP][NFC] Fix argument order of SourceLocations for allocate clause (PR #94777)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 10:54:34 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Mike Rice (mikerice1969)

<details>
<summary>Changes</summary>

Static verifier caught passing ColonLoc/LParenLoc in wrong order. Marked as NFC since these don't seem to be used for anything currently that I can think to test for.

---
Full diff: https://github.com/llvm/llvm-project/pull/94777.diff


1 Files Affected:

- (modified) clang/lib/Sema/SemaOpenMP.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 6e6815328e913..f1ebe9d3b9db7 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -24331,7 +24331,7 @@ SemaOpenMP::ActOnOpenMPHasDeviceAddrClause(ArrayRef<Expr *> VarList,
 
 OMPClause *SemaOpenMP::ActOnOpenMPAllocateClause(
     Expr *Allocator, ArrayRef<Expr *> VarList, SourceLocation StartLoc,
-    SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {
+    SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {
   if (Allocator) {
     // OpenMP [2.11.4 allocate Clause, Description]
     // allocator is an expression of omp_allocator_handle_t type.

``````````

</details>


https://github.com/llvm/llvm-project/pull/94777


More information about the cfe-commits mailing list