From d4aacd244f21e76dce685365acc281a9015897c1 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Sun, 30 Jul 2017 23:14:36 -0700 Subject: [PATCH] Consistency in namespace-closing comments Summary: [Folly] Consistency in namespace-closing comments. Reviewed By: Orvid Differential Revision: D5524744 fbshipit-source-id: ced4dd2398ed6baa3ad5b68b74eee6a5d6b2b103 --- folly/Arena-inl.h | 2 +- folly/Arena.h | 2 +- folly/Assume.h | 2 +- folly/AtomicBitSet.h | 2 +- folly/AtomicHashArray.h | 2 +- folly/Benchmark.h | 2 +- folly/Bits.h | 4 ++-- folly/Checksum.cpp | 4 ++-- folly/Checksum.h | 2 +- folly/Conv.cpp | 2 +- folly/Conv.h | 5 ++--- folly/CpuId.h | 2 +- folly/Demangle.cpp | 4 ++-- folly/DiscriminatedPtr.h | 2 +- folly/EvictingCacheMap.h | 2 +- folly/Exception.h | 2 +- folly/ExceptionWrapper.cpp | 2 +- folly/ExceptionWrapper.h | 4 ++-- folly/Executor.h | 2 +- folly/FBString.h | 2 +- folly/FBVector.h | 2 +- folly/File.cpp | 2 +- folly/File.h | 3 +-- folly/FileUtil.cpp | 2 +- folly/FileUtil.h | 2 +- folly/Fingerprint.h | 2 +- folly/Format.cpp | 6 +++--- folly/Format.h | 2 +- folly/FormatArg.h | 2 +- folly/GroupVarint.cpp | 2 +- folly/GroupVarint.h | 10 +++++----- folly/IPAddress.cpp | 3 +-- folly/IPAddress.h | 4 ++-- folly/IPAddressException.h | 2 +- folly/IPAddressV4.cpp | 2 +- folly/IPAddressV4.h | 4 ++-- folly/IPAddressV6.cpp | 2 +- folly/IPAddressV6.h | 4 ++-- folly/IntrusiveList.h | 2 +- folly/Iterator.h | 2 +- folly/LockTraits.h | 4 ++-- folly/LockTraitsBoost.h | 2 +- folly/MPMCPipeline.h | 3 +-- folly/MacAddress.cpp | 2 +- folly/MacAddress.h | 2 +- folly/MallctlHelper.cpp | 4 ++-- folly/MallctlHelper.h | 4 ++-- folly/Malloc.h | 2 +- folly/MapUtil.h | 2 +- folly/Memory.h | 2 +- folly/MemoryMapping.cpp | 6 +++--- folly/MemoryMapping.h | 2 +- folly/Overload.h | 8 ++++---- folly/Padded.h | 8 ++++---- folly/Portability.h | 2 +- folly/RWSpinLock.h | 4 ++-- folly/Random-inl.h | 4 ++-- folly/SafeAssert.cpp | 2 +- folly/ScopeGuard.h | 2 +- folly/Shell.cpp | 2 +- folly/Shell.h | 2 +- folly/SocketAddress.cpp | 4 ++-- folly/String-inl.h | 12 ++++++------ folly/String.cpp | 8 ++++---- folly/Subprocess.cpp | 10 +++++----- folly/Subprocess.h | 2 +- folly/Synchronized.h | 2 +- folly/ThreadCachedArena.cpp | 2 +- folly/ThreadCachedArena.h | 2 +- folly/ThreadLocal.h | 2 +- folly/TimeoutQueue.cpp | 2 +- folly/TimeoutQueue.h | 2 +- folly/Traits.h | 2 +- folly/Try-inl.h | 2 +- folly/Try.h | 2 +- folly/UncaughtExceptions.h | 2 +- folly/Uri.cpp | 4 ++-- folly/Uri.h | 2 +- folly/Varint.h | 2 +- folly/build/GenerateFingerprintTables.cpp | 2 +- folly/build/generate_varint_tables.py | 4 ++-- folly/concurrency/detail/ConcurrentHashMap-detail.h | 4 ++-- folly/detail/BitIteratorDetail.h | 5 ++--- folly/detail/DiscriminatedPtrDetail.h | 4 ++-- folly/detail/FingerprintPolynomial.h | 4 ++-- folly/detail/Futex.cpp | 9 +++++---- folly/detail/GroupVarintDetail.h | 4 ++-- folly/detail/SlowFingerprint.h | 4 ++-- folly/detail/ThreadLocalDetail.h | 4 ++-- folly/dynamic-inl.h | 2 +- folly/experimental/Bits.h | 4 ++-- folly/experimental/DynamicParser-inl.h | 4 ++-- folly/experimental/DynamicParser.cpp | 6 +++--- folly/experimental/DynamicParser.h | 4 ++-- folly/experimental/EliasFanoCoding.h | 2 +- folly/experimental/EventCount.h | 2 +- folly/experimental/FlatCombiningPriorityQueue.h | 2 +- folly/experimental/FunctionScheduler.cpp | 2 +- folly/experimental/FutureDAG.h | 2 +- folly/experimental/Instructions.h | 6 +++--- folly/experimental/JemallocNodumpAllocator.cpp | 2 +- folly/experimental/JemallocNodumpAllocator.h | 2 +- folly/experimental/NestedCommandLineApp.cpp | 4 ++-- folly/experimental/NestedCommandLineApp.h | 2 +- folly/experimental/ProgramOptions.cpp | 6 +++--- folly/experimental/ProgramOptions.h | 2 +- folly/experimental/StringKeyedCommon.h | 2 +- folly/experimental/StringKeyedMap.h | 2 +- folly/experimental/StringKeyedSet.h | 2 +- folly/experimental/StringKeyedUnorderedMap.h | 2 +- folly/experimental/StringKeyedUnorderedSet.h | 2 +- folly/experimental/TestUtil.cpp | 8 ++++---- folly/experimental/TestUtil.h | 10 +++++----- folly/experimental/TupleOps.h | 4 ++-- folly/experimental/exception_tracer/ExceptionAbi.h | 2 +- .../exception_tracer/ExceptionTracer.cpp | 10 +++++----- .../experimental/exception_tracer/ExceptionTracer.h | 4 ++-- .../exception_tracer/ExceptionTracerLib.cpp | 4 ++-- folly/experimental/flat_combining/FlatCombining.h | 2 +- .../flat_combining/test/FlatCombiningExamples.h | 2 +- .../flat_combining/test/FlatCombiningTestHelpers.h | 4 ++-- folly/experimental/hazptr/bench/HazptrBench.h | 4 ++-- folly/experimental/hazptr/example/LockFreeLIFO.h | 4 ++-- folly/experimental/hazptr/example/MWMRSet.h | 4 ++-- folly/experimental/hazptr/example/SWMRList.h | 4 ++-- folly/experimental/hazptr/example/WideCAS.h | 4 ++-- folly/experimental/hazptr/memory_resource.h | 4 ++-- folly/experimental/hazptr/test/HazptrUse1.h | 4 ++-- folly/experimental/hazptr/test/HazptrUse2.h | 4 ++-- folly/experimental/io/AsyncIO.cpp | 2 +- folly/experimental/io/test/AsyncIOTest.cpp | 2 +- .../experimental/logging/test/GlogFormatterTest.cpp | 2 +- folly/experimental/logging/xlog.cpp | 2 +- folly/experimental/symbolizer/Symbolizer.cpp | 2 +- folly/experimental/test/BitsTest.cpp | 2 +- folly/experimental/test/EliasFanoCodingTest.cpp | 4 ++-- folly/experimental/test/EventCountTest.cpp | 2 +- folly/experimental/test/FunctionSchedulerTest.cpp | 4 ++-- .../test/NestedCommandLineAppExample.cpp | 2 +- folly/experimental/test/NestedCommandLineAppTest.cpp | 2 +- .../test/NestedCommandLineAppTestHelper.cpp | 2 +- folly/experimental/test/ProgramOptionsTest.cpp | 2 +- folly/experimental/test/ProgramOptionsTestHelper.cpp | 2 +- folly/fibers/AtomicBatchDispatcher-inl.h | 2 +- folly/fibers/BoostContextCompatibility.h | 4 ++-- folly/fibers/EventBaseLoopController-inl.h | 4 ++-- folly/fibers/EventBaseLoopController.h | 4 ++-- folly/fibers/Fiber-inl.h | 4 ++-- folly/fibers/Fiber.cpp | 2 +- folly/fibers/FiberManagerInternal-inl.h | 2 +- folly/fibers/ForEach-inl.h | 6 +++--- folly/fibers/ForEach.h | 4 ++-- folly/fibers/GuardPageAllocator.cpp | 4 ++-- folly/fibers/GuardPageAllocator.h | 4 ++-- folly/fibers/LoopController.h | 4 ++-- folly/fibers/SimpleLoopController.h | 4 ++-- folly/fibers/test/FibersTest.cpp | 2 +- folly/fibers/traits.h | 6 +++--- folly/futures/DrivableExecutor.h | 2 +- folly/futures/Future.h | 2 +- folly/futures/ManualExecutor.cpp | 2 +- folly/futures/QueuedImmediateExecutor.h | 2 +- folly/futures/ThreadWheelTimekeeper.cpp | 4 ++-- folly/futures/ThreadWheelTimekeeper.h | 2 +- folly/futures/test/Benchmark.cpp | 2 +- folly/futures/test/TestExecutor.cpp | 2 +- folly/futures/test/TestExecutor.h | 2 +- folly/gen/Base-inl.h | 4 ++-- folly/gen/Base.h | 4 ++-- folly/gen/Core-inl.h | 6 +++--- folly/gen/Core.h | 6 +++--- folly/hash/SpookyHashV1.cpp | 4 ++-- folly/hash/SpookyHashV1.h | 4 ++-- folly/hash/SpookyHashV2.cpp | 4 ++-- folly/hash/SpookyHashV2.h | 4 ++-- folly/init/Init.h | 2 +- folly/io/IOBuf.cpp | 4 ++-- folly/io/IOBuf.h | 4 ++-- folly/io/IOBufQueue.cpp | 4 ++-- folly/io/IOBufQueue.h | 2 +- folly/io/async/AsyncPipe.cpp | 2 +- folly/io/async/AsyncPipe.h | 2 +- folly/io/async/AsyncSSLSocket.cpp | 2 +- folly/io/async/AsyncServerSocket.cpp | 4 +--- folly/io/async/AsyncServerSocket.h | 2 +- folly/io/async/AsyncSignalHandler.cpp | 2 +- folly/io/async/AsyncSignalHandler.h | 2 +- folly/io/async/AsyncSocket.cpp | 2 +- folly/io/async/AsyncSocket.h | 2 +- folly/io/async/AsyncSocketException.h | 2 +- folly/io/async/AsyncTimeout.cpp | 2 +- folly/io/async/AsyncTimeout.h | 4 ++-- folly/io/async/AsyncTransport.h | 2 +- folly/io/async/AsyncUDPServerSocket.h | 2 +- folly/io/async/AsyncUDPSocket.cpp | 2 +- folly/io/async/AsyncUDPSocket.h | 2 +- folly/io/async/DelayedDestruction.h | 2 +- folly/io/async/DelayedDestructionBase.h | 2 +- folly/io/async/EventBase.cpp | 2 +- folly/io/async/EventBase.h | 2 +- folly/io/async/EventBaseManager.cpp | 2 +- folly/io/async/EventBaseManager.h | 2 +- folly/io/async/EventHandler.cpp | 2 +- folly/io/async/EventHandler.h | 2 +- folly/io/async/EventUtil.h | 2 +- folly/io/async/HHWheelTimer.cpp | 2 +- folly/io/async/HHWheelTimer.h | 2 +- folly/io/async/NotificationQueue.h | 2 +- folly/io/async/SSLContext.cpp | 2 +- folly/io/async/SSLContext.h | 2 +- folly/io/async/SSLOptions.cpp | 4 ++-- folly/io/async/SSLOptions.h | 4 ++-- folly/io/async/TimeoutManager.h | 2 +- folly/io/async/ssl/OpenSSLUtils.cpp | 4 ++-- folly/io/async/ssl/OpenSSLUtils.h | 4 ++-- folly/io/async/ssl/TLSDefinitions.h | 4 ++-- folly/io/async/test/AsyncPipeTest.cpp | 3 +-- folly/io/async/test/AsyncSSLSocketTest.cpp | 2 +- folly/io/async/test/AsyncSSLSocketTest2.cpp | 3 +-- folly/io/async/test/AsyncTimeoutTest.cpp | 2 +- folly/io/async/test/SSLContextInitializationTest.cpp | 2 +- folly/memory/UninitializedMemoryHacks.h | 2 +- folly/python/NotificationQueueExecutor.h | 4 ++-- folly/python/futures.h | 4 ++-- folly/small_vector.h | 6 +++--- folly/ssl/Init.cpp | 4 ++-- folly/ssl/Init.h | 4 ++-- folly/ssl/OpenSSLCertUtils.cpp | 4 ++-- folly/ssl/OpenSSLLockTypes.h | 4 ++-- folly/ssl/detail/OpenSSLThreading.cpp | 8 ++++---- folly/stats/BucketedTimeSeries-defs.h | 2 +- folly/stats/BucketedTimeSeries.h | 2 +- folly/stats/Histogram-defs.h | 4 ++-- folly/stats/Histogram.cpp | 2 +- folly/stats/Histogram.h | 4 ++-- folly/stats/MultiLevelTimeSeries.h | 2 +- folly/test/BatonTestHelpers.h | 4 ++-- folly/test/BitIteratorTest.cpp | 2 +- folly/test/BitsTest.cpp | 2 +- folly/test/ConcurrentSkipListTest.cpp | 2 +- folly/test/DemangleTest.cpp | 2 +- folly/test/DeterministicSchedule.h | 8 ++++---- folly/test/DeterministicScheduleTest.cpp | 2 +- folly/test/ExceptionWrapperTest.cpp | 2 +- folly/test/FBStringTest.cpp | 2 +- folly/test/FileTest.cpp | 2 +- folly/test/FileUtilTest.cpp | 2 +- folly/test/FingerprintBenchmark.cpp | 3 +-- folly/test/FormatOtherTest.cpp | 2 +- folly/test/FormatTest.cpp | 2 +- folly/test/GroupVarintTest.cpp | 2 +- folly/test/HashTest.cpp | 4 ++-- folly/test/MemoryMappingTest.cpp | 2 +- folly/test/OverloadTest.cpp | 4 ++-- folly/test/RangeFindBenchmark.cpp | 2 +- folly/test/ReplaceableTest.cpp | 2 +- folly/test/SingletonTest.cpp | 2 +- folly/test/SpinLockTest.cpp | 2 +- folly/test/StringTest.cpp | 8 ++++---- folly/test/SubprocessTest.cpp | 2 +- folly/test/SubprocessTestParentDeathHelper.cpp | 2 +- folly/test/ThreadCachedArenaTest.cpp | 5 ++--- folly/test/ThreadLocalTest.cpp | 6 +++--- folly/test/TokenBucketTest.h | 2 +- folly/test/VarintTest.cpp | 3 +-- 265 files changed, 411 insertions(+), 422 deletions(-) diff --git a/folly/Arena-inl.h b/folly/Arena-inl.h index 805e8616..58059c9f 100644 --- a/folly/Arena-inl.h +++ b/folly/Arena-inl.h @@ -90,4 +90,4 @@ Arena::~Arena() { } } -} // namespace folly +} // namespace folly diff --git a/folly/Arena.h b/folly/Arena.h index cf010f3d..25279a7b 100644 --- a/folly/Arena.h +++ b/folly/Arena.h @@ -241,6 +241,6 @@ class SysArena : public Arena { template <> struct IsArenaAllocator : std::true_type { }; -} // namespace folly +} // namespace folly #include diff --git a/folly/Assume.h b/folly/Assume.h index f905dce7..47f4e9ab 100644 --- a/folly/Assume.h +++ b/folly/Assume.h @@ -68,4 +68,4 @@ FOLLY_ALWAYS_INLINE void assume(bool cond) { #endif } -} // namespace folly +} // namespace folly diff --git a/folly/AtomicBitSet.h b/folly/AtomicBitSet.h index c0320527..00af8998 100644 --- a/folly/AtomicBitSet.h +++ b/folly/AtomicBitSet.h @@ -156,4 +156,4 @@ inline bool AtomicBitSet::operator[](size_t idx) const { return test(idx); } -} // namespaces +} // namespace folly diff --git a/folly/AtomicHashArray.h b/folly/AtomicHashArray.h index 897bf8a8..16b8dad0 100644 --- a/folly/AtomicHashArray.h +++ b/folly/AtomicHashArray.h @@ -80,7 +80,7 @@ inline void checkLegalKeyIfKeyTImpl(KeyT key_in, KeyT emptyKey, DCHECK_NE(key_in, lockedKey); DCHECK_NE(key_in, erasedKey); } -} // namespace detail +} // namespace detail template < class KeyT, diff --git a/folly/Benchmark.h b/folly/Benchmark.h index cf11ca75..01e8ffee 100644 --- a/folly/Benchmark.h +++ b/folly/Benchmark.h @@ -237,7 +237,7 @@ struct DoNotOptimizeAwayNeedsIndirect { constexpr static bool value = !folly::IsTriviallyCopyable::value || sizeof(Decayed) > sizeof(long) || std::is_pointer::value; }; -} // detail namespace +} // namespace detail template auto doNotOptimizeAway(const T& datum) -> typename std::enable_if< diff --git a/folly/Bits.h b/folly/Bits.h index 940b7bf0..63eaa4a1 100644 --- a/folly/Bits.h +++ b/folly/Bits.h @@ -282,7 +282,7 @@ struct EndianInt { } }; -} // namespace detail +} // namespace detail // big* convert between native and big-endian representations // little* convert between native and little-endian representations @@ -550,4 +550,4 @@ inline void storeUnaligned(void* p, T value) { } } -} // namespace folly +} // namespace folly diff --git a/folly/Checksum.cpp b/folly/Checksum.cpp index 1b784f3f..5fc17c08 100644 --- a/folly/Checksum.cpp +++ b/folly/Checksum.cpp @@ -121,7 +121,7 @@ crc32_sw(const uint8_t* data, size_t nbytes, uint32_t startingChecksum) { return crc_sw(data, nbytes, startingChecksum); } -} // folly::detail +} // namespace detail uint32_t crc32c(const uint8_t *data, size_t nbytes, uint32_t startingChecksum) { @@ -145,4 +145,4 @@ crc32_type(const uint8_t* data, size_t nbytes, uint32_t startingChecksum) { return ~crc32(data, nbytes, startingChecksum); } -} // folly +} // namespace folly diff --git a/folly/Checksum.h b/folly/Checksum.h index 756d3730..a47a6804 100644 --- a/folly/Checksum.h +++ b/folly/Checksum.h @@ -57,4 +57,4 @@ crc32(const uint8_t* data, size_t nbytes, uint32_t startingChecksum = ~0U); uint32_t crc32_type(const uint8_t* data, size_t nbytes, uint32_t startingChecksum = ~0U); -} // folly +} // namespace folly diff --git a/folly/Conv.cpp b/folly/Conv.cpp index 6af0f90f..8e2f5752 100644 --- a/folly/Conv.cpp +++ b/folly/Conv.cpp @@ -255,7 +255,7 @@ inline bool bool_str_cmp(const char** b, size_t len, const char* value) { return true; } -} // anonymous namespace +} // namespace Expected str_to_bool(StringPiece* src) noexcept { auto b = src->begin(), e = src->end(); diff --git a/folly/Conv.h b/folly/Conv.h index d70b1d5b..be0d3d0d 100644 --- a/folly/Conv.h +++ b/folly/Conv.h @@ -656,7 +656,7 @@ estimateSpaceNeeded(Src value) { namespace detail { constexpr int kConvMaxDecimalInShortestLow = -6; constexpr int kConvMaxDecimalInShortestHigh = 21; -} // folly::detail +} // namespace detail /** Wrapper around DoubleToStringConverter **/ template @@ -830,8 +830,7 @@ toAppendDelimStrImpl(const Delimiter& delim, const T& v, const Ts&... vs) { toAppend(delim, detail::getLastElement(vs...)); toAppendDelimStrImpl(delim, vs...); } -} // folly::detail - +} // namespace detail /** * Variadic conversion to string. Appends each element in turn. diff --git a/folly/CpuId.h b/folly/CpuId.h index bcbea197..015e56a7 100644 --- a/folly/CpuId.h +++ b/folly/CpuId.h @@ -214,4 +214,4 @@ class CpuId { uint32_t f7c_ = 0; }; -} // namespace folly +} // namespace folly diff --git a/folly/Demangle.cpp b/folly/Demangle.cpp index 14eb1ad7..12564693 100644 --- a/folly/Demangle.cpp +++ b/folly/Demangle.cpp @@ -102,7 +102,7 @@ void demangleCallback(const char* str, size_t size, void* p) { buf->total += size; } -} // namespace +} // namespace size_t demangle(const char* name, char* out, size_t outSize) { #ifdef FOLLY_DEMANGLE_MAX_SYMBOL_SIZE @@ -159,4 +159,4 @@ size_t strlcpy(char* dest, const char* const src, size_t size) { return len; } -} // folly +} // namespace folly diff --git a/folly/DiscriminatedPtr.h b/folly/DiscriminatedPtr.h index 0195beac..b773bec8 100644 --- a/folly/DiscriminatedPtr.h +++ b/folly/DiscriminatedPtr.h @@ -238,4 +238,4 @@ decltype(auto) apply_visitor( return variant.apply(std::forward(visitor)); } -} // namespace folly +} // namespace folly diff --git a/folly/EvictingCacheMap.h b/folly/EvictingCacheMap.h index d94fac02..e7e8149d 100644 --- a/folly/EvictingCacheMap.h +++ b/folly/EvictingCacheMap.h @@ -495,4 +495,4 @@ class EvictingCacheMap { std::size_t clearSize_; }; -} // folly +} // namespace folly diff --git a/folly/Exception.h b/folly/Exception.h index 4a05535b..379f269b 100644 --- a/folly/Exception.h +++ b/folly/Exception.h @@ -114,4 +114,4 @@ void checkFopenErrorExplicit(FILE* fp, int savedErrno, Args&&... args) { } \ } while (0) -} // namespace folly +} // namespace folly diff --git a/folly/ExceptionWrapper.cpp b/folly/ExceptionWrapper.cpp index 205b0d78..6d14f0ad 100644 --- a/folly/ExceptionWrapper.cpp +++ b/folly/ExceptionWrapper.cpp @@ -88,4 +88,4 @@ fbstring exceptionStr(exception_wrapper const& ew) { return ew.what(); } -} // folly +} // namespace folly diff --git a/folly/ExceptionWrapper.h b/folly/ExceptionWrapper.h index 5f1d65a2..489d158a 100644 --- a/folly/ExceptionWrapper.h +++ b/folly/ExceptionWrapper.h @@ -643,7 +643,7 @@ inline exception_wrapper try_and_catch_(F&& f) { return exception_wrapper(std::current_exception(), ex); } } -} // detail +} // namespace detail //! `try_and_catch` is a simple replacement for `try {} catch(){}`` that allows //! you to specify which derived exceptions you would like to catch and store in @@ -684,7 +684,7 @@ template exception_wrapper try_and_catch(F&& fn) { return detail::try_and_catch_(std::forward(fn)); } -} // folly +} // namespace folly #include diff --git a/folly/Executor.h b/folly/Executor.h index b4f10779..24ca6c2b 100644 --- a/folly/Executor.h +++ b/folly/Executor.h @@ -98,4 +98,4 @@ class Executor { } }; -} // folly +} // namespace folly diff --git a/folly/FBString.h b/folly/FBString.h index e2579b72..90728601 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -2879,7 +2879,7 @@ namespace std { FOLLY_FBSTRING_HASH -} // namespace std +} // namespace std #undef FOLLY_FBSTRING_HASH #undef FOLLY_FBSTRING_HASH1 diff --git a/folly/FBVector.h b/folly/FBVector.h index 0acac234..21253afe 100644 --- a/folly/FBVector.h +++ b/folly/FBVector.h @@ -1624,7 +1624,7 @@ struct IndexableTraits> : public IndexableTraitsSeq> { }; -} // namespace detail +} // namespace detail template void compactResize(fbvector* v, size_t sz) { diff --git a/folly/File.cpp b/folly/File.cpp index be44ce57..74d8669e 100644 --- a/folly/File.cpp +++ b/folly/File.cpp @@ -148,4 +148,4 @@ void File::unlock() { } void File::unlock_shared() { unlock(); } -} // namespace folly +} // namespace folly diff --git a/folly/File.h b/folly/File.h index af662096..8d668d8b 100644 --- a/folly/File.h +++ b/folly/File.h @@ -150,5 +150,4 @@ class File { void swap(File& a, File& b); - -} // namespace folly +} // namespace folly diff --git a/folly/FileUtil.cpp b/folly/FileUtil.cpp index 0499d34d..ce61ad96 100644 --- a/folly/FileUtil.cpp +++ b/folly/FileUtil.cpp @@ -235,4 +235,4 @@ void writeFileAtomic( writeFileAtomic(filename, ByteRange(data), permissions); } -} // namespaces +} // namespace folly diff --git a/folly/FileUtil.h b/folly/FileUtil.h index c27e249a..92598093 100644 --- a/folly/FileUtil.h +++ b/folly/FileUtil.h @@ -252,4 +252,4 @@ int writeFileAtomicNoThrow( int count, mode_t permissions = 0644); -} // namespaces +} // namespace folly diff --git a/folly/Fingerprint.h b/folly/Fingerprint.h index 74302093..558cfd59 100644 --- a/folly/Fingerprint.h +++ b/folly/Fingerprint.h @@ -284,4 +284,4 @@ inline uint64_t Fingerprint<128>::shlor64(uint64_t v) { return out; } -} // namespace folly +} // namespace folly diff --git a/folly/Format.cpp b/folly/Format.cpp index 25ddf631..9a711e46 100644 --- a/folly/Format.cpp +++ b/folly/Format.cpp @@ -27,7 +27,7 @@ namespace detail { extern const FormatArg::Align formatAlignTable[]; extern const FormatArg::Sign formatSignTable[]; -} // namespace detail +} // namespace detail using namespace folly::detail; @@ -328,6 +328,6 @@ void insertThousandsGroupingUnsafe(char* start_buffer, char** end_buffer) { remaining_digits -= current_group_size; } } -} // detail +} // namespace detail -} // namespace folly +} // namespace folly diff --git a/folly/Format.h b/folly/Format.h index d6fd2ff0..6ed3c6f1 100644 --- a/folly/Format.h +++ b/folly/Format.h @@ -432,7 +432,7 @@ struct IsFormatter< typename std::enable_if< std::is_same::value>:: type> : public std::true_type {}; -} // folly::detail +} // namespace detail // Deprecated API. formatChecked() et. al. now behave identically to their // non-Checked counterparts. diff --git a/folly/FormatArg.h b/folly/FormatArg.h index d3ee03aa..a6d4fb63 100644 --- a/folly/FormatArg.h +++ b/folly/FormatArg.h @@ -275,4 +275,4 @@ inline int FormatArg::splitIntKey() { } } -} // namespace folly +} // namespace folly diff --git a/folly/GroupVarint.cpp b/folly/GroupVarint.cpp index cc5740ff..63648e85 100644 --- a/folly/GroupVarint.cpp +++ b/folly/GroupVarint.cpp @@ -29,5 +29,5 @@ const uint64_t GroupVarint64::kMask[] = { 0xffffffffffffffffULL }; -} // namespace folly +} // namespace folly #endif diff --git a/folly/GroupVarint.h b/folly/GroupVarint.h index 8a101d51..8780f04e 100644 --- a/folly/GroupVarint.h +++ b/folly/GroupVarint.h @@ -40,15 +40,15 @@ namespace folly { namespace detail { alignas(16) extern const uint64_t groupVarintSSEMasks[]; -} // namespace detail -} // namespace folly +} // namespace detail +} // namespace folly #endif namespace folly { namespace detail { extern const uint8_t groupVarintLengths[]; -} // namespace detail -} // namespace folly +} // namespace detail +} // namespace folly namespace folly { @@ -625,6 +625,6 @@ class GroupVarintDecoder { typedef GroupVarintDecoder GroupVarint32Decoder; typedef GroupVarintDecoder GroupVarint64Decoder; -} // namespace folly +} // namespace folly #endif /* FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 */ diff --git a/folly/IPAddress.cpp b/folly/IPAddress.cpp index 792b75a4..75c2ff3d 100644 --- a/folly/IPAddress.cpp +++ b/folly/IPAddress.cpp @@ -434,5 +434,4 @@ IPAddress::longestCommonPrefix(const CIDRNetwork& one, const CIDRNetwork& two) { "Can't convert address with family ", fam, " to AF_INET6 address")); } - -} // folly +} // namespace folly diff --git a/folly/IPAddress.h b/folly/IPAddress.h index 372d9cbc..4ce7d388 100644 --- a/folly/IPAddress.h +++ b/folly/IPAddress.h @@ -457,7 +457,7 @@ inline bool operator>=(const IPAddress& a, const IPAddress& b) { return !(a < b); } -} // folly +} // namespace folly namespace std { template <> @@ -466,4 +466,4 @@ struct hash { return addr.hash(); } }; -} // std +} // namespace std diff --git a/folly/IPAddressException.h b/folly/IPAddressException.h index 86f8a5ac..82d5d044 100644 --- a/folly/IPAddressException.h +++ b/folly/IPAddressException.h @@ -62,4 +62,4 @@ class InvalidAddressFamilyException : public IPAddressFormatException { default; }; -} // folly +} // namespace folly diff --git a/folly/IPAddressV4.cpp b/folly/IPAddressV4.cpp index bcd582df..645d5d29 100644 --- a/folly/IPAddressV4.cpp +++ b/folly/IPAddressV4.cpp @@ -287,4 +287,4 @@ CIDRNetworkV4 IPAddressV4::longestCommonPrefix( return {IPAddressV4(prefix.first), prefix.second}; } -} // folly +} // namespace folly diff --git a/folly/IPAddressV4.h b/folly/IPAddressV4.h index b6390f8c..626c974f 100644 --- a/folly/IPAddressV4.h +++ b/folly/IPAddressV4.h @@ -308,7 +308,7 @@ inline bool operator>=(const IPAddressV4& a, const IPAddressV4& b) { return !(a < b); } -} // folly +} // namespace folly namespace std { template <> @@ -317,4 +317,4 @@ struct hash { return addr.hash(); } }; -} // std +} // namespace std diff --git a/folly/IPAddressV6.cpp b/folly/IPAddressV6.cpp index cff206f3..e40a08e5 100644 --- a/folly/IPAddressV6.cpp +++ b/folly/IPAddressV6.cpp @@ -514,4 +514,4 @@ bool IPAddressV6::inBinarySubnet(const std::array addr, auto masked = mask(numBits); return (std::memcmp(addr.data(), masked.bytes(), 2) == 0); } -} // folly +} // namespace folly diff --git a/folly/IPAddressV6.h b/folly/IPAddressV6.h index d2fd02a9..c4003202 100644 --- a/folly/IPAddressV6.h +++ b/folly/IPAddressV6.h @@ -395,7 +395,7 @@ std::ostream& operator<<(std::ostream& os, const IPAddressV6& addr); void toAppend(IPAddressV6 addr, std::string* result); void toAppend(IPAddressV6 addr, fbstring* result); -} // folly +} // namespace folly namespace std { template <> @@ -404,4 +404,4 @@ struct hash { return addr.hash(); } }; -} // std +} // namespace std diff --git a/folly/IntrusiveList.h b/folly/IntrusiveList.h index ffd5c9b7..b9a9a592 100644 --- a/folly/IntrusiveList.h +++ b/folly/IntrusiveList.h @@ -115,4 +115,4 @@ using CountedIntrusiveList = boost::intrusive::list< boost::intrusive::member_hook, boost::intrusive::constant_time_size>; -} // folly +} // namespace folly diff --git a/folly/Iterator.h b/folly/Iterator.h index c4fe9c1c..c0b7b12e 100644 --- a/folly/Iterator.h +++ b/folly/Iterator.h @@ -398,7 +398,7 @@ class emplace_iterator_impl emplace_iterator_impl& operator=(const emplace_iterator_impl&) = default; emplace_iterator_impl& operator=(emplace_iterator_impl&&) noexcept = default; }; -} // folly::detail +} // namespace detail /** * Behaves just like std::insert_iterator except that it calls emplace() diff --git a/folly/LockTraits.h b/folly/LockTraits.h index b8fc5539..983831e0 100644 --- a/folly/LockTraits.h +++ b/folly/LockTraits.h @@ -338,7 +338,7 @@ struct LockTraitsImpl } }; -} // detail +} // namespace detail /** * LockTraits describes details about a particular mutex type. @@ -637,4 +637,4 @@ struct LockPolicyFromExclusiveToShared : public LockPolicyShared { } }; -} // folly +} // namespace folly diff --git a/folly/LockTraitsBoost.h b/folly/LockTraitsBoost.h index 081d3f8f..a4888155 100644 --- a/folly/LockTraitsBoost.h +++ b/folly/LockTraitsBoost.h @@ -96,6 +96,6 @@ struct LockTraits return mutex.try_lock_for(detail::toBoostDuration(timeout)); } }; -} // folly +} // namespace folly #endif // FOLLY_LOCK_TRAITS_HAVE_TIMED_MUTEXES diff --git a/folly/MPMCPipeline.h b/folly/MPMCPipeline.h index eca0b29b..90a4c85a 100644 --- a/folly/MPMCPipeline.h +++ b/folly/MPMCPipeline.h @@ -284,5 +284,4 @@ template class MPMCPipeline { StageTuple stages_; }; - -} // namespaces +} // namespace folly diff --git a/folly/MacAddress.cpp b/folly/MacAddress.cpp index 45892826..8db2e6d3 100644 --- a/folly/MacAddress.cpp +++ b/folly/MacAddress.cpp @@ -150,4 +150,4 @@ std::ostream& operator<<(std::ostream& os, MacAddress address) { return os; } -} // folly +} // namespace folly diff --git a/folly/MacAddress.h b/folly/MacAddress.h index 739bb226..27450751 100644 --- a/folly/MacAddress.h +++ b/folly/MacAddress.h @@ -229,4 +229,4 @@ toAppend(MacAddress address, Tgt* result) { std::ostream& operator<<(std::ostream& os, MacAddress address); -} // folly +} // namespace folly diff --git a/folly/MallctlHelper.cpp b/folly/MallctlHelper.cpp index a130c46c..32b7277d 100644 --- a/folly/MallctlHelper.cpp +++ b/folly/MallctlHelper.cpp @@ -30,6 +30,6 @@ namespace detail { sformat("mallctl {}: {} ({})", cmd, errnoStr(err), err)); } -} // detail +} // namespace detail -} // folly +} // namespace folly diff --git a/folly/MallctlHelper.h b/folly/MallctlHelper.h index 32895964..f883a5f6 100644 --- a/folly/MallctlHelper.h +++ b/folly/MallctlHelper.h @@ -42,7 +42,7 @@ void mallctlHelper(const char* cmd, T* out, T* in) { } } -} // detail +} // namespace detail template void mallctlRead(const char* cmd, T* out) { @@ -64,4 +64,4 @@ inline void mallctlCall(const char* cmd) { mallctlRead(cmd, nullptr); } -} // folly +} // namespace folly diff --git a/folly/Malloc.h b/folly/Malloc.h index cb7bfe37..77d6a5be 100644 --- a/folly/Malloc.h +++ b/folly/Malloc.h @@ -298,6 +298,6 @@ FOLLY_MALLOC_CHECKED_MALLOC FOLLY_MALLOC_NOINLINE inline void* smartRealloc( _GLIBCXX_END_NAMESPACE_VERSION #endif -} // folly +} // namespace folly #endif // !defined(_GLIBCXX_USE_FB) || defined(_LIBSTDCXX_FBSTRING) diff --git a/folly/MapUtil.h b/folly/MapUtil.h index e38446b3..15dd4b18 100644 --- a/folly/MapUtil.h +++ b/folly/MapUtil.h @@ -280,4 +280,4 @@ auto get_ref_default( } return detail::extract_default(keysDefault...); } -} // namespace folly +} // namespace folly diff --git a/folly/Memory.h b/folly/Memory.h index 39b868c1..121f43db 100644 --- a/folly/Memory.h +++ b/folly/Memory.h @@ -546,4 +546,4 @@ class enable_shared_from_this : public std::enable_shared_from_this { #endif -} // namespace folly +} // namespace folly diff --git a/folly/MemoryMapping.cpp b/folly/MemoryMapping.cpp index ae4cac71..5165c073 100644 --- a/folly/MemoryMapping.cpp +++ b/folly/MemoryMapping.cpp @@ -97,7 +97,7 @@ void getDeviceOptions(dev_t device, off_t& pageSize, bool& autoExtend) { inline void getDeviceOptions(dev_t, off_t&, bool&) {} #endif -} // namespace +} // namespace void MemoryMapping::init(off_t offset, off_t length) { const bool grow = options_.grow; @@ -246,7 +246,7 @@ bool memOpInChunks(std::function op, return true; } -} // anonymous namespace +} // namespace bool MemoryMapping::mlock(LockMode lock) { size_t amountSucceeded = 0; @@ -398,4 +398,4 @@ void mmapFileCopy(const char* src, const char* dest, mode_t mode) { srcMap.range().size()); } -} // namespace folly +} // namespace folly diff --git a/folly/MemoryMapping.h b/folly/MemoryMapping.h index 2ceede77..38220632 100644 --- a/folly/MemoryMapping.h +++ b/folly/MemoryMapping.h @@ -248,4 +248,4 @@ void alignedForwardMemcpy(void* dest, const void* src, size_t size); */ void mmapFileCopy(const char* src, const char* dest, mode_t mode = 0666); -} // namespace folly +} // namespace folly diff --git a/folly/Overload.h b/folly/Overload.h index de1f5354..fc01aa91 100644 --- a/folly/Overload.h +++ b/folly/Overload.h @@ -34,7 +34,7 @@ namespace folly { -namespace details { +namespace detail { template struct Overload; @@ -53,14 +53,14 @@ struct Overload : Case { using Case::operator(); }; -} // details +} // namespace detail /* * Combine multiple `Cases` in one function object */ template decltype(auto) overload(Cases&&... cases) { - return details::Overload::type...>{ + return detail::Overload::type...>{ std::forward(cases)...}; } @@ -76,4 +76,4 @@ decltype(auto) variant_match(Variant&& variant, Cases&&... cases) { overload(std::forward(cases)...), std::forward(variant)); } -} // folly +} // namespace folly diff --git a/folly/Padded.h b/folly/Padded.h index ca499aad..88282d9d 100644 --- a/folly/Padded.h +++ b/folly/Padded.h @@ -67,7 +67,7 @@ struct NodeValid::type> { typedef void type; }; -} // namespace detail +} // namespace detail template class Node::type> { @@ -190,7 +190,7 @@ struct IteratorBase { > type; }; -} // namespace detail +} // namespace detail /** * Wrapper around iterators to Node to return iterators to the underlying @@ -510,5 +510,5 @@ class Adaptor { size_t lastCount_; // number of elements in last Node }; -} // namespace padded -} // namespace folly +} // namespace padded +} // namespace folly diff --git a/folly/Portability.h b/folly/Portability.h index 423c9a2c..0f549868 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -362,7 +362,7 @@ constexpr auto kIsBigEndian = !kIsLittleEndian; namespace FOLLY_GFLAGS_NAMESPACE { } namespace gflags { using namespace FOLLY_GFLAGS_NAMESPACE; -} // namespace gflags +} // namespace gflags #endif // for TARGET_OS_IPHONE diff --git a/folly/RWSpinLock.h b/folly/RWSpinLock.h index 8aca5966..cd8cf027 100644 --- a/folly/RWSpinLock.h +++ b/folly/RWSpinLock.h @@ -517,7 +517,7 @@ struct RWTicketIntTrait<32> { } #endif }; -} // detail +} // namespace detail template class RWTicketSpinLockT { @@ -761,7 +761,7 @@ typedef RWTicketSpinLockT<64> RWTicketSpinLock64; #endif // RW_SPINLOCK_USE_X86_INTRINSIC_ -} // namespace folly +} // namespace folly #ifdef RW_SPINLOCK_USE_X86_INTRINSIC_ #undef RW_SPINLOCK_USE_X86_INTRINSIC_ diff --git a/folly/Random-inl.h b/folly/Random-inl.h index f2f3b4ba..39fbd8e4 100644 --- a/folly/Random-inl.h +++ b/folly/Random-inl.h @@ -67,7 +67,7 @@ struct SeedData { std::array seedData; }; -} // namespace detail +} // namespace detail template void Random::seed(RNG& rng) { @@ -83,4 +83,4 @@ auto Random::create() -> RNG { return RNG(s); } -} // namespaces +} // namespace folly diff --git a/folly/SafeAssert.cpp b/folly/SafeAssert.cpp index 4f2db41a..37174c79 100644 --- a/folly/SafeAssert.cpp +++ b/folly/SafeAssert.cpp @@ -28,7 +28,7 @@ void writeStderr(const char* s, size_t len) { void writeStderr(const char* s) { writeStderr(s, strlen(s)); } -} // namespace +} // namespace void assertionFailure(const char* expr, const char* msg, const char* file, unsigned int line, const char* function) { diff --git a/folly/ScopeGuard.h b/folly/ScopeGuard.h index ad96afdc..a8c26914 100644 --- a/folly/ScopeGuard.h +++ b/folly/ScopeGuard.h @@ -280,7 +280,7 @@ operator+(detail::ScopeGuardOnExit, FunctionType&& fn) { } } // namespace detail -} // folly +} // namespace folly #define SCOPE_EXIT \ auto FB_ANONYMOUS_VARIABLE(SCOPE_EXIT_STATE) \ diff --git a/folly/Shell.cpp b/folly/Shell.cpp index 0b00b068..3ce31b76 100644 --- a/folly/Shell.cpp +++ b/folly/Shell.cpp @@ -30,4 +30,4 @@ std::string shellQuote(StringPiece argument) { return quoted + "'"; } -} // folly +} // namespace folly diff --git a/folly/Shell.h b/folly/Shell.h index 0a58aa45..cefe2ddb 100644 --- a/folly/Shell.h +++ b/folly/Shell.h @@ -90,4 +90,4 @@ std::vector shellify( return detail::shellify(format, std::forward(arguments)...); } -} // folly +} // namespace folly diff --git a/folly/SocketAddress.cpp b/folly/SocketAddress.cpp index 4858ab50..0209555c 100644 --- a/folly/SocketAddress.cpp +++ b/folly/SocketAddress.cpp @@ -106,7 +106,7 @@ struct HostAndPort { char* allocated; }; -} // unnamed namespace +} // namespace namespace folly { @@ -772,4 +772,4 @@ std::ostream& operator<<(std::ostream& os, const SocketAddress& addr) { return os; } -} // folly +} // namespace folly diff --git a/folly/String-inl.h b/folly/String-inl.h index f3eee8ed..02af558f 100644 --- a/folly/String-inl.h +++ b/folly/String-inl.h @@ -33,7 +33,7 @@ namespace detail { // an octal escape sequence, or 'P' if the character is printable and // should be printed as is. extern const char cEscapeTable[]; -} // namespace detail +} // namespace detail template void cEscape(StringPiece str, String& out) { @@ -80,7 +80,7 @@ extern const char cUnescapeTable[]; // Map from the character code to the hex value, or 16 if invalid hex char. extern const unsigned char hexTable[]; -} // namespace detail +} // namespace detail template void cUnescape(StringPiece str, String& out, bool strict) { @@ -158,7 +158,7 @@ namespace detail { // 3 = space, replace with '+' in QUERY mode // 4 = percent-encode extern const unsigned char uriEscapeTable[]; -} // namespace detail +} // namespace detail template void uriEscape(StringPiece str, String& out, UriEscapeMode mode) { @@ -477,7 +477,7 @@ internalJoin(Delim delimiter, internalJoinAppend(delimiter, begin, end, output); } -} // namespace detail +} // namespace detail template void join(const Delim& delimiter, @@ -613,7 +613,7 @@ namespace detail { */ size_t hexDumpLine(const void* ptr, size_t offset, size_t size, std::string& line); -} // namespace detail +} // namespace detail template void hexDump(const void* ptr, size_t size, OutIt out) { @@ -625,4 +625,4 @@ void hexDump(const void* ptr, size_t size, OutIt out) { } } -} // namespace folly +} // namespace folly diff --git a/folly/String.cpp b/folly/String.cpp index ffc956d6..0fb3f325 100644 --- a/folly/String.cpp +++ b/folly/String.cpp @@ -118,7 +118,7 @@ void stringAppendfImpl(std::string& output, const char* format, va_list args) { output.append(heap_buffer.get(), size_t(final_bytes_used)); } -} // anon namespace +} // namespace std::string stringPrintf(const char* format, ...) { va_list ap; @@ -274,7 +274,7 @@ const PrettySuffix* const kPrettySuffixes[PRETTY_NUM_TYPES] = { kPrettySISuffixes, }; -} // namespace +} // namespace std::string prettyPrint(double val, PrettyType type, bool addSpace) { char buf[100]; @@ -489,7 +489,7 @@ void toLowerAscii64(uint64_t& c) { c += rotated; } -} // anon namespace +} // namespace void toLowerAscii(char* str, size_t length) { static const size_t kAlignMask64 = 7; @@ -638,7 +638,7 @@ std::string stripLeftMargin(std::string s) { return join("\n", piecer); } -} // namespace folly +} // namespace folly #ifdef FOLLY_DEFINED_DMGL # undef FOLLY_DEFINED_DMGL diff --git a/folly/Subprocess.cpp b/folly/Subprocess.cpp index 1c9eade3..9a0b37eb 100644 --- a/folly/Subprocess.cpp +++ b/folly/Subprocess.cpp @@ -151,7 +151,7 @@ void checkStatus(ProcessReturnCode returnCode) { } } -} // namespace +} // namespace Subprocess::Options& Subprocess::Options::fd(int fd, int action) { if (action == Subprocess::PIPE) { @@ -215,7 +215,7 @@ struct ChildErrorInfo { _exit(errCode); } -} // namespace +} // namespace void Subprocess::setAllNonBlocking() { for (auto& p : pipes_) { @@ -670,7 +670,7 @@ bool discardRead(int fd) { } } -} // namespace +} // namespace std::pair Subprocess::communicate( StringPiece input) { @@ -858,6 +858,6 @@ class Initializer { Initializer initializer; -} // namespace +} // namespace -} // namespace folly +} // namespace folly diff --git a/folly/Subprocess.h b/folly/Subprocess.h index 98f79d28..042a1b9b 100644 --- a/folly/Subprocess.h +++ b/folly/Subprocess.h @@ -882,4 +882,4 @@ class Subprocess { std::vector pipes_; }; -} // namespace folly +} // namespace folly diff --git a/folly/Synchronized.h b/folly/Synchronized.h index 2054aa06..238b2d8e 100644 --- a/folly/Synchronized.h +++ b/folly/Synchronized.h @@ -757,7 +757,7 @@ using LockedPtrType = typename std::conditional< std::is_const::value, typename SynchronizedType::ConstLockedPtr, typename SynchronizedType::LockedPtr>::type; -} // detail +} // namespace detail /** * A helper base class for implementing LockedPtr. diff --git a/folly/ThreadCachedArena.cpp b/folly/ThreadCachedArena.cpp index 57701a11..3869d6c2 100644 --- a/folly/ThreadCachedArena.cpp +++ b/folly/ThreadCachedArena.cpp @@ -50,4 +50,4 @@ size_t ThreadCachedArena::totalSize() const { return result; } -} // namespace folly +} // namespace folly diff --git a/folly/ThreadCachedArena.h b/folly/ThreadCachedArena.h index 9b22b6c9..d4a5b23b 100644 --- a/folly/ThreadCachedArena.h +++ b/folly/ThreadCachedArena.h @@ -84,4 +84,4 @@ class ThreadCachedArena { template <> struct IsArenaAllocator : std::true_type { }; -} // namespace folly +} // namespace folly diff --git a/folly/ThreadLocal.h b/folly/ThreadLocal.h index d67f3b82..3c050744 100644 --- a/folly/ThreadLocal.h +++ b/folly/ThreadLocal.h @@ -393,4 +393,4 @@ class ThreadLocalPtr { mutable typename StaticMeta::EntryID id_; }; -} // namespace folly +} // namespace folly diff --git a/folly/TimeoutQueue.cpp b/folly/TimeoutQueue.cpp index 3887cdd3..42e70176 100644 --- a/folly/TimeoutQueue.cpp +++ b/folly/TimeoutQueue.cpp @@ -73,4 +73,4 @@ int64_t TimeoutQueue::runInternal(int64_t now, bool onceOnly) { return nextExp; } -} // namespace folly +} // namespace folly diff --git a/folly/TimeoutQueue.h b/folly/TimeoutQueue.h index a20998b0..9985e86f 100644 --- a/folly/TimeoutQueue.h +++ b/folly/TimeoutQueue.h @@ -126,4 +126,4 @@ class TimeoutQueue { Id nextId_; }; -} // namespace folly +} // namespace folly diff --git a/folly/Traits.h b/folly/Traits.h index bf8d4b4c..20e2de91 100644 --- a/folly/Traits.h +++ b/folly/Traits.h @@ -570,7 +570,7 @@ bool greater_than_impl(LHS const lhs) { FOLLY_POP_WARNING -} // namespace detail { +} // namespace detail // same as `x < 0` template diff --git a/folly/Try-inl.h b/folly/Try-inl.h index 5517337c..8adeb423 100644 --- a/folly/Try-inl.h +++ b/folly/Try-inl.h @@ -169,4 +169,4 @@ std::tuple unwrapTryTuple(std::tuple...>&& ts) { std::forward...>>(ts)); } -} // folly +} // namespace folly diff --git a/folly/Try.h b/folly/Try.h index 91d160e9..f38362b8 100644 --- a/folly/Try.h +++ b/folly/Try.h @@ -505,6 +505,6 @@ makeTryWith(F&& f); template std::tuple unwrapTryTuple(std::tuple...>&& ts); -} // folly +} // namespace folly #include diff --git a/folly/UncaughtExceptions.h b/folly/UncaughtExceptions.h index 2a8529e4..808710aa 100644 --- a/folly/UncaughtExceptions.h +++ b/folly/UncaughtExceptions.h @@ -63,4 +63,4 @@ inline int uncaught_exceptions() noexcept { #endif } -} // namespaces +} // namespace folly diff --git a/folly/Uri.cpp b/folly/Uri.cpp index 57ddfb42..d1bdfae7 100644 --- a/folly/Uri.cpp +++ b/folly/Uri.cpp @@ -36,7 +36,7 @@ void toLower(String& s) { } } -} // namespace +} // namespace Uri::Uri(StringPiece str) : hasAuthority_(false), port_(0) { static const boost::regex uriRegex( @@ -159,4 +159,4 @@ const std::vector>& Uri::getQueryParams() { return queryParams_; } -} // namespace folly +} // namespace folly diff --git a/folly/Uri.h b/folly/Uri.h index 6369d522..bfb88894 100644 --- a/folly/Uri.h +++ b/folly/Uri.h @@ -118,6 +118,6 @@ class Uri { std::vector> queryParams_; }; -} // namespace folly +} // namespace folly #include diff --git a/folly/Varint.h b/folly/Varint.h index 84e275ad..cd44d267 100644 --- a/folly/Varint.h +++ b/folly/Varint.h @@ -164,4 +164,4 @@ inline Expected tryDecodeVarint(Range& data) { return val; } -} // folly +} // namespace folly diff --git a/folly/build/GenerateFingerprintTables.cpp b/folly/build/GenerateFingerprintTables.cpp index da21e171..0085ac8d 100644 --- a/folly/build/GenerateFingerprintTables.cpp +++ b/folly/build/GenerateFingerprintTables.cpp @@ -116,7 +116,7 @@ void computeTables(FILE* file, const FingerprintPolynomial& poly) { CHECK_ERR(fprintf(file, "\n};\n\n")); } -} // namespace +} // namespace int main(int argc, char *argv[]) { gflags::ParseCommandLineFlags(&argc, &argv, true); diff --git a/folly/build/generate_varint_tables.py b/folly/build/generate_varint_tables.py index bf082d99..b121a205 100755 --- a/folly/build/generate_varint_tables.py +++ b/folly/build/generate_varint_tables.py @@ -96,8 +96,8 @@ alignas(16) extern const uint64_t groupVarintSSEMasks[512] = { f.write(""" }; -} // namespace detail -} // namespace folly +} // namespace detail +} // namespace folly """) def main(): diff --git a/folly/concurrency/detail/ConcurrentHashMap-detail.h b/folly/concurrency/detail/ConcurrentHashMap-detail.h index ec1c8df3..ccef419d 100644 --- a/folly/concurrency/detail/ConcurrentHashMap-detail.h +++ b/folly/concurrency/detail/ConcurrentHashMap-detail.h @@ -738,5 +738,5 @@ class FOLLY_ALIGNED(64) ConcurrentHashMapSegment { Atom buckets_{nullptr}; Mutex m_; }; -} -} // folly::detail namespace +} // namespace detail +} // namespace folly diff --git a/folly/detail/BitIteratorDetail.h b/folly/detail/BitIteratorDetail.h index ee64ffe4..7f4f57e3 100644 --- a/folly/detail/BitIteratorDetail.h +++ b/folly/detail/BitIteratorDetail.h @@ -85,6 +85,5 @@ struct BitIteratorBase { ssize_t> type; }; - -} // namespace bititerator_detail -} // namespace folly +} // namespace bititerator_detail +} // namespace folly diff --git a/folly/detail/DiscriminatedPtrDetail.h b/folly/detail/DiscriminatedPtrDetail.h index 8f0d70b8..c6d1628f 100644 --- a/folly/detail/DiscriminatedPtrDetail.h +++ b/folly/detail/DiscriminatedPtrDetail.h @@ -164,5 +164,5 @@ using ApplyConstVisitor = ApplyConstVisitor1< typename ConstVisitorResult::type, Types...>; -} // namespace dptr_detail -} // namespace folly +} // namespace dptr_detail +} // namespace folly diff --git a/folly/detail/FingerprintPolynomial.h b/folly/detail/FingerprintPolynomial.h index db9a1783..39349458 100644 --- a/folly/detail/FingerprintPolynomial.h +++ b/folly/detail/FingerprintPolynomial.h @@ -138,5 +138,5 @@ class FingerprintPolynomial { uint64_t val_[1 + DEG/64]; }; -} // namespace detail -} // namespace folly +} // namespace detail +} // namespace folly diff --git a/folly/detail/Futex.cpp b/folly/detail/Futex.cpp index f8a8dbc7..8604a745 100644 --- a/folly/detail/Futex.cpp +++ b/folly/detail/Futex.cpp @@ -31,7 +31,8 @@ using namespace std::chrono; -namespace folly { namespace detail { +namespace folly { +namespace detail { namespace { @@ -268,8 +269,7 @@ FutexResult emulatedFutexWaitImpl( return FutexResult::AWOKEN; } -} // anon namespace - +} // namespace ///////////////////////////////// // Futex<> specializations @@ -316,4 +316,5 @@ Futex::futexWaitImpl( this, expected, absSystemTime, absSteadyTime, waitMask); } -}} // namespace folly::detail +} // namespace detail +} // namespace folly diff --git a/folly/detail/GroupVarintDetail.h b/folly/detail/GroupVarintDetail.h index f389eca3..57ec96fb 100644 --- a/folly/detail/GroupVarintDetail.h +++ b/folly/detail/GroupVarintDetail.h @@ -96,5 +96,5 @@ class GroupVarintBase { enum { kFullGroupSize = kHeaderSize + kGroupSize * sizeof(type) }; }; -} // namespace detail -} // namespace folly +} // namespace detail +} // namespace folly diff --git a/folly/detail/SlowFingerprint.h b/folly/detail/SlowFingerprint.h index 6dcc9a7a..20fd6742 100644 --- a/folly/detail/SlowFingerprint.h +++ b/folly/detail/SlowFingerprint.h @@ -85,5 +85,5 @@ class SlowFingerprint { FingerprintPolynomial fp_; }; -} // namespace detail -} // namespace folly +} // namespace detail +} // namespace folly diff --git a/folly/detail/ThreadLocalDetail.h b/folly/detail/ThreadLocalDetail.h index fe72161a..a88bfbb1 100644 --- a/folly/detail/ThreadLocalDetail.h +++ b/folly/detail/ThreadLocalDetail.h @@ -397,5 +397,5 @@ struct StaticMeta : StaticMetaBase { } }; -} // namespace threadlocal_detail -} // namespace folly +} // namespace threadlocal_detail +} // namespace folly diff --git a/folly/dynamic-inl.h b/folly/dynamic-inl.h index ea8552cb..325060f0 100644 --- a/folly/dynamic-inl.h +++ b/folly/dynamic-inl.h @@ -956,6 +956,6 @@ class FormatValue> { const detail::DefaultValueWrapper& val_; }; -} // namespaces +} // namespace folly #undef FB_DYNAMIC_APPLY diff --git a/folly/experimental/Bits.h b/folly/experimental/Bits.h index d4976720..0b1960c2 100644 --- a/folly/experimental/Bits.h +++ b/folly/experimental/Bits.h @@ -105,7 +105,7 @@ struct BitsTraits::count(const T* begin, const T* end) { return n; } -} // namespace folly +} // namespace folly diff --git a/folly/experimental/DynamicParser-inl.h b/folly/experimental/DynamicParser-inl.h index c4b726b1..4430e29c 100644 --- a/folly/experimental/DynamicParser-inl.h +++ b/folly/experimental/DynamicParser-inl.h @@ -213,7 +213,7 @@ template EnableForArgTypes invokeForKeyValue(Fn fn, const folly::dynamic& k, const folly::dynamic& v) { fn(k.asInt(), v.asString()); } -} // namespace detail +} // namespace detail template void DynamicParser::optional(const folly::dynamic& key, Fn fn) { @@ -300,4 +300,4 @@ inline const folly::dynamic& DynamicParser::ParserStack::value() const{ return *value_; } -} // namespace folly +} // namespace folly diff --git a/folly/experimental/DynamicParser.cpp b/folly/experimental/DynamicParser.cpp index f6fe3152..9c903179 100644 --- a/folly/experimental/DynamicParser.cpp +++ b/folly/experimental/DynamicParser.cpp @@ -42,7 +42,7 @@ folly::dynamic& insertAtKey( "Unsupported key type ", key.typeName(), " of ", detail::toPseudoJson(key) ); } -} // anonymous namespace +} // namespace void DynamicParser::reportError( const folly::dynamic* lookup_k, @@ -187,6 +187,6 @@ std::string toPseudoJson(const folly::dynamic& d) { ss << d; return ss.str(); } -} // namespace detail +} // namespace detail -} // namespace folly +} // namespace folly diff --git a/folly/experimental/DynamicParser.h b/folly/experimental/DynamicParser.h index c84597ff..386eed32 100644 --- a/folly/experimental/DynamicParser.h +++ b/folly/experimental/DynamicParser.h @@ -188,7 +188,7 @@ namespace detail { // Firstly, the input dynamic need not correspond to valid JSON. Secondly, // wrapError() uses integer-keyed objects to report arrary-indexing errors. std::string toPseudoJson(const folly::dynamic& d); -} // namespace detail +} // namespace detail /** * With DynamicParser::OnError::THROW, reports the first error. @@ -392,6 +392,6 @@ class DynamicParser { bool allowNonStringKeyErrors_{false}; // See the setter's docblock. }; -} // namespace folly +} // namespace folly #include diff --git a/folly/experimental/EliasFanoCoding.h b/folly/experimental/EliasFanoCoding.h index 20d106a2..15d3d5d6 100644 --- a/folly/experimental/EliasFanoCoding.h +++ b/folly/experimental/EliasFanoCoding.h @@ -516,7 +516,7 @@ class UpperBitsReader : ForwardPointers, ValueType value_; }; -} // namespace detail +} // namespace detail // If kUnchecked = true the caller must guarantee that all the // operations return valid elements, i.e., they would never return diff --git a/folly/experimental/EventCount.h b/folly/experimental/EventCount.h index ee5717d0..f2f806cb 100644 --- a/folly/experimental/EventCount.h +++ b/folly/experimental/EventCount.h @@ -195,4 +195,4 @@ void EventCount::await(Condition condition) { } } -} // namespace folly +} // namespace folly diff --git a/folly/experimental/FlatCombiningPriorityQueue.h b/folly/experimental/FlatCombiningPriorityQueue.h index c8d1c163..a8c3c128 100644 --- a/folly/experimental/FlatCombiningPriorityQueue.h +++ b/folly/experimental/FlatCombiningPriorityQueue.h @@ -334,4 +334,4 @@ inline bool FlatCombiningPriorityQueue::tryPeek( } // outer while loop } -} // namespace folly { +} // namespace folly diff --git a/folly/experimental/FunctionScheduler.cpp b/folly/experimental/FunctionScheduler.cpp index 2a945015..63a2ad7c 100644 --- a/folly/experimental/FunctionScheduler.cpp +++ b/folly/experimental/FunctionScheduler.cpp @@ -83,7 +83,7 @@ struct UniformDistributionFunctor { milliseconds operator()() { return milliseconds(dist(generator)); } }; -} // anonymous namespace +} // namespace FunctionScheduler::FunctionScheduler() {} diff --git a/folly/experimental/FutureDAG.h b/folly/experimental/FutureDAG.h index bf14f33e..48d8dd2d 100644 --- a/folly/experimental/FutureDAG.h +++ b/folly/experimental/FutureDAG.h @@ -225,4 +225,4 @@ class FutureDAGFunctor { virtual ~FutureDAGFunctor(){} }; -} // folly +} // namespace folly diff --git a/folly/experimental/Instructions.h b/folly/experimental/Instructions.h index 972b62d7..a98de969 100644 --- a/folly/experimental/Instructions.h +++ b/folly/experimental/Instructions.h @@ -147,6 +147,6 @@ struct Haswell : public Nehalem { #endif } }; -} -} -} // namespaces +} // namespace instructions +} // namespace compression +} // namespace folly diff --git a/folly/experimental/JemallocNodumpAllocator.cpp b/folly/experimental/JemallocNodumpAllocator.cpp index 481efd00..91625a79 100644 --- a/folly/experimental/JemallocNodumpAllocator.cpp +++ b/folly/experimental/JemallocNodumpAllocator.cpp @@ -165,4 +165,4 @@ JemallocNodumpAllocator& globalJemallocNodumpAllocator() { return *instance; } -} // folly +} // namespace folly diff --git a/folly/experimental/JemallocNodumpAllocator.h b/folly/experimental/JemallocNodumpAllocator.h index e6756aa1..93b14f79 100644 --- a/folly/experimental/JemallocNodumpAllocator.h +++ b/folly/experimental/JemallocNodumpAllocator.h @@ -115,4 +115,4 @@ class JemallocNodumpAllocator { */ JemallocNodumpAllocator& globalJemallocNodumpAllocator(); -} // folly +} // namespace folly diff --git a/folly/experimental/NestedCommandLineApp.cpp b/folly/experimental/NestedCommandLineApp.cpp index 19f86663..ebb73662 100644 --- a/folly/experimental/NestedCommandLineApp.cpp +++ b/folly/experimental/NestedCommandLineApp.cpp @@ -37,7 +37,7 @@ std::string guessProgramName() { } } -} // namespace +} // namespace ProgramExit::ProgramExit(int status, const std::string& msg) : std::runtime_error(msg), @@ -271,4 +271,4 @@ void NestedCommandLineApp::doRun(const std::vector& args) { info.command(vm, cmdArgs); } -} // namespaces +} // namespace folly diff --git a/folly/experimental/NestedCommandLineApp.h b/folly/experimental/NestedCommandLineApp.h index b4a9865d..24210341 100644 --- a/folly/experimental/NestedCommandLineApp.h +++ b/folly/experimental/NestedCommandLineApp.h @@ -153,4 +153,4 @@ class NestedCommandLineApp { std::map aliases_; }; -} // namespaces +} // namespace folly diff --git a/folly/experimental/ProgramOptions.cpp b/folly/experimental/ProgramOptions.cpp index 842cfbca..21f0fddc 100644 --- a/folly/experimental/ProgramOptions.cpp +++ b/folly/experimental/ProgramOptions.cpp @@ -244,7 +244,7 @@ const std::unordered_map gFlagAdders = { #undef X }; -} // namespace +} // namespace po::options_description getGFlags(ProgramOptionsStyle style) { static const std::unordered_set gSkipFlags{ @@ -316,7 +316,7 @@ NestedCommandLineParseResult doParseNestedCommandLine( return result; } -} // namespace +} // namespace NestedCommandLineParseResult parseNestedCommandLine( int argc, const char* const argv[], @@ -330,4 +330,4 @@ NestedCommandLineParseResult parseNestedCommandLine( return doParseNestedCommandLine(po::command_line_parser(cmdline), desc); } -} // namespaces +} // namespace folly diff --git a/folly/experimental/ProgramOptions.h b/folly/experimental/ProgramOptions.h index d92b038e..38aacd28 100644 --- a/folly/experimental/ProgramOptions.h +++ b/folly/experimental/ProgramOptions.h @@ -82,4 +82,4 @@ NestedCommandLineParseResult parseNestedCommandLine( const std::vector& cmdline, const boost::program_options::options_description& desc); -} // namespaces +} // namespace folly diff --git a/folly/experimental/StringKeyedCommon.h b/folly/experimental/StringKeyedCommon.h index 416874df..ae15dd3d 100644 --- a/folly/experimental/StringKeyedCommon.h +++ b/folly/experimental/StringKeyedCommon.h @@ -42,4 +42,4 @@ void stringPieceDel(StringPiece piece, const Alloc& alloc) { .deallocate(const_cast(piece.data()), piece.size()); } -} // folly +} // namespace folly diff --git a/folly/experimental/StringKeyedMap.h b/folly/experimental/StringKeyedMap.h index d828d65e..8c2c1ed6 100644 --- a/folly/experimental/StringKeyedMap.h +++ b/folly/experimental/StringKeyedMap.h @@ -211,4 +211,4 @@ class StringKeyedMap } }; -} // folly +} // namespace folly diff --git a/folly/experimental/StringKeyedSet.h b/folly/experimental/StringKeyedSet.h index a4befc01..7b48d238 100644 --- a/folly/experimental/StringKeyedSet.h +++ b/folly/experimental/StringKeyedSet.h @@ -196,4 +196,4 @@ class StringKeyedSetBase using StringKeyedSet = StringKeyedSetBase<>; -} // folly +} // namespace folly diff --git a/folly/experimental/StringKeyedUnorderedMap.h b/folly/experimental/StringKeyedUnorderedMap.h index 9acf92cd..41180cb7 100644 --- a/folly/experimental/StringKeyedUnorderedMap.h +++ b/folly/experimental/StringKeyedUnorderedMap.h @@ -236,4 +236,4 @@ class StringKeyedUnorderedMap } }; -} // folly +} // namespace folly diff --git a/folly/experimental/StringKeyedUnorderedSet.h b/folly/experimental/StringKeyedUnorderedSet.h index 4fc1b710..11317ede 100644 --- a/folly/experimental/StringKeyedUnorderedSet.h +++ b/folly/experimental/StringKeyedUnorderedSet.h @@ -230,4 +230,4 @@ class BasicStringKeyedUnorderedSet typedef BasicStringKeyedUnorderedSet<> StringKeyedUnorderedSet; -} // folly +} // namespace folly diff --git a/folly/experimental/TestUtil.cpp b/folly/experimental/TestUtil.cpp index cbaa3246..f89e1af5 100644 --- a/folly/experimental/TestUtil.cpp +++ b/folly/experimental/TestUtil.cpp @@ -50,7 +50,7 @@ fs::path generateUniquePath(fs::path path, StringPiece namePrefix) { return path; } -} // namespace +} // namespace TemporaryFile::TemporaryFile(StringPiece namePrefix, fs::path dir, @@ -175,7 +175,7 @@ bool hasNoPCREPatternMatch(StringPiece pattern, StringPiece target) { return !hasPCREPatternMatch(pattern, target); } -} // namespace detail +} // namespace detail CaptureFD::CaptureFD(int fd, ChunkCob chunk_cob) : chunkCob_(std::move(chunk_cob)), fd_(fd), readOffset_(0) { @@ -222,5 +222,5 @@ std::string CaptureFD::readIncremental() { return std::string(buf.get(), size); } -} // namespace test -} // namespace folly +} // namespace test +} // namespace folly diff --git a/folly/experimental/TestUtil.h b/folly/experimental/TestUtil.h index a02a1a87..b6d2ad74 100644 --- a/folly/experimental/TestUtil.h +++ b/folly/experimental/TestUtil.h @@ -167,9 +167,9 @@ auto msvcSuppressAbortOnInvalidParams(Func func) -> decltype(func()) { ) namespace detail { - bool hasPCREPatternMatch(StringPiece pattern, StringPiece target); - bool hasNoPCREPatternMatch(StringPiece pattern, StringPiece target); -} // namespace detail +bool hasPCREPatternMatch(StringPiece pattern, StringPiece target); +bool hasNoPCREPatternMatch(StringPiece pattern, StringPiece target); +} // namespace detail /** * Use these patterns together with CaptureFD and EXPECT_PCRE_MATCH() to @@ -235,5 +235,5 @@ class CaptureFD { off_t readOffset_; // for incremental reading }; -} // namespace test -} // namespace folly +} // namespace test +} // namespace folly diff --git a/folly/experimental/TupleOps.h b/folly/experimental/TupleOps.h index 9397d90e..b808ac19 100644 --- a/folly/experimental/TupleOps.h +++ b/folly/experimental/TupleOps.h @@ -93,7 +93,7 @@ struct TupleSelect> { } }; -} // namespace detail +} // namespace detail // Return a tuple consisting of the elements at a range of indices. // @@ -122,4 +122,4 @@ auto tuplePrepend(T&& car, U&& cdr) std::forward(cdr)); } -} // namespaces +} // namespace folly diff --git a/folly/experimental/exception_tracer/ExceptionAbi.h b/folly/experimental/exception_tracer/ExceptionAbi.h index cbf7f63f..845fcdbe 100644 --- a/folly/experimental/exception_tracer/ExceptionAbi.h +++ b/folly/experimental/exception_tracer/ExceptionAbi.h @@ -53,4 +53,4 @@ __cxa_eh_globals* __cxa_get_globals(void) noexcept; __cxa_eh_globals* __cxa_get_globals_fast(void) noexcept; } -} // namespace __cxxabiv1 +} // namespace __cxxabiv1 diff --git a/folly/experimental/exception_tracer/ExceptionTracer.cpp b/folly/experimental/exception_tracer/ExceptionTracer.cpp index a5339853..232b09fc 100644 --- a/folly/experimental/exception_tracer/ExceptionTracer.cpp +++ b/folly/experimental/exception_tracer/ExceptionTracer.cpp @@ -40,7 +40,7 @@ typedef StackTraceStack* (*GetExceptionStackTraceStackType)(void); GetExceptionStackTraceStackType getExceptionStackTraceStackFn; } -} // namespace +} // namespace namespace folly { namespace exception_tracer { @@ -110,7 +110,7 @@ bool isAbiCppException(const __cxa_exception* exc) { return (exc->unwindHeader.exception_class & 0xffffffff) == cppClass; } -} // namespace +} // namespace std::vector getCurrentExceptions() { struct Once { @@ -212,7 +212,7 @@ void unexpectedHandler() { origUnexpected(); } -} // namespace +} // namespace void installHandlers() { struct Once { @@ -224,5 +224,5 @@ void installHandlers() { static Once once; } -} // namespace exception_tracer -} // namespace folly +} // namespace exception_tracer +} // namespace folly diff --git a/folly/experimental/exception_tracer/ExceptionTracer.h b/folly/experimental/exception_tracer/ExceptionTracer.h index 9bd632be..03c51b3d 100644 --- a/folly/experimental/exception_tracer/ExceptionTracer.h +++ b/folly/experimental/exception_tracer/ExceptionTracer.h @@ -52,5 +52,5 @@ std::vector getCurrentExceptions(); */ void installHandlers(); -} // namespace exception_tracer -} // namespace folly +} // namespace exception_tracer +} // namespace folly diff --git a/folly/experimental/exception_tracer/ExceptionTracerLib.cpp b/folly/experimental/exception_tracer/ExceptionTracerLib.cpp index 04d29e9c..dcee5692 100644 --- a/folly/experimental/exception_tracer/ExceptionTracerLib.cpp +++ b/folly/experimental/exception_tracer/ExceptionTracerLib.cpp @@ -84,8 +84,8 @@ DECLARE_CALLBACK(CxaRethrow); DECLARE_CALLBACK(CxaEndCatch); DECLARE_CALLBACK(RethrowException); -} // exception_tracer -} // folly +} // namespace exception_tracer +} // namespace folly // Clang is smart enough to understand that the symbols we're loading // are [[noreturn]], but GCC is not. In order to be able to build with diff --git a/folly/experimental/flat_combining/FlatCombining.h b/folly/experimental/flat_combining/FlatCombining.h index 358f7011..63fe1ce7 100644 --- a/folly/experimental/flat_combining/FlatCombining.h +++ b/folly/experimental/flat_combining/FlatCombining.h @@ -679,4 +679,4 @@ class FlatCombining { } }; -} // namespace folly { +} // namespace folly diff --git a/folly/experimental/flat_combining/test/FlatCombiningExamples.h b/folly/experimental/flat_combining/test/FlatCombiningExamples.h index 17c25ca8..4736dfa8 100644 --- a/folly/experimental/flat_combining/test/FlatCombiningExamples.h +++ b/folly/experimental/flat_combining/test/FlatCombiningExamples.h @@ -236,4 +236,4 @@ class FcCustomExample : public FlatCombining< Data data_; }; -} // namespace folly { +} // namespace folly diff --git a/folly/experimental/flat_combining/test/FlatCombiningTestHelpers.h b/folly/experimental/flat_combining/test/FlatCombiningTestHelpers.h index 623563ef..81007de7 100644 --- a/folly/experimental/flat_combining/test/FlatCombiningTestHelpers.h +++ b/folly/experimental/flat_combining/test/FlatCombiningTestHelpers.h @@ -220,5 +220,5 @@ uint64_t run_test( } } -} // namespace test { -} // namespace folly { +} // namespace test +} // namespace folly diff --git a/folly/experimental/hazptr/bench/HazptrBench.h b/folly/experimental/hazptr/bench/HazptrBench.h index 2e49e348..4aca6c53 100644 --- a/folly/experimental/hazptr/bench/HazptrBench.h +++ b/folly/experimental/hazptr/bench/HazptrBench.h @@ -174,8 +174,8 @@ inline void benches(std::string name) { std::cout << "----------------------------------------------------------\n"; } -} // namespace hazptr { -} // namespace folly { +} // namespace hazptr +} // namespace folly /* ------------------------------------------- no amb - no tc diff --git a/folly/experimental/hazptr/example/LockFreeLIFO.h b/folly/experimental/hazptr/example/LockFreeLIFO.h index cbcf88e0..7627c44f 100644 --- a/folly/experimental/hazptr/example/LockFreeLIFO.h +++ b/folly/experimental/hazptr/example/LockFreeLIFO.h @@ -74,5 +74,5 @@ class LockFreeLIFO { std::atomic head_ = {nullptr}; }; -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/hazptr/example/MWMRSet.h b/folly/experimental/hazptr/example/MWMRSet.h index 49d561ad..81b79ca8 100644 --- a/folly/experimental/hazptr/example/MWMRSet.h +++ b/folly/experimental/hazptr/example/MWMRSet.h @@ -247,5 +247,5 @@ class MWMRListSet { } }; -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/hazptr/example/SWMRList.h b/folly/experimental/hazptr/example/SWMRList.h index d0bc9785..6df6a3c3 100644 --- a/folly/experimental/hazptr/example/SWMRList.h +++ b/folly/experimental/hazptr/example/SWMRList.h @@ -139,5 +139,5 @@ class SWMRListSet { } }; -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/hazptr/example/WideCAS.h b/folly/experimental/hazptr/example/WideCAS.h index 9d44c2e4..9a3ed278 100644 --- a/folly/experimental/hazptr/example/WideCAS.h +++ b/folly/experimental/hazptr/example/WideCAS.h @@ -62,5 +62,5 @@ class WideCAS { } }; -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/hazptr/memory_resource.h b/folly/experimental/hazptr/memory_resource.h index bb049f87..d1869dfa 100644 --- a/folly/experimental/hazptr/memory_resource.h +++ b/folly/experimental/hazptr/memory_resource.h @@ -90,5 +90,5 @@ inline memory_resource* new_delete_resource() { return &mr; } -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/hazptr/test/HazptrUse1.h b/folly/experimental/hazptr/test/HazptrUse1.h index 614225c6..29294ded 100644 --- a/folly/experimental/hazptr/test/HazptrUse1.h +++ b/folly/experimental/hazptr/test/HazptrUse1.h @@ -47,5 +47,5 @@ class Node1 : public hazptr_obj_base> { char a[100]; }; -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/hazptr/test/HazptrUse2.h b/folly/experimental/hazptr/test/HazptrUse2.h index b8dc58e9..9d1b1008 100644 --- a/folly/experimental/hazptr/test/HazptrUse2.h +++ b/folly/experimental/hazptr/test/HazptrUse2.h @@ -49,5 +49,5 @@ inline void mineReclaimFnDelete(Node2* p) { delete p; } -} // namespace folly { -} // namespace hazptr { +} // namespace folly +} // namespace hazptr diff --git a/folly/experimental/io/AsyncIO.cpp b/folly/experimental/io/AsyncIO.cpp index 59dc866c..c84b868c 100644 --- a/folly/experimental/io/AsyncIO.cpp +++ b/folly/experimental/io/AsyncIO.cpp @@ -383,7 +383,7 @@ std::ostream& operator<<(std::ostream& os, const iocb& cb) { return os; } -} // anonymous namespace +} // namespace std::ostream& operator<<(std::ostream& os, const AsyncIOOp& op) { os << "{" << op.state_ << ", "; diff --git a/folly/experimental/io/test/AsyncIOTest.cpp b/folly/experimental/io/test/AsyncIOTest.cpp index eb267f6f..7540c8ad 100644 --- a/folly/experimental/io/test/AsyncIOTest.cpp +++ b/folly/experimental/io/test/AsyncIOTest.cpp @@ -284,7 +284,7 @@ void testReads(const std::vector& specs, AsyncIO::PollMode pollMode) { testReadsQueued(specs, pollMode); } -} // anonymous namespace +} // namespace TEST(AsyncIO, ZeroAsyncDataNotPollable) { testReads({{0, 0}}, AsyncIO::NOT_POLLABLE); diff --git a/folly/experimental/logging/test/GlogFormatterTest.cpp b/folly/experimental/logging/test/GlogFormatterTest.cpp index a10c380a..49d55254 100644 --- a/folly/experimental/logging/test/GlogFormatterTest.cpp +++ b/folly/experimental/logging/test/GlogFormatterTest.cpp @@ -55,7 +55,7 @@ std::string formatMsg( return formatter.formatMessage(logMessage, category); } -} // unnamed namespace +} // namespace TEST(GlogFormatter, log) { auto tid = getOSThreadID(); diff --git a/folly/experimental/logging/xlog.cpp b/folly/experimental/logging/xlog.cpp index 3468c29f..42e25649 100644 --- a/folly/experimental/logging/xlog.cpp +++ b/folly/experimental/logging/xlog.cpp @@ -52,7 +52,7 @@ StringPiece stripBuckOutPrefix(StringPiece filename) { idx = end + 1; } } -} // unnamed namespace +} // namespace std::string getXlogCategoryNameForFile(StringPiece filename) { // Buck mangles the directory layout for header files. Rather than including diff --git a/folly/experimental/symbolizer/Symbolizer.cpp b/folly/experimental/symbolizer/Symbolizer.cpp index 96030510..64acdcb7 100644 --- a/folly/experimental/symbolizer/Symbolizer.cpp +++ b/folly/experimental/symbolizer/Symbolizer.cpp @@ -326,7 +326,7 @@ bool isColorfulTty(int options, int fd) { return !(term == nullptr || term[0] == '\0' || strcmp(term, "dumb") == 0); } -} // anonymous namespace +} // namespace OStreamSymbolizePrinter::OStreamSymbolizePrinter(std::ostream& out, int options) : SymbolizePrinter(options, isColorfulTty(options, getFD(out))), diff --git a/folly/experimental/test/BitsTest.cpp b/folly/experimental/test/BitsTest.cpp index 0a1ec16d..f8b7766e 100644 --- a/folly/experimental/test/BitsTest.cpp +++ b/folly/experimental/test/BitsTest.cpp @@ -253,7 +253,7 @@ T testValue(int bits) { CHECK_LE(value, std::numeric_limits::max()); return static_cast(value); } -} // anonymous namespace +} // namespace TEST(Bits, Boundaries) { uint8_t buf[20]; diff --git a/folly/experimental/test/EliasFanoCodingTest.cpp b/folly/experimental/test/EliasFanoCodingTest.cpp index 55af37d8..2583a668 100644 --- a/folly/experimental/test/EliasFanoCodingTest.cpp +++ b/folly/experimental/test/EliasFanoCodingTest.cpp @@ -41,7 +41,7 @@ uint8_t slowDefaultNumLowerBits(size_t upperBound, size_t size) { return uint8_t(folly::findLastSet(upperBound / size) - 1); } -} // namespace +} // namespace TEST(EliasFanoCoding, defaultNumLowerBits) { // Verify that slowDefaultNumLowerBits and optimized @@ -207,7 +207,7 @@ void free() { list.free(); } -} // namespace bm +} // namespace bm BENCHMARK(Next, iters) { bmNext(bm::list, bm::data, iters); diff --git a/folly/experimental/test/EventCountTest.cpp b/folly/experimental/test/EventCountTest.cpp index 80fdcc47..4f936ae6 100644 --- a/folly/experimental/test/EventCountTest.cpp +++ b/folly/experimental/test/EventCountTest.cpp @@ -74,7 +74,7 @@ void randomPartition(Random& random, T key, int n, } } -} // namespace +} // namespace TEST(EventCount, Simple) { // We're basically testing for no deadlock. diff --git a/folly/experimental/test/FunctionSchedulerTest.cpp b/folly/experimental/test/FunctionSchedulerTest.cpp index 5da41d24..73088c27 100644 --- a/folly/experimental/test/FunctionSchedulerTest.cpp +++ b/folly/experimental/test/FunctionSchedulerTest.cpp @@ -52,7 +52,7 @@ void delay(int n) { usleep(usec.count()); } -} // unnamed namespace +} // namespace TEST(FunctionScheduler, StartAndShutdown) { FunctionScheduler fs; @@ -516,7 +516,7 @@ class PThreadCreateFailure { }; std::atomic PThreadCreateFailure::forceFailure_{0}; -} // unnamed namespce +} // namespace // Replace the system pthread_create() function with our own stub, so we can // trigger failures in the StartThrows() test. diff --git a/folly/experimental/test/NestedCommandLineAppExample.cpp b/folly/experimental/test/NestedCommandLineAppExample.cpp index 42ae2b12..ec7817e0 100644 --- a/folly/experimental/test/NestedCommandLineAppExample.cpp +++ b/folly/experimental/test/NestedCommandLineAppExample.cpp @@ -157,7 +157,7 @@ void runEcho(const po::variables_map& options, } } -} // namespace +} // namespace int main(int argc, char *argv[]) { // Initialize a NestedCommandLineApp object. diff --git a/folly/experimental/test/NestedCommandLineAppTest.cpp b/folly/experimental/test/NestedCommandLineAppTest.cpp index 0b3bd382..28e5e5e8 100644 --- a/folly/experimental/test/NestedCommandLineAppTest.cpp +++ b/folly/experimental/test/NestedCommandLineAppTest.cpp @@ -60,7 +60,7 @@ std::string callHelper(std::initializer_list args, return p.first; } -} // namespace +} // namespace TEST(ProgramOptionsTest, Errors) { callHelper({}, 1); diff --git a/folly/experimental/test/NestedCommandLineAppTestHelper.cpp b/folly/experimental/test/NestedCommandLineAppTestHelper.cpp index da404613..1c3c2723 100644 --- a/folly/experimental/test/NestedCommandLineAppTestHelper.cpp +++ b/folly/experimental/test/NestedCommandLineAppTestHelper.cpp @@ -38,7 +38,7 @@ void foo(const po::variables_map& options, } } -} // namespace +} // namespace int main(int argc, char *argv[]) { folly::NestedCommandLineApp app("", "0.1", "", "", init); diff --git a/folly/experimental/test/ProgramOptionsTest.cpp b/folly/experimental/test/ProgramOptionsTest.cpp index 208c8415..2a662af5 100644 --- a/folly/experimental/test/ProgramOptionsTest.cpp +++ b/folly/experimental/test/ProgramOptionsTest.cpp @@ -62,7 +62,7 @@ std::string callHelper(ProgramOptionsStyle style, return p.first; } -} // namespace +} // namespace // name value diff --git a/folly/experimental/test/ProgramOptionsTestHelper.cpp b/folly/experimental/test/ProgramOptionsTestHelper.cpp index 12691b87..a781c3e5 100644 --- a/folly/experimental/test/ProgramOptionsTestHelper.cpp +++ b/folly/experimental/test/ProgramOptionsTestHelper.cpp @@ -36,7 +36,7 @@ void print(const po::variables_map& vm, const std::string& name) { name.c_str(), folly::to(v.as()).c_str()); } -} // namespace +} // namespace int main(int argc, char *argv[]) { po::options_description desc; diff --git a/folly/fibers/AtomicBatchDispatcher-inl.h b/folly/fibers/AtomicBatchDispatcher-inl.h index 549112f3..6e14d7b7 100644 --- a/folly/fibers/AtomicBatchDispatcher-inl.h +++ b/folly/fibers/AtomicBatchDispatcher-inl.h @@ -222,4 +222,4 @@ AtomicBatchDispatcher createAtomicBatchDispatcher( } } // namespace fibers -} // manespace folly +} // namespace folly diff --git a/folly/fibers/BoostContextCompatibility.h b/folly/fibers/BoostContextCompatibility.h index 854c915b..280162b1 100644 --- a/folly/fibers/BoostContextCompatibility.h +++ b/folly/fibers/BoostContextCompatibility.h @@ -130,5 +130,5 @@ class FiberImpl { FiberContext fiberContext_; MainContext mainContext_; }; -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/EventBaseLoopController-inl.h b/folly/fibers/EventBaseLoopController-inl.h index f0aa4c9b..3ea88fb2 100644 --- a/folly/fibers/EventBaseLoopController-inl.h +++ b/folly/fibers/EventBaseLoopController-inl.h @@ -124,5 +124,5 @@ inline void EventBaseLoopController::timedSchedule( delay_ms = std::max(delay_ms, 0); eventBase_->tryRunAfterDelay(func, uint32_t(delay_ms)); } -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/EventBaseLoopController.h b/folly/fibers/EventBaseLoopController.h index cab36c0c..5bc4e8cf 100644 --- a/folly/fibers/EventBaseLoopController.h +++ b/folly/fibers/EventBaseLoopController.h @@ -107,7 +107,7 @@ class EventBaseLoopController : public LoopController { friend class FiberManager; }; -} -} // folly::fibers +} // namespace fibers +} // namespace folly #include "EventBaseLoopController-inl.h" diff --git a/folly/fibers/Fiber-inl.h b/folly/fibers/Fiber-inl.h index fe861330..3ca843f3 100644 --- a/folly/fibers/Fiber-inl.h +++ b/folly/fibers/Fiber-inl.h @@ -72,5 +72,5 @@ void Fiber::LocalData::dataHeapDestructor(void* ptr) { reinterpret_cast(ptr)->~T(); freeHeapBuffer(ptr); } -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/Fiber.cpp b/folly/fibers/Fiber.cpp index f5995de3..10a2e64b 100644 --- a/folly/fibers/Fiber.cpp +++ b/folly/fibers/Fiber.cpp @@ -49,7 +49,7 @@ static size_t nonMagicInBytes(unsigned char* stackLimit, size_t stackSize) { return (end - firstNonMagic) * sizeof(uint64_t); } -} // anonymous namespace +} // namespace void Fiber::resume() { DCHECK_EQ(state_, AWAITING); diff --git a/folly/fibers/FiberManagerInternal-inl.h b/folly/fibers/FiberManagerInternal-inl.h index 8e343b31..0b423a13 100644 --- a/folly/fibers/FiberManagerInternal-inl.h +++ b/folly/fibers/FiberManagerInternal-inl.h @@ -47,7 +47,7 @@ inline FiberManager::Options preprocessOptions(FiberManager::Options opts) { return opts; } -} // anonymous +} // namespace inline void FiberManager::ensureLoopScheduled() { if (isLoopScheduled_) { diff --git a/folly/fibers/ForEach-inl.h b/folly/fibers/ForEach-inl.h index b6f06247..073c14f8 100644 --- a/folly/fibers/ForEach-inl.h +++ b/folly/fibers/ForEach-inl.h @@ -35,7 +35,7 @@ typename std::enable_if< g(id); } -} // anonymous namespace +} // namespace template inline void forEach(InputIterator first, InputIterator last, F&& f) { @@ -83,5 +83,5 @@ inline void forEach(InputIterator first, InputIterator last, F&& f) { std::rethrow_exception(e); } } -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/ForEach.h b/folly/fibers/ForEach.h index 7482716d..b93aeb63 100644 --- a/folly/fibers/ForEach.h +++ b/folly/fibers/ForEach.h @@ -38,7 +38,7 @@ namespace fibers { */ template inline void forEach(InputIterator first, InputIterator last, F&& f); -} -} // folly::fibers +} // namespace fibers +} // namespace folly #include diff --git a/folly/fibers/GuardPageAllocator.cpp b/folly/fibers/GuardPageAllocator.cpp index 23194998..0c3be85d 100644 --- a/folly/fibers/GuardPageAllocator.cpp +++ b/folly/fibers/GuardPageAllocator.cpp @@ -319,5 +319,5 @@ void GuardPageAllocator::deallocate(unsigned char* limit, size_t size) { fallbackAllocator_.deallocate(limit, size); } } -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/GuardPageAllocator.h b/folly/fibers/GuardPageAllocator.h index 91dc3023..b2dfb841 100644 --- a/folly/fibers/GuardPageAllocator.h +++ b/folly/fibers/GuardPageAllocator.h @@ -52,5 +52,5 @@ class GuardPageAllocator { std::allocator fallbackAllocator_; bool useGuardPages_{true}; }; -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/LoopController.h b/folly/fibers/LoopController.h index a797d321..f459cfd3 100644 --- a/folly/fibers/LoopController.h +++ b/folly/fibers/LoopController.h @@ -64,5 +64,5 @@ class LoopController { */ virtual void timedSchedule(std::function func, TimePoint time) = 0; }; -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/SimpleLoopController.h b/folly/fibers/SimpleLoopController.h index e11cbc84..c41fb180 100644 --- a/folly/fibers/SimpleLoopController.h +++ b/folly/fibers/SimpleLoopController.h @@ -109,5 +109,5 @@ class SimpleLoopController : public LoopController { friend class FiberManager; }; -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/fibers/test/FibersTest.cpp b/folly/fibers/test/FibersTest.cpp index 9717ddaa..73e9b6d6 100644 --- a/folly/fibers/test/FibersTest.cpp +++ b/folly/fibers/test/FibersTest.cpp @@ -1916,7 +1916,7 @@ void validateResults( EXPECT_EQ(numResultsFilled, expectedNumResults); } -} // AtomicBatchDispatcherTesting +} // namespace AtomicBatchDispatcherTesting #define SET_UP_TEST_FUNC \ using namespace AtomicBatchDispatcherTesting; \ diff --git a/folly/fibers/traits.h b/folly/fibers/traits.h index 1f3b8b71..81527f76 100644 --- a/folly/fibers/traits.h +++ b/folly/fibers/traits.h @@ -52,7 +52,7 @@ struct ExtractFirstMemfn { typedef First type; }; -} // detail +} // namespace detail /** Default - use boost */ template @@ -67,5 +67,5 @@ struct FirstArgOf::value>::type> { typedef typename detail::ExtractFirstMemfn::type type; }; -} -} // folly::fibers +} // namespace fibers +} // namespace folly diff --git a/folly/futures/DrivableExecutor.h b/folly/futures/DrivableExecutor.h index 49b3c5d7..9f9b61e3 100644 --- a/folly/futures/DrivableExecutor.h +++ b/folly/futures/DrivableExecutor.h @@ -52,4 +52,4 @@ class DrivableExecutor : public virtual Executor { virtual void drive() = 0; }; -} // folly +} // namespace folly diff --git a/folly/futures/Future.h b/folly/futures/Future.h index 919b2391..babaeb13 100644 --- a/folly/futures/Future.h +++ b/folly/futures/Future.h @@ -533,6 +533,6 @@ class Future { } }; -} // folly +} // namespace folly #include diff --git a/folly/futures/ManualExecutor.cpp b/folly/futures/ManualExecutor.cpp index 7f69c413..b7e31654 100644 --- a/folly/futures/ManualExecutor.cpp +++ b/folly/futures/ManualExecutor.cpp @@ -87,4 +87,4 @@ void ManualExecutor::advanceTo(TimePoint const& t) { run(); } -} // folly +} // namespace folly diff --git a/folly/futures/QueuedImmediateExecutor.h b/folly/futures/QueuedImmediateExecutor.h index 4ab0cd63..b98047a0 100644 --- a/folly/futures/QueuedImmediateExecutor.h +++ b/folly/futures/QueuedImmediateExecutor.h @@ -36,4 +36,4 @@ class QueuedImmediateExecutor : public Executor { } }; -} // folly +} // namespace folly diff --git a/folly/futures/ThreadWheelTimekeeper.cpp b/folly/futures/ThreadWheelTimekeeper.cpp index eb1151f2..a2fd9cf4 100644 --- a/folly/futures/ThreadWheelTimekeeper.cpp +++ b/folly/futures/ThreadWheelTimekeeper.cpp @@ -141,6 +141,6 @@ std::shared_ptr getTimekeeperSingleton() { return timekeeperSingleton_.try_get(); } -} // detail +} // namespace detail -} // folly +} // namespace folly diff --git a/folly/futures/ThreadWheelTimekeeper.h b/folly/futures/ThreadWheelTimekeeper.h index fbb1da48..7adb08d7 100644 --- a/folly/futures/ThreadWheelTimekeeper.h +++ b/folly/futures/ThreadWheelTimekeeper.h @@ -45,4 +45,4 @@ class ThreadWheelTimekeeper : public Timekeeper { HHWheelTimer::UniquePtr wheelTimer_; }; -} // folly +} // namespace folly diff --git a/folly/futures/test/Benchmark.cpp b/folly/futures/test/Benchmark.cpp index e09546ff..f6d838d8 100644 --- a/folly/futures/test/Benchmark.cpp +++ b/folly/futures/test/Benchmark.cpp @@ -40,7 +40,7 @@ void someThens(size_t n) { } } -} // anonymous namespace +} // namespace BENCHMARK(constantFuture) { makeFuture(42); diff --git a/folly/futures/test/TestExecutor.cpp b/folly/futures/test/TestExecutor.cpp index fc57e6de..7f024127 100644 --- a/folly/futures/test/TestExecutor.cpp +++ b/folly/futures/test/TestExecutor.cpp @@ -69,4 +69,4 @@ void TestExecutor::addImpl(Func f) { cv_.notify_one(); } -} // folly +} // namespace folly diff --git a/folly/futures/test/TestExecutor.h b/folly/futures/test/TestExecutor.h index f022bc03..dc82a656 100644 --- a/folly/futures/test/TestExecutor.h +++ b/folly/futures/test/TestExecutor.h @@ -47,4 +47,4 @@ class TestExecutor : public Executor { std::vector workers_; }; -} // folly +} // namespace folly diff --git a/folly/gen/Base-inl.h b/folly/gen/Base-inl.h index 9f7c5d19..e7a8e415 100644 --- a/folly/gen/Base-inl.h +++ b/folly/gen/Base-inl.h @@ -2357,7 +2357,7 @@ inline detail::Skip skip(size_t count) { return detail::Skip(count); } inline detail::Batch batch(size_t batchSize) { return detail::Batch(batchSize); } -} // gen -} // folly +} // namespace gen +} // namespace folly FOLLY_POP_WARNING diff --git a/folly/gen/Base.h b/folly/gen/Base.h index fbc224cf..1f8a59ec 100644 --- a/folly/gen/Base.h +++ b/folly/gen/Base.h @@ -822,7 +822,7 @@ UnwrapOr unwrapOr(Fallback&& fallback) { return UnwrapOr(std::forward(fallback)); } -} // gen -} // folly +} // namespace gen +} // namespace folly #include diff --git a/folly/gen/Core-inl.h b/folly/gen/Core-inl.h index 3d6c988d..4c7d64b7 100644 --- a/folly/gen/Core-inl.h +++ b/folly/gen/Core-inl.h @@ -373,8 +373,8 @@ class Chain : public GenImpl class Chain; -} // detail -} // gen -} // folly +} // namespace detail +} // namespace gen +} // namespace folly #include diff --git a/folly/hash/SpookyHashV1.cpp b/folly/hash/SpookyHashV1.cpp index f291b472..dde53bca 100644 --- a/folly/hash/SpookyHashV1.cpp +++ b/folly/hash/SpookyHashV1.cpp @@ -383,5 +383,5 @@ void SpookyHashV1::Final(uint64_t *hash1, uint64_t *hash2) *hash2 = h1; } -} // namespace hash -} // namespace folly +} // namespace hash +} // namespace folly diff --git a/folly/hash/SpookyHashV1.h b/folly/hash/SpookyHashV1.h index bb457d5f..90460e0d 100644 --- a/folly/hash/SpookyHashV1.h +++ b/folly/hash/SpookyHashV1.h @@ -299,5 +299,5 @@ private: uint8_t m_remainder; // length of unhashed data stashed in m_data }; -} // namespace hash -} // namespace folly +} // namespace hash +} // namespace folly diff --git a/folly/hash/SpookyHashV2.cpp b/folly/hash/SpookyHashV2.cpp index 3a43b9f6..2ca531de 100644 --- a/folly/hash/SpookyHashV2.cpp +++ b/folly/hash/SpookyHashV2.cpp @@ -384,5 +384,5 @@ void SpookyHashV2::Final(uint64_t *hash1, uint64_t *hash2) const *hash2 = h1; } -} // namespace hash -} // namespace folly +} // namespace hash +} // namespace folly diff --git a/folly/hash/SpookyHashV2.h b/folly/hash/SpookyHashV2.h index 9cc3474a..1e154d41 100644 --- a/folly/hash/SpookyHashV2.h +++ b/folly/hash/SpookyHashV2.h @@ -304,5 +304,5 @@ private: uint8_t m_remainder; // length of unhashed data stashed in m_data }; -} // namespace hash -} // namespace folly +} // namespace hash +} // namespace folly diff --git a/folly/init/Init.h b/folly/init/Init.h index 85b726b7..3a120ba1 100644 --- a/folly/init/Init.h +++ b/folly/init/Init.h @@ -30,4 +30,4 @@ namespace folly { void init(int* argc, char*** argv, bool removeFlags = true); -} // folly +} // namespace folly diff --git a/folly/io/IOBuf.cpp b/folly/io/IOBuf.cpp index 80741e3e..40f74e7c 100644 --- a/folly/io/IOBuf.cpp +++ b/folly/io/IOBuf.cpp @@ -79,7 +79,7 @@ void takeOwnershipError(bool freeOnError, void* buf, } } -} // unnamed namespace +} // namespace namespace folly { @@ -1048,4 +1048,4 @@ bool IOBufEqual::operator()(const IOBuf& a, const IOBuf& b) const { } } -} // folly +} // namespace folly diff --git a/folly/io/IOBuf.h b/folly/io/IOBuf.h index 3e68f473..bbf698cd 100644 --- a/folly/io/IOBuf.h +++ b/folly/io/IOBuf.h @@ -218,7 +218,7 @@ struct IsUniquePtrToSL< std::unique_ptr, typename std::enable_if::value>::type> : public std::true_type { }; -} // namespace detail +} // namespace detail class IOBuf { public: @@ -1543,6 +1543,6 @@ class IOBuf::Iterator : public boost::iterator_facade< inline IOBuf::Iterator IOBuf::begin() const { return cbegin(); } inline IOBuf::Iterator IOBuf::end() const { return cend(); } -} // folly +} // namespace folly FOLLY_POP_WARNING diff --git a/folly/io/IOBufQueue.cpp b/folly/io/IOBufQueue.cpp index 33c97bc9..df1518e0 100644 --- a/folly/io/IOBufQueue.cpp +++ b/folly/io/IOBufQueue.cpp @@ -62,7 +62,7 @@ appendToChain(unique_ptr& dst, unique_ptr&& src, bool pack) { } } -} // anonymous namespace +} // namespace namespace folly { @@ -318,4 +318,4 @@ void IOBufQueue::gather(uint64_t maxLength) { } } -} // folly +} // namespace folly diff --git a/folly/io/IOBufQueue.h b/folly/io/IOBufQueue.h index c90deaf8..d4201fba 100644 --- a/folly/io/IOBufQueue.h +++ b/folly/io/IOBufQueue.h @@ -322,4 +322,4 @@ class IOBufQueue { std::unique_ptr head_; }; -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncPipe.cpp b/folly/io/async/AsyncPipe.cpp index d64a164d..ba5aac43 100644 --- a/folly/io/async/AsyncPipe.cpp +++ b/folly/io/async/AsyncPipe.cpp @@ -266,4 +266,4 @@ void AsyncPipeWriter::handleWrite() { } } -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncPipe.h b/folly/io/async/AsyncPipe.h index c98206e5..08db3a3e 100644 --- a/folly/io/async/AsyncPipe.h +++ b/folly/io/async/AsyncPipe.h @@ -179,4 +179,4 @@ class AsyncPipeWriter : public EventHandler, } }; -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncSSLSocket.cpp b/folly/io/async/AsyncSSLSocket.cpp index e6513f82..2b1aa88e 100644 --- a/folly/io/async/AsyncSSLSocket.cpp +++ b/folly/io/async/AsyncSSLSocket.cpp @@ -199,7 +199,7 @@ void* initsslBioMethod(void) { return nullptr; } -} // anonymous namespace +} // namespace namespace folly { diff --git a/folly/io/async/AsyncServerSocket.cpp b/folly/io/async/AsyncServerSocket.cpp index 985f3d3f..8a70d77c 100644 --- a/folly/io/async/AsyncServerSocket.cpp +++ b/folly/io/async/AsyncServerSocket.cpp @@ -1070,6 +1070,4 @@ void AsyncServerSocket::backoffTimeoutExpired() { } } - - -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncServerSocket.h b/folly/io/async/AsyncServerSocket.h index f7706126..fad20a01 100644 --- a/folly/io/async/AsyncServerSocket.h +++ b/folly/io/async/AsyncServerSocket.h @@ -876,4 +876,4 @@ class AsyncServerSocket : public DelayedDestruction ConnectionEventCallback* connectionEventCallback_{nullptr}; }; -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncSignalHandler.cpp b/folly/io/async/AsyncSignalHandler.cpp index 8c5c3247..b1a83cdd 100644 --- a/folly/io/async/AsyncSignalHandler.cpp +++ b/folly/io/async/AsyncSignalHandler.cpp @@ -99,4 +99,4 @@ void AsyncSignalHandler::libeventCallback(libevent_fd_t signum, handler->signalReceived(int(signum)); } -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncSignalHandler.h b/folly/io/async/AsyncSignalHandler.h index 05665533..39398f81 100644 --- a/folly/io/async/AsyncSignalHandler.h +++ b/folly/io/async/AsyncSignalHandler.h @@ -114,4 +114,4 @@ class AsyncSignalHandler { SignalEventMap signalEvents_; }; -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncSocket.cpp b/folly/io/async/AsyncSocket.cpp index f32da3a7..7f8c5f13 100644 --- a/folly/io/async/AsyncSocket.cpp +++ b/folly/io/async/AsyncSocket.cpp @@ -2523,4 +2523,4 @@ void AsyncSocket::setBufferCallback(BufferCallback* cb) { bufferCallback_ = cb; } -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncSocket.h b/folly/io/async/AsyncSocket.h index 09363a3c..beff1a07 100644 --- a/folly/io/async/AsyncSocket.h +++ b/folly/io/async/AsyncSocket.h @@ -1185,4 +1185,4 @@ class AsyncSocket : virtual public AsyncTransportWrapper { #pragma vtordisp(pop) #endif -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncSocketException.h b/folly/io/async/AsyncSocketException.h index 2033be05..7732b562 100644 --- a/folly/io/async/AsyncSocketException.h +++ b/folly/io/async/AsyncSocketException.h @@ -124,4 +124,4 @@ class AsyncSocketException : public std::runtime_error { } }; -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncTimeout.cpp b/folly/io/async/AsyncTimeout.cpp index 28c8bbc1..f08b7771 100644 --- a/folly/io/async/AsyncTimeout.cpp +++ b/folly/io/async/AsyncTimeout.cpp @@ -156,4 +156,4 @@ void AsyncTimeout::libeventCallback(libevent_fd_t fd, short events, void* arg) { timeout->timeoutExpired(); } -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncTimeout.h b/folly/io/async/AsyncTimeout.h index bb02efb2..dbe81dc8 100644 --- a/folly/io/async/AsyncTimeout.h +++ b/folly/io/async/AsyncTimeout.h @@ -260,7 +260,7 @@ struct async_timeout_wrapper: TCallback callback_; }; -} // namespace detail { +} // namespace detail template std::unique_ptr AsyncTimeout::make( @@ -286,4 +286,4 @@ std::unique_ptr AsyncTimeout::schedule( return wrapper; } -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncTransport.h b/folly/io/async/AsyncTransport.h index 337fba96..ca5cc4d2 100644 --- a/folly/io/async/AsyncTransport.h +++ b/folly/io/async/AsyncTransport.h @@ -694,4 +694,4 @@ class AsyncTransportWrapper : virtual public AsyncTransport, virtual std::string getSecurityProtocol() const { return ""; } }; -} // folly +} // namespace folly diff --git a/folly/io/async/AsyncUDPServerSocket.h b/folly/io/async/AsyncUDPServerSocket.h index f712dd00..d371fd4d 100644 --- a/folly/io/async/AsyncUDPServerSocket.h +++ b/folly/io/async/AsyncUDPServerSocket.h @@ -218,4 +218,4 @@ class AsyncUDPServerSocket : private AsyncUDPSocket::ReadCallback bool reusePort_{false}; }; -} // Namespace +} // namespace folly diff --git a/folly/io/async/AsyncUDPSocket.cpp b/folly/io/async/AsyncUDPSocket.cpp index 54ca73a2..4d195d36 100644 --- a/folly/io/async/AsyncUDPSocket.cpp +++ b/folly/io/async/AsyncUDPSocket.cpp @@ -297,4 +297,4 @@ bool AsyncUDPSocket::updateRegistration() noexcept { return registerHandler(uint16_t(flags | PERSIST)); } -} // Namespace +} // namespace folly diff --git a/folly/io/async/AsyncUDPSocket.h b/folly/io/async/AsyncUDPSocket.h index 892d9c90..21449420 100644 --- a/folly/io/async/AsyncUDPSocket.h +++ b/folly/io/async/AsyncUDPSocket.h @@ -188,4 +188,4 @@ class AsyncUDPSocket : public EventHandler { bool reusePort_{false}; }; -} // Namespace +} // namespace folly diff --git a/folly/io/async/DelayedDestruction.h b/folly/io/async/DelayedDestruction.h index c46b8ff0..9063d0cb 100644 --- a/folly/io/async/DelayedDestruction.h +++ b/folly/io/async/DelayedDestruction.h @@ -119,4 +119,4 @@ class DelayedDestruction : public DelayedDestructionBase { delete this; } }; -} // folly +} // namespace folly diff --git a/folly/io/async/DelayedDestructionBase.h b/folly/io/async/DelayedDestructionBase.h index 2b329db1..5edd64bd 100644 --- a/folly/io/async/DelayedDestructionBase.h +++ b/folly/io/async/DelayedDestructionBase.h @@ -304,4 +304,4 @@ inline bool operator !=( const DelayedDestructionBase::IntrusivePtr& right) { return left != right.get(); } -} // folly +} // namespace folly diff --git a/folly/io/async/EventBase.cpp b/folly/io/async/EventBase.cpp index 11c3a601..7ef3c8a3 100644 --- a/folly/io/async/EventBase.cpp +++ b/folly/io/async/EventBase.cpp @@ -756,4 +756,4 @@ VirtualEventBase& EventBase::getVirtualEventBase() { return *virtualEventBase_; } -} // folly +} // namespace folly diff --git a/folly/io/async/EventBase.h b/folly/io/async/EventBase.h index 2982a646..303fd42f 100644 --- a/folly/io/async/EventBase.h +++ b/folly/io/async/EventBase.h @@ -779,4 +779,4 @@ bool EventBase::runImmediatelyOrRunInEventBaseThreadAndWait( return runImmediatelyOrRunInEventBaseThreadAndWait([=] { fn(arg); }); } -} // folly +} // namespace folly diff --git a/folly/io/async/EventBaseManager.cpp b/folly/io/async/EventBaseManager.cpp index 7efc8af0..26c3ac56 100644 --- a/folly/io/async/EventBaseManager.cpp +++ b/folly/io/async/EventBaseManager.cpp @@ -87,4 +87,4 @@ EventBase * EventBaseManager::getEventBase() const { return info->eventBase; } -} // folly +} // namespace folly diff --git a/folly/io/async/EventBaseManager.h b/folly/io/async/EventBaseManager.h index 31de2015..d4f91e51 100644 --- a/folly/io/async/EventBaseManager.h +++ b/folly/io/async/EventBaseManager.h @@ -158,4 +158,4 @@ class EventBaseManager { std::shared_ptr observer_; }; -} // folly +} // namespace folly diff --git a/folly/io/async/EventHandler.cpp b/folly/io/async/EventHandler.cpp index 72a37400..66f6e246 100644 --- a/folly/io/async/EventHandler.cpp +++ b/folly/io/async/EventHandler.cpp @@ -178,4 +178,4 @@ bool EventHandler::isPending() const { return false; } -} // folly +} // namespace folly diff --git a/folly/io/async/EventHandler.h b/folly/io/async/EventHandler.h index 80c405e5..59be7bf9 100644 --- a/folly/io/async/EventHandler.h +++ b/folly/io/async/EventHandler.h @@ -185,4 +185,4 @@ class EventHandler : private boost::noncopyable { EventBase* eventBase_; }; -} // folly +} // namespace folly diff --git a/folly/io/async/EventUtil.h b/folly/io/async/EventUtil.h index fef7990d..2a1e6135 100644 --- a/folly/io/async/EventUtil.h +++ b/folly/io/async/EventUtil.h @@ -56,4 +56,4 @@ class EventUtil { } }; -} // folly +} // namespace folly diff --git a/folly/io/async/HHWheelTimer.cpp b/folly/io/async/HHWheelTimer.cpp index 8354d4ca..96ad8afc 100644 --- a/folly/io/async/HHWheelTimer.cpp +++ b/folly/io/async/HHWheelTimer.cpp @@ -314,4 +314,4 @@ int64_t HHWheelTimer::calcNextTick() { } } -} // folly +} // namespace folly diff --git a/folly/io/async/HHWheelTimer.h b/folly/io/async/HHWheelTimer.h index 89cf1f17..d670e3ba 100644 --- a/folly/io/async/HHWheelTimer.h +++ b/folly/io/async/HHWheelTimer.h @@ -299,4 +299,4 @@ class HHWheelTimer : private folly::AsyncTimeout, } }; -} // folly +} // namespace folly diff --git a/folly/io/async/NotificationQueue.h b/folly/io/async/NotificationQueue.h index e57ef661..048d0f9b 100644 --- a/folly/io/async/NotificationQueue.h +++ b/folly/io/async/NotificationQueue.h @@ -884,4 +884,4 @@ NotificationQueue::Consumer::make(TCallback&& callback) { std::forward(callback))); } -} // folly +} // namespace folly diff --git a/folly/io/async/SSLContext.cpp b/folly/io/async/SSLContext.cpp index 501245ba..29b202f8 100644 --- a/folly/io/async/SSLContext.cpp +++ b/folly/io/async/SSLContext.cpp @@ -699,4 +699,4 @@ operator<<(std::ostream& os, const PasswordCollector& collector) { return os; } -} // folly +} // namespace folly diff --git a/folly/io/async/SSLContext.h b/folly/io/async/SSLContext.h index 73cfedf2..ded583f5 100644 --- a/folly/io/async/SSLContext.h +++ b/folly/io/async/SSLContext.h @@ -553,4 +553,4 @@ std::ostream& operator<<( std::ostream& os, const folly::PasswordCollector& collector); -} // folly +} // namespace folly diff --git a/folly/io/async/SSLOptions.cpp b/folly/io/async/SSLOptions.cpp index 88e042e6..bada56c3 100644 --- a/folly/io/async/SSLOptions.cpp +++ b/folly/io/async/SSLOptions.cpp @@ -74,5 +74,5 @@ void SSLCommonOptions::setClientOptions(SSLContext& ctx) { setSignatureAlgorithms(ctx); } -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/io/async/SSLOptions.h b/folly/io/async/SSLOptions.h index 22ab52ed..963cad27 100644 --- a/folly/io/async/SSLOptions.h +++ b/folly/io/async/SSLOptions.h @@ -62,5 +62,5 @@ void setSignatureAlgorithms(SSLContext& ctx) { } } -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/io/async/TimeoutManager.h b/folly/io/async/TimeoutManager.h index 96af4c2c..f331f08f 100644 --- a/folly/io/async/TimeoutManager.h +++ b/folly/io/async/TimeoutManager.h @@ -103,4 +103,4 @@ class TimeoutManager { std::unique_ptr cobTimeouts_; }; -} // folly +} // namespace folly diff --git a/folly/io/async/ssl/OpenSSLUtils.cpp b/folly/io/async/ssl/OpenSSLUtils.cpp index 91e114a0..832818eb 100644 --- a/folly/io/async/ssl/OpenSSLUtils.cpp +++ b/folly/io/async/ssl/OpenSSLUtils.cpp @@ -310,8 +310,8 @@ void OpenSSLUtils::setBioFd(BIO* b, int fd, int flags) { BIO_set_fd(b, sock, flags); } -} // ssl -} // folly +} // namespace ssl +} // namespace folly namespace { #ifdef OPENSSL_IS_BORINGSSL diff --git a/folly/io/async/ssl/OpenSSLUtils.h b/folly/io/async/ssl/OpenSSLUtils.h index 8914315a..c92cb602 100644 --- a/folly/io/async/ssl/OpenSSLUtils.h +++ b/folly/io/async/ssl/OpenSSLUtils.h @@ -122,5 +122,5 @@ class OpenSSLUtils { static void setBioFd(BIO* b, int fd, int flags); }; -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/io/async/ssl/TLSDefinitions.h b/folly/io/async/ssl/TLSDefinitions.h index ca0a24b0..21e8efef 100644 --- a/folly/io/async/ssl/TLSDefinitions.h +++ b/folly/io/async/ssl/TLSDefinitions.h @@ -88,5 +88,5 @@ struct ClientHelloInfo { std::vector clientHelloSupportedVersions_; }; -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/io/async/test/AsyncPipeTest.cpp b/folly/io/async/test/AsyncPipeTest.cpp index 1259e547..ce69a236 100644 --- a/folly/io/async/test/AsyncPipeTest.cpp +++ b/folly/io/async/test/AsyncPipeTest.cpp @@ -124,8 +124,7 @@ std::unique_ptr getBuf(const std::string& data) { return buf; } -} // anonymous namespace - +} // namespace TEST_F(AsyncPipeTest, simple) { for (int pass = 0; pass < 2; ++pass) { diff --git a/folly/io/async/test/AsyncSSLSocketTest.cpp b/folly/io/async/test/AsyncSSLSocketTest.cpp index a8e4e448..e09ca7fb 100644 --- a/folly/io/async/test/AsyncSSLSocketTest.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest.cpp @@ -2188,5 +2188,5 @@ struct Initializer { } }; Initializer initializer; -} // anonymous +} // namespace #endif diff --git a/folly/io/async/test/AsyncSSLSocketTest2.cpp b/folly/io/async/test/AsyncSSLSocketTest2.cpp index 9b214785..eb5490c9 100644 --- a/folly/io/async/test/AsyncSSLSocketTest2.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest2.cpp @@ -190,8 +190,7 @@ TEST(AsyncSSLSocketTest2, AttachDetachSSLContext) { EXPECT_TRUE(f.within(std::chrono::seconds(3)).get()); } - -} // folly +} // namespace folly int main(int argc, char *argv[]) { #ifdef SIGPIPE diff --git a/folly/io/async/test/AsyncTimeoutTest.cpp b/folly/io/async/test/AsyncTimeoutTest.cpp index 8f2dd830..629d6786 100644 --- a/folly/io/async/test/AsyncTimeoutTest.cpp +++ b/folly/io/async/test/AsyncTimeoutTest.cpp @@ -89,4 +89,4 @@ TEST(AsyncTimeout, cancel_schedule) { EXPECT_NE(expected, value); } -} // namespace folly { +} // namespace folly diff --git a/folly/io/async/test/SSLContextInitializationTest.cpp b/folly/io/async/test/SSLContextInitializationTest.cpp index 656337a5..0f536fa1 100644 --- a/folly/io/async/test/SSLContextInitializationTest.cpp +++ b/folly/io/async/test/SSLContextInitializationTest.cpp @@ -97,7 +97,7 @@ TEST(SSLContextInitializationTest, SSLContextLocksSetAfterInitIgnored) { ::testing::ExitedWithCode(0), "SSLContextLocksSetAfterInitIgnored passed"); } -} // folly +} // namespace folly int main(int argc, char* argv[]) { #ifdef SIGPIPE diff --git a/folly/memory/UninitializedMemoryHacks.h b/folly/memory/UninitializedMemoryHacks.h index a363e102..92145ec9 100644 --- a/folly/memory/UninitializedMemoryHacks.h +++ b/folly/memory/UninitializedMemoryHacks.h @@ -30,7 +30,7 @@ namespace { // allowing the resulting methods to be inline-able. If you think that // seems hacky keep reading... struct FollyMemoryDetailTranslationUnitTag {}; -} // anon namespace +} // namespace namespace folly { namespace detail { void unsafeStringSetLargerSize(std::string& s, std::size_t n); diff --git a/folly/python/NotificationQueueExecutor.h b/folly/python/NotificationQueueExecutor.h index a9e370fb..7bd8f2a4 100644 --- a/folly/python/NotificationQueueExecutor.h +++ b/folly/python/NotificationQueueExecutor.h @@ -55,5 +55,5 @@ class NotificationQueueExecutor : public folly::DrivableExecutor { folly::NotificationQueue::SimpleConsumer consumer_{queue_}; }; // NotificationQueueExecutor -} // python -} // folly +} // namespace python +} // namespace folly diff --git a/folly/python/futures.h b/folly/python/futures.h index 4f814f0f..dbf0e9b1 100644 --- a/folly/python/futures.h +++ b/folly/python/futures.h @@ -75,5 +75,5 @@ void bridgeFuture( getExecutor(), std::move(futureFrom), std::move(callback), userData); } -} // python -} // folly +} // namespace python +} // namespace folly diff --git a/folly/small_vector.h b/folly/small_vector.h index 0e148ef7..f28f4dfb 100644 --- a/folly/small_vector.h +++ b/folly/small_vector.h @@ -74,7 +74,7 @@ struct NoHeap; ////////////////////////////////////////////////////////////////////// -} // small_vector_policy +} // namespace small_vector_policy ////////////////////////////////////////////////////////////////////// @@ -1143,8 +1143,8 @@ struct IndexableTraits> : public IndexableTraitsSeq> { }; -} // namespace detail +} // namespace detail -} // namespace folly +} // namespace folly FOLLY_POP_WARNING diff --git a/folly/ssl/Init.cpp b/folly/ssl/Init.cpp index c6e8ba35..91c41b06 100644 --- a/folly/ssl/Init.cpp +++ b/folly/ssl/Init.cpp @@ -92,5 +92,5 @@ bool isLockDisabled(int lockId) { return detail::isSSLLockDisabled(lockId); } -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/ssl/Init.h b/folly/ssl/Init.h index 98a4fab9..e1f9273a 100644 --- a/folly/ssl/Init.h +++ b/folly/ssl/Init.h @@ -82,5 +82,5 @@ bool isLockDisabled(int lockId); void randomize(); -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/ssl/OpenSSLCertUtils.cpp b/folly/ssl/OpenSSLCertUtils.cpp index d45daa6d..45c6d388 100644 --- a/folly/ssl/OpenSSLCertUtils.cpp +++ b/folly/ssl/OpenSSLCertUtils.cpp @@ -196,5 +196,5 @@ std::unique_ptr OpenSSLCertUtils::derEncode(X509& x509) { buf->append(len); return buf; } -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/ssl/OpenSSLLockTypes.h b/folly/ssl/OpenSSLLockTypes.h index 0e03c1f7..dfbbe5a5 100644 --- a/folly/ssl/OpenSSLLockTypes.h +++ b/folly/ssl/OpenSSLLockTypes.h @@ -28,5 +28,5 @@ enum class LockType { MUTEX, SPINLOCK, SHAREDMUTEX, NONE }; */ using LockTypeMapping = std::map; -} // ssl -} // folly +} // namespace ssl +} // namespace folly diff --git a/folly/ssl/detail/OpenSSLThreading.cpp b/folly/ssl/detail/OpenSSLThreading.cpp index c9402b35..05b551a7 100644 --- a/folly/ssl/detail/OpenSSLThreading.cpp +++ b/folly/ssl/detail/OpenSSLThreading.cpp @@ -106,7 +106,7 @@ struct SSLLock { std::mutex mutex; SharedMutex sharedMutex; }; -} // end anonymous namespace +} // namespace // Statics are unsafe in environments that call exit(). // If one thread calls exit() while another thread is @@ -173,6 +173,6 @@ void cleanupThreadingLocks() { locks().reset(); } -} // detail -} // ssl -} // folly +} // namespace detail +} // namespace ssl +} // namespace folly diff --git a/folly/stats/BucketedTimeSeries-defs.h b/folly/stats/BucketedTimeSeries-defs.h index d30d7934..f20f56cf 100644 --- a/folly/stats/BucketedTimeSeries-defs.h +++ b/folly/stats/BucketedTimeSeries-defs.h @@ -525,4 +525,4 @@ void BucketedTimeSeries::forEachBucket( }); } -} // folly +} // namespace folly diff --git a/folly/stats/BucketedTimeSeries.h b/folly/stats/BucketedTimeSeries.h index 47adc6a9..02c7a893 100644 --- a/folly/stats/BucketedTimeSeries.h +++ b/folly/stats/BucketedTimeSeries.h @@ -487,4 +487,4 @@ class BucketedTimeSeries { std::vector buckets_; // actual buckets of values }; -} // folly +} // namespace folly diff --git a/folly/stats/Histogram-defs.h b/folly/stats/Histogram-defs.h index e126417b..bb5af62b 100644 --- a/folly/stats/Histogram-defs.h +++ b/folly/stats/Histogram-defs.h @@ -243,7 +243,7 @@ T HistogramBuckets::getPercentileEstimate( } } -} // detail +} // namespace detail template std::string Histogram::debugString() const { @@ -284,4 +284,4 @@ void Histogram::toTSV(std::ostream& out, bool skipEmptyBuckets) const { } } -} // folly +} // namespace folly diff --git a/folly/stats/Histogram.cpp b/folly/stats/Histogram.cpp index 6f54a874..c138005e 100644 --- a/folly/stats/Histogram.cpp +++ b/folly/stats/Histogram.cpp @@ -52,4 +52,4 @@ detail::HistogramBuckets::Bucket>:: computeTotalCount::CountFromBucket>( Histogram::CountFromBucket countFromBucket) const; -} // folly +} // namespace folly diff --git a/folly/stats/Histogram.h b/folly/stats/Histogram.h index 688f479a..0be9e160 100644 --- a/folly/stats/Histogram.h +++ b/folly/stats/Histogram.h @@ -226,7 +226,7 @@ class HistogramBuckets { std::vector buckets_; }; -} // detail +} // namespace detail /* * A basic histogram class. @@ -478,4 +478,4 @@ class Histogram { detail::HistogramBuckets buckets_; }; -} // folly +} // namespace folly diff --git a/folly/stats/MultiLevelTimeSeries.h b/folly/stats/MultiLevelTimeSeries.h index d862bb6b..71154c00 100644 --- a/folly/stats/MultiLevelTimeSeries.h +++ b/folly/stats/MultiLevelTimeSeries.h @@ -437,4 +437,4 @@ class MultiLevelTimeSeries { uint64_t cachedCount_; }; -} // folly +} // namespace folly diff --git a/folly/test/BatonTestHelpers.h b/folly/test/BatonTestHelpers.h index 7dfdc81d..3a48a215 100644 --- a/folly/test/BatonTestHelpers.h +++ b/folly/test/BatonTestHelpers.h @@ -167,5 +167,5 @@ void run_multi_producer_tests() { DSched::join(cons); } -} // namespace test { -} // namespace folly { +} // namespace test +} // namespace folly diff --git a/folly/test/BitIteratorTest.cpp b/folly/test/BitIteratorTest.cpp index 49001d86..23083364 100644 --- a/folly/test/BitIteratorTest.cpp +++ b/folly/test/BitIteratorTest.cpp @@ -55,7 +55,7 @@ void checkRange(INT exp, IT begin, IT end) { } } -} // namespace +} // namespace TEST(BitIterator, Simple) { std::vector v; diff --git a/folly/test/BitsTest.cpp b/folly/test/BitsTest.cpp index af6945f6..810241e1 100644 --- a/folly/test/BitsTest.cpp +++ b/folly/test/BitsTest.cpp @@ -63,7 +63,7 @@ void testFLS() { } } -} // namespace +} // namespace TEST(Bits, FindFirstSet) { testFFS(); diff --git a/folly/test/ConcurrentSkipListTest.cpp b/folly/test/ConcurrentSkipListTest.cpp index 87f416b7..35651eb5 100644 --- a/folly/test/ConcurrentSkipListTest.cpp +++ b/folly/test/ConcurrentSkipListTest.cpp @@ -492,7 +492,7 @@ TEST(ConcurrentSkipList, NonTrivialDeallocationWithSysArena) { TestNonTrivialDeallocation(list); } -} // namespace +} // namespace int main(int argc, char* argv[]) { testing::InitGoogleTest(&argc, argv); diff --git a/folly/test/DemangleTest.cpp b/folly/test/DemangleTest.cpp index 5cbe1345..887af44c 100644 --- a/folly/test/DemangleTest.cpp +++ b/folly/test/DemangleTest.cpp @@ -23,7 +23,7 @@ using folly::demangle; namespace folly_test { struct ThisIsAVeryLongStructureName { }; -} // namespace folly_test +} // namespace folly_test #if FOLLY_HAVE_CPLUS_DEMANGLE_V3_CALLBACK TEST(Demangle, demangle) { diff --git a/folly/test/DeterministicSchedule.h b/folly/test/DeterministicSchedule.h index 8f1f4283..0f243d36 100644 --- a/folly/test/DeterministicSchedule.h +++ b/folly/test/DeterministicSchedule.h @@ -482,8 +482,8 @@ struct DeterministicMutex { m.unlock(); } }; -} -} // namespace folly::test +} // namespace test +} // namespace folly /* Specialization declarations */ @@ -499,9 +499,9 @@ FutexResult Futex::futexWaitImpl( std::chrono::time_point* absSystemTime, std::chrono::time_point* absSteadyTime, uint32_t waitMask); -} +} // namespace detail template <> Getcpu::Func AccessSpreader::pickGetcpuFunc(); -} // namespace folly::detail +} // namespace folly diff --git a/folly/test/DeterministicScheduleTest.cpp b/folly/test/DeterministicScheduleTest.cpp index f494ad37..0d023df7 100644 --- a/folly/test/DeterministicScheduleTest.cpp +++ b/folly/test/DeterministicScheduleTest.cpp @@ -104,7 +104,7 @@ TEST(DeterministicSchedule, buggyAdd) { } } } // for bug -} // TEST +} /// Test DSched support for auxiliary data and global invariants /// diff --git a/folly/test/ExceptionWrapperTest.cpp b/folly/test/ExceptionWrapperTest.cpp index f6f00f38..e182196d 100644 --- a/folly/test/ExceptionWrapperTest.cpp +++ b/folly/test/ExceptionWrapperTest.cpp @@ -458,7 +458,7 @@ class TestException : public std::exception { }; void testEW(const exception_wrapper& ew) { EXPECT_THROW(ew.throw_exception(), TestException); } -} // namespace +} // namespace TEST(ExceptionWrapper, implicitConstruction) { // Try with both lvalue and rvalue references diff --git a/folly/test/FBStringTest.cpp b/folly/test/FBStringTest.cpp index 92f32eb3..0d0c20fd 100644 --- a/folly/test/FBStringTest.cpp +++ b/folly/test/FBStringTest.cpp @@ -1419,7 +1419,7 @@ struct TestStructStringAllocator : std::allocator { } }; -} // anon namespace +} // namespace TEST(FBStringCtorTest, DefaultInitStructDefaultAlloc) { TestStructDefaultAllocator t1 { }; diff --git a/folly/test/FileTest.cpp b/folly/test/FileTest.cpp index 24342671..1ee680c1 100644 --- a/folly/test/FileTest.cpp +++ b/folly/test/FileTest.cpp @@ -32,7 +32,7 @@ void expectOK(ssize_t r) { int savedErrno = errno; EXPECT_LE(0, r) << ": errno=" << errnoStr(savedErrno); } -} // namespace +} // namespace TEST(File, Simple) { // Open a file, ensure it's indeed open for reading diff --git a/folly/test/FileUtilTest.cpp b/folly/test/FileUtilTest.cpp index dee3e2a5..8b6f7437 100644 --- a/folly/test/FileUtilTest.cpp +++ b/folly/test/FileUtilTest.cpp @@ -128,7 +128,7 @@ ssize_t Reader::operator()(int fd, const iovec* iov, int count, off_t offset) { return operator()(fd, iov, count); } -} // namespace +} // namespace class FileUtilTest : public ::testing::Test { protected: diff --git a/folly/test/FingerprintBenchmark.cpp b/folly/test/FingerprintBenchmark.cpp index cd02a111..012d3ddf 100644 --- a/folly/test/FingerprintBenchmark.cpp +++ b/folly/test/FingerprintBenchmark.cpp @@ -117,8 +117,7 @@ void fastFingerprintTerms128(int num_iterations, int num_ids) { fingerprintTerms >(num_iterations, num_ids); } - -} // namespace +} // namespace // Only benchmark one size of slowFingerprint; it's significantly slower // than fastFingeprint (as you can see for 64 bits) and it just slows down diff --git a/folly/test/FormatOtherTest.cpp b/folly/test/FormatOtherTest.cpp index a7477fe1..35b39263 100644 --- a/folly/test/FormatOtherTest.cpp +++ b/folly/test/FormatOtherTest.cpp @@ -96,7 +96,7 @@ void testFormatSeq() { EXPECT_EQ("10 20 0030", svformat("{} {} {:04}", v)); } -} // namespace +} // namespace TEST(FormatOther, fbvector) { testFormatSeq>(); diff --git a/folly/test/FormatTest.cpp b/folly/test/FormatTest.cpp index 8315c16d..535c6ceb 100644 --- a/folly/test/FormatTest.cpp +++ b/folly/test/FormatTest.cpp @@ -333,7 +333,7 @@ struct KeyValue { int value; }; -} // namespace +} // namespace namespace folly { diff --git a/folly/test/GroupVarintTest.cpp b/folly/test/GroupVarintTest.cpp index b224674d..95a688f2 100644 --- a/folly/test/GroupVarintTest.cpp +++ b/folly/test/GroupVarintTest.cpp @@ -119,7 +119,7 @@ void testGroupVarint64(uint64_t a, uint64_t b, uint64_t c, uint64_t d, EXPECT_EQ(e, fe); } -} // namespace +} // namespace TEST(GroupVarint, GroupVarint32) { EXPECT_EQ(0, GroupVarint32::maxSize(0)); diff --git a/folly/test/HashTest.cpp b/folly/test/HashTest.cpp index 070cf78f..dd03242b 100644 --- a/folly/test/HashTest.cpp +++ b/folly/test/HashTest.cpp @@ -129,7 +129,7 @@ void checkTWang(uint64_t r) { uint64_t result = twang_mix64(r); EXPECT_EQ(r, twang_unmix64(result)); } -} // namespace +} // namespace TEST(Hash, TWang_Unmix64) { // We'll try (1 << i), (1 << i) + 1, (1 << i) - 1 @@ -167,7 +167,7 @@ void checkJenkins(uint32_t r) { uint32_t result = jenkins_rev_mix32(r); EXPECT_EQ(r, jenkins_rev_unmix32(result)); } -} // namespace +} // namespace TEST(Hash, Jenkins_Rev_Unmix32) { // We'll try (1 << i), (1 << i) + 1, (1 << i) - 1 diff --git a/folly/test/MemoryMappingTest.cpp b/folly/test/MemoryMappingTest.cpp index af37fc4d..958f97c3 100644 --- a/folly/test/MemoryMappingTest.cpp +++ b/folly/test/MemoryMappingTest.cpp @@ -104,7 +104,7 @@ void writeStringToFileOrDie(const std::string& str, int fd) { } while (r != 0 && count); } -} // anonymous namespace +} // namespace TEST(MemoryMapping, Simple) { File f = File::temporary(); diff --git a/folly/test/OverloadTest.cpp b/folly/test/OverloadTest.cpp index 697b2dec..d916ed9b 100644 --- a/folly/test/OverloadTest.cpp +++ b/folly/test/OverloadTest.cpp @@ -98,5 +98,5 @@ TEST(Overload, Pattern) { EXPECT_FALSE(variant_match(two, is_one_copy)); EXPECT_FALSE(variant_match(two, is_one_const_copy)); } -} -} // folly::test +} // namespace test +} // namespace folly diff --git a/folly/test/RangeFindBenchmark.cpp b/folly/test/RangeFindBenchmark.cpp index ec15a1cc..228b3b13 100644 --- a/folly/test/RangeFindBenchmark.cpp +++ b/folly/test/RangeFindBenchmark.cpp @@ -113,7 +113,7 @@ void initDelims(int len) { } } -} // anonymous namespace +} // namespace BENCHMARK(FindSingleCharMemchr, n) { StringPiece haystack(str); diff --git a/folly/test/ReplaceableTest.cpp b/folly/test/ReplaceableTest.cpp index 6ab88509..9e29ddaa 100644 --- a/folly/test/ReplaceableTest.cpp +++ b/folly/test/ReplaceableTest.cpp @@ -70,7 +70,7 @@ struct OddA { struct Indestructible { ~Indestructible() = delete; }; -} // anonymous namespace +} // namespace template struct ReplaceableStaticAttributeTest : Test {}; diff --git a/folly/test/SingletonTest.cpp b/folly/test/SingletonTest.cpp index 67f88f1a..c28fb225 100644 --- a/folly/test/SingletonTest.cpp +++ b/folly/test/SingletonTest.cpp @@ -518,7 +518,7 @@ class TestEagerInitParallelExecutor : public folly::Executor { std::vector> threads_; std::atomic counter_ {0}; }; -} // namespace +} // namespace namespace { struct EagerInitParallelTag {}; diff --git a/folly/test/SpinLockTest.cpp b/folly/test/SpinLockTest.cpp index 1f53d76f..a924364d 100644 --- a/folly/test/SpinLockTest.cpp +++ b/folly/test/SpinLockTest.cpp @@ -134,7 +134,7 @@ void trylockTest() { EXPECT_GE(state.failed + 1, state.obtained); } -} // unnamed namespace +} // namespace TEST(SpinLock, Correctness) { correctnessTest(); diff --git a/folly/test/StringTest.cpp b/folly/test/StringTest.cpp index e95a6f70..e9d56047 100644 --- a/folly/test/StringTest.cpp +++ b/folly/test/StringTest.cpp @@ -224,7 +224,7 @@ void expectPrintable(StringPiece s) { EXPECT_GE(127, c); } } -} // namespace +} // namespace TEST(Escape, uriEscapeAllCombinations) { char c[3]; @@ -252,7 +252,7 @@ bool isHex(int v) { (v >= 'A' && v <= 'F') || (v >= 'a' && v <= 'f')); } -} // namespace +} // namespace TEST(Escape, uriUnescapePercentDecoding) { char c[4] = {'%', '\0', '\0', '\0'}; @@ -283,7 +283,7 @@ double pow2(int exponent) { return double(int64_t(1) << exponent); } -} // namespace +} // namespace struct PrettyTestCase{ std::string prettyString; double realValue; @@ -1119,7 +1119,7 @@ void testToLowerAscii(Range src) { } } -} // anon namespace +} // namespace TEST(String, toLowerAsciiAligned) { static const size_t kSize = 256; diff --git a/folly/test/SubprocessTest.cpp b/folly/test/SubprocessTest.cpp index 43622cd3..8a37f928 100644 --- a/folly/test/SubprocessTest.cpp +++ b/folly/test/SubprocessTest.cpp @@ -457,7 +457,7 @@ bool readToString(int fd, std::string& buf, size_t maxSize) { return (n == 0); } -} // namespace +} // namespace TEST(CommunicateSubprocessTest, Chatty) { checkFdLeak([] { diff --git a/folly/test/SubprocessTestParentDeathHelper.cpp b/folly/test/SubprocessTestParentDeathHelper.cpp index 100cc81f..6c9a17ee 100644 --- a/folly/test/SubprocessTestParentDeathHelper.cpp +++ b/folly/test/SubprocessTestParentDeathHelper.cpp @@ -39,7 +39,7 @@ DEFINE_bool(child, false, ""); namespace { constexpr int kSignal = SIGUSR1; -} // namespace +} // namespace void runChild(const char* file) { // Block SIGUSR1 so it's queued diff --git a/folly/test/ThreadCachedArenaTest.cpp b/folly/test/ThreadCachedArenaTest.cpp index 8471e939..1d24c77a 100644 --- a/folly/test/ThreadCachedArenaTest.cpp +++ b/folly/test/ThreadCachedArenaTest.cpp @@ -89,7 +89,7 @@ void ArenaTester::merge(ArenaTester&& other) { other.areas_.clear(); } -} // namespace +} // namespace TEST(ThreadCachedArena, BlockSize) { static const size_t alignment = folly::max_align_v; @@ -241,8 +241,7 @@ BENCHMARK(bmMArena, iters) { BENCHMARK_DRAW_LINE() -} // namespace - +} // namespace // Benchmark Iters Total t t/iter iter/sec // ---------------------------------------------------------------------------- diff --git a/folly/test/ThreadLocalTest.cpp b/folly/test/ThreadLocalTest.cpp index fc9bdefb..90d9f63c 100644 --- a/folly/test/ThreadLocalTest.cpp +++ b/folly/test/ThreadLocalTest.cpp @@ -345,7 +345,7 @@ struct Tag {}; struct Foo { folly::ThreadLocal tl; }; -} // namespace +} // namespace TEST(ThreadLocal, Movable1) { Foo a; @@ -415,7 +415,7 @@ class FillObject { uint64_t data_[kFillObjectSize]; }; -} // namespace +} // namespace TEST(ThreadLocal, Stress) { static constexpr size_t numFillObjects = 250; @@ -473,7 +473,7 @@ int totalValue() { return value; } -} // namespace +} // namespace #ifdef FOLLY_HAVE_PTHREAD_ATFORK TEST(ThreadLocal, Fork) { diff --git a/folly/test/TokenBucketTest.h b/folly/test/TokenBucketTest.h index 5c44537b..3d6fae3e 100644 --- a/folly/test/TokenBucketTest.h +++ b/folly/test/TokenBucketTest.h @@ -24,4 +24,4 @@ namespace folly { struct TokenBucketTest : public ::testing::TestWithParam > {}; -} // folly +} // namespace folly diff --git a/folly/test/VarintTest.cpp b/folly/test/VarintTest.cpp index 8b8a1856..6f2b1bd0 100644 --- a/folly/test/VarintTest.cpp +++ b/folly/test/VarintTest.cpp @@ -183,8 +183,7 @@ BENCHMARK(VarintDecoding, iters) { } } -} // namespace - +} // namespace }} // namespaces int main(int argc, char *argv[]) { -- 2.34.1