[clang] a364e8f - [NFC][Clang] Move function implementation of `OpenMPAtomicUpdateChecker` into anonymous namespace

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 22 08:24:19 PST 2021


Author: Shilei Tian
Date: 2021-12-22T11:24:15-05:00
New Revision: a364e8f6adeb4b42296413b6112a8bdfbd2ea116

URL: https://github.com/llvm/llvm-project/commit/a364e8f6adeb4b42296413b6112a8bdfbd2ea116
DIFF: https://github.com/llvm/llvm-project/commit/a364e8f6adeb4b42296413b6112a8bdfbd2ea116.diff

LOG: [NFC][Clang] Move function implementation of `OpenMPAtomicUpdateChecker` into anonymous namespace

Just to keep code consistent as `OpenMPAtomicUpdateChecker` is defined
in anonymous namespace.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D116068

Added: 
    

Modified: 
    clang/lib/Sema/SemaOpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 5ecfe7fca55cb..a5962ec3b1d95 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -10754,7 +10754,6 @@ class OpenMPAtomicUpdateChecker {
   bool checkBinaryOperation(BinaryOperator *AtomicBinOp, unsigned DiagId = 0,
                             unsigned NoteId = 0);
 };
-} // namespace
 
 bool OpenMPAtomicUpdateChecker::checkBinaryOperation(
     BinaryOperator *AtomicBinOp, unsigned DiagId, unsigned NoteId) {
@@ -10915,6 +10914,7 @@ bool OpenMPAtomicUpdateChecker::checkStatement(Stmt *S, unsigned DiagId,
   }
   return ErrorFound != NoError;
 }
+} // namespace
 
 StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses,
                                             Stmt *AStmt,


        


More information about the cfe-commits mailing list