[clang] 9a4097e - [clang][dataflow] Use namespace qualifiers when defining functions.

Martin Braenne via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 01:56:30 PDT 2023


Author: Martin Braenne
Date: 2023-06-27T08:56:21Z
New Revision: 9a4097e9cd891e1445ba07ac6a333321fe117fce

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

LOG: [clang][dataflow] Use namespace qualifiers when defining functions.

See

https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions

Thank you to MaskRay for pointing this out on

https://reviews.llvm.org/D153006

Reviewed By: xazax.hun

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

Added: 
    

Modified: 
    clang/lib/Analysis/FlowSensitive/RecordOps.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/RecordOps.cpp b/clang/lib/Analysis/FlowSensitive/RecordOps.cpp
index d7145b0e2b312..eac9e3d4f93f2 100644
--- a/clang/lib/Analysis/FlowSensitive/RecordOps.cpp
+++ b/clang/lib/Analysis/FlowSensitive/RecordOps.cpp
@@ -14,11 +14,9 @@
 
 #define DEBUG_TYPE "dataflow"
 
-namespace clang {
-namespace dataflow {
-
-void copyRecord(AggregateStorageLocation &Src, AggregateStorageLocation &Dst,
-                Environment &Env) {
+void clang::dataflow::copyRecord(AggregateStorageLocation &Src,
+                                 AggregateStorageLocation &Dst,
+                                 Environment &Env) {
   LLVM_DEBUG({
     if (Dst.getType().getCanonicalType().getUnqualifiedType() !=
         Src.getType().getCanonicalType().getUnqualifiedType()) {
@@ -62,9 +60,10 @@ void copyRecord(AggregateStorageLocation &Src, AggregateStorageLocation &Dst,
   }
 }
 
-bool recordsEqual(const AggregateStorageLocation &Loc1, const Environment &Env1,
-                  const AggregateStorageLocation &Loc2,
-                  const Environment &Env2) {
+bool clang::dataflow::recordsEqual(const AggregateStorageLocation &Loc1,
+                                   const Environment &Env1,
+                                   const AggregateStorageLocation &Loc2,
+                                   const Environment &Env2) {
   LLVM_DEBUG({
     if (Loc2.getType().getCanonicalType().getUnqualifiedType() !=
         Loc1.getType().getCanonicalType().getUnqualifiedType()) {
@@ -124,6 +123,3 @@ bool recordsEqual(const AggregateStorageLocation &Loc1, const Environment &Env1,
 
   return true;
 }
-
-} // namespace dataflow
-} // namespace clang


        


More information about the cfe-commits mailing list