[flang-commits] [flang] [Flang][OpenMP] Remove space before :: in member function definition,… (PR #78205)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Mon Jan 15 11:20:50 PST 2024


https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/78205

… NFC

The names were
```
bool DataSharingProcessor ::needBarrier()
void DataSharingProcessor ::insertBarrier()
```

It seems like clang-format treats those as references to the global namespace instead of separators in a qualified name.

>From 820ecbd0e428df7f2928523e01b43b6da8bbfb3a Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Mon, 15 Jan 2024 13:15:09 -0600
Subject: [PATCH] [Flang][OpenMP] Remove space before :: in member function
 definition, NFC

The names were
```
bool DataSharingProcessor ::needBarrier()
void DataSharingProcessor ::insertBarrier()
```

It seems like clang-format treats those as references to the global
namespace instead of separators in a qualified name.
---
 flang/lib/Lower/OpenMP.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index 4f7c99a6d2b840..c770d1c60718c3 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -290,7 +290,7 @@ void DataSharingProcessor::collectSymbolsForPrivatization() {
     TODO(converter.getCurrentLocation(), "Collapse clause with lastprivate");
 }
 
-bool DataSharingProcessor ::needBarrier() {
+bool DataSharingProcessor::needBarrier() {
   for (const Fortran::semantics::Symbol *sym : privatizedSymbols) {
     if (sym->test(Fortran::semantics::Symbol::Flag::OmpFirstPrivate) &&
         sym->test(Fortran::semantics::Symbol::Flag::OmpLastPrivate))
@@ -299,7 +299,7 @@ bool DataSharingProcessor ::needBarrier() {
   return false;
 }
 
-void DataSharingProcessor ::insertBarrier() {
+void DataSharingProcessor::insertBarrier() {
   // Emit implicit barrier to synchronize threads and avoid data races on
   // initialization of firstprivate variables and post-update of lastprivate
   // variables.



More information about the flang-commits mailing list