From 9a4097e9cd891e1445ba07ac6a333321fe117fce Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 27 Jun 2023 04:41:17 +0000 Subject: [PATCH] [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 --- clang/lib/Analysis/FlowSensitive/RecordOps.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/clang/lib/Analysis/FlowSensitive/RecordOps.cpp b/clang/lib/Analysis/FlowSensitive/RecordOps.cpp index d7145b0..eac9e3d 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 -- 2.7.4