Apply clang-format to folly/experimental/symbolizer/
[folly.git] / folly / experimental / symbolizer / StackTrace.cpp
index 33e54de2a064d77699a890741f5f38420e63787c..c58af4a7c43705992cecb186dcc48ebe3d50df44 100644 (file)
 #define UNW_LOCAL_ONLY 1
 #include <libunwind.h>
 
-namespace folly { namespace symbolizer {
+namespace folly {
+namespace symbolizer {
 
 ssize_t getStackTrace(uintptr_t* addresses, size_t maxAddresses) {
-  static_assert(sizeof(uintptr_t) == sizeof(void*),
-                "uinptr_t / pointer size mismatch");
+  static_assert(
+      sizeof(uintptr_t) == sizeof(void*), "uinptr_t / pointer size mismatch");
   // The libunwind documentation says that unw_backtrace is async-signal-safe
   // but, as of libunwind 1.0.1, it isn't (tdep_trace allocates memory on
   // x86_64)
@@ -48,7 +49,7 @@ inline bool getFrameInfo(unw_cursor_t* cursor, uintptr_t& ip) {
   ip = uip - (r == 0);
   return true;
 }
-}  // namespace
+} // namespace
 
 ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses) {
   if (maxAddresses == 0) {
@@ -81,5 +82,5 @@ ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses) {
   }
   return count;
 }
-
-}}  // namespaces
+} // namespace symbolizer
+} // namespace folly