From 8602c65719bc22a7dd7a71bac74ffc0ff7d12cfb Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 5 Jun 2012 14:05:09 +0000 Subject: [PATCH] [Sanitizer] remove using namespace __sanitizer lines llvm-svn: 157999 --- compiler-rt/lib/asan/asan_interceptors.cc | 2 -- compiler-rt/lib/asan/asan_internal.h | 2 -- compiler-rt/lib/asan/asan_linux.cc | 2 -- compiler-rt/lib/asan/asan_mac.cc | 2 -- compiler-rt/lib/asan/asan_posix.cc | 2 -- compiler-rt/lib/asan/asan_printf.cc | 2 -- compiler-rt/lib/asan/asan_rtl.cc | 1 - compiler-rt/lib/asan/asan_stack.cc | 2 -- compiler-rt/lib/tsan/rtl/tsan_defs.h | 2 -- compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc | 1 - compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc | 2 -- compiler-rt/lib/tsan/rtl/tsan_printf.cc | 2 -- compiler-rt/lib/tsan/rtl/tsan_rtl.cc | 1 - compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc | 2 -- compiler-rt/lib/tsan/rtl/tsan_suppressions.cc | 2 -- compiler-rt/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc | 2 -- compiler-rt/lib/tsan/unit_tests/tsan_platform_test.cc | 2 -- 17 files changed, 31 deletions(-) diff --git a/compiler-rt/lib/asan/asan_interceptors.cc b/compiler-rt/lib/asan/asan_interceptors.cc index 63ae5799e25b..7797f99aee47 100644 --- a/compiler-rt/lib/asan/asan_interceptors.cc +++ b/compiler-rt/lib/asan/asan_interceptors.cc @@ -23,8 +23,6 @@ #include "interception/interception.h" #include "sanitizer_common/sanitizer_libc.h" -using namespace __sanitizer; // NOLINT - // Use macro to describe if specific function should be // intercepted on a given platform. #if !defined(_WIN32) diff --git a/compiler-rt/lib/asan/asan_internal.h b/compiler-rt/lib/asan/asan_internal.h index a70a1e67afb2..c242c973fec6 100644 --- a/compiler-rt/lib/asan/asan_internal.h +++ b/compiler-rt/lib/asan/asan_internal.h @@ -17,8 +17,6 @@ #include "sanitizer_common/sanitizer_defs.h" #include "sanitizer_common/sanitizer_libc.h" -using namespace __sanitizer; // NOLINT - #if !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) # error "This operating system is not supported by AddressSanitizer" #endif diff --git a/compiler-rt/lib/asan/asan_linux.cc b/compiler-rt/lib/asan/asan_linux.cc index ee356edd6987..87ff83178951 100644 --- a/compiler-rt/lib/asan/asan_linux.cc +++ b/compiler-rt/lib/asan/asan_linux.cc @@ -36,8 +36,6 @@ #include #endif -using namespace __sanitizer; // NOLINT - extern "C" void* _DYNAMIC; namespace __asan { diff --git a/compiler-rt/lib/asan/asan_mac.cc b/compiler-rt/lib/asan/asan_mac.cc index 636ed73c124d..d807778fa7ee 100644 --- a/compiler-rt/lib/asan/asan_mac.cc +++ b/compiler-rt/lib/asan/asan_mac.cc @@ -36,8 +36,6 @@ #include #include -using namespace __sanitizer; // NOLINT - namespace __asan { void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { diff --git a/compiler-rt/lib/asan/asan_posix.cc b/compiler-rt/lib/asan/asan_posix.cc index 14f172df1ec9..41b59dd5d93d 100644 --- a/compiler-rt/lib/asan/asan_posix.cc +++ b/compiler-rt/lib/asan/asan_posix.cc @@ -36,8 +36,6 @@ // since most of the stuff here is inlinable. #include -using namespace __sanitizer; - static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough. namespace __asan { diff --git a/compiler-rt/lib/asan/asan_printf.cc b/compiler-rt/lib/asan/asan_printf.cc index af48bba91bf7..be94fd8f5088 100644 --- a/compiler-rt/lib/asan/asan_printf.cc +++ b/compiler-rt/lib/asan/asan_printf.cc @@ -21,8 +21,6 @@ #include #include -using namespace __sanitizer; // NOLINT - namespace __asan { extern char *error_message_buffer; diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index af132e9407db..9c8201c18ba9 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -24,7 +24,6 @@ #include "sanitizer_common/sanitizer_libc.h" namespace __asan { -using namespace __sanitizer; // -------------------------- Flags ------------------------- {{{1 static const uptr kMallocContextSize = 30; diff --git a/compiler-rt/lib/asan/asan_stack.cc b/compiler-rt/lib/asan/asan_stack.cc index ac9f6dda4a5f..4ec330d5f671 100644 --- a/compiler-rt/lib/asan/asan_stack.cc +++ b/compiler-rt/lib/asan/asan_stack.cc @@ -19,8 +19,6 @@ #include "asan_thread_registry.h" #include "sanitizer_common/sanitizer_symbolizer.h" -using namespace __sanitizer; // NOLINT - #ifdef ASAN_USE_EXTERNAL_SYMBOLIZER extern bool ASAN_USE_EXTERNAL_SYMBOLIZER(const void *pc, char *out, int out_size); diff --git a/compiler-rt/lib/tsan/rtl/tsan_defs.h b/compiler-rt/lib/tsan/rtl/tsan_defs.h index c25cb8176abe..94d9b645b96c 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_defs.h +++ b/compiler-rt/lib/tsan/rtl/tsan_defs.h @@ -21,8 +21,6 @@ #define TSAN_DEBUG 0 #endif // TSAN_DEBUG -using namespace __sanitizer; - namespace __tsan { const uptr kPageSize = 4096; diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc b/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc index 58be599ad163..25662cb9e6b8 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cc @@ -21,7 +21,6 @@ #define CALLERPC ((uptr)__builtin_return_address(0)) -using namespace __sanitizer; // NOLINT using namespace __tsan; // NOLINT namespace __tsan { diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc index 8f8f982440a7..6d6290adfdb8 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc @@ -37,8 +37,6 @@ #include #include -using namespace __sanitizer; // NOLINT - extern "C" int arch_prctl(int code, __sanitizer::uptr *addr); namespace __tsan { diff --git a/compiler-rt/lib/tsan/rtl/tsan_printf.cc b/compiler-rt/lib/tsan/rtl/tsan_printf.cc index 7dc053eb93c7..2540d224c27d 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_printf.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_printf.cc @@ -18,8 +18,6 @@ #include // va_list -using namespace __sanitizer; // NOLINT - typedef long long i64; // NOLINT typedef long iptr; // NOLINT diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc index c9ebcf7dd0e0..d4a99e1a2497 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc @@ -29,7 +29,6 @@ extern "C" void __tsan_resume() { } namespace __tsan { -using namespace __sanitizer; THREADLOCAL char cur_thread_placeholder[sizeof(ThreadState)] ALIGNED(64); static char ctx_placeholder[sizeof(Context)] ALIGNED(64); diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc index 7ef0239c4d53..d8392724d793 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc @@ -22,8 +22,6 @@ #include "tsan_flags.h" #include "tsan_placement_new.h" -using namespace __sanitizer; // NOLINT - namespace __tsan { // Can be overriden by an application/test to intercept reports. diff --git a/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc b/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc index 8f644952e078..891518fc892c 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc @@ -18,8 +18,6 @@ #include "tsan_mman.h" #include "tsan_platform.h" -using namespace __sanitizer; // NOLINT - namespace __tsan { static Suppression *g_suppressions; diff --git a/compiler-rt/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc b/compiler-rt/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc index 152cf890f440..79b6cf6d53f0 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc @@ -24,8 +24,6 @@ #include #include -using namespace __sanitizer; // NOLINT - namespace __tsan { struct ModuleDesc { diff --git a/compiler-rt/lib/tsan/unit_tests/tsan_platform_test.cc b/compiler-rt/lib/tsan/unit_tests/tsan_platform_test.cc index 3cd2a0c504d1..6fa75a3df9bb 100644 --- a/compiler-rt/lib/tsan/unit_tests/tsan_platform_test.cc +++ b/compiler-rt/lib/tsan/unit_tests/tsan_platform_test.cc @@ -14,8 +14,6 @@ #include "tsan_platform.h" #include "gtest/gtest.h" -using namespace __sanitizer; // NOLINT - namespace __tsan { static void TestThreadInfo(bool main) {