From 074767b13f398443ad9fb441120f897997966750 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Thu, 15 Sep 2016 21:02:18 +0000 Subject: [compiler-rt] Do not introduce __sanitizer namespace globally The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@281657 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/msan/msan_interface_internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/msan') diff --git a/lib/msan/msan_interface_internal.h b/lib/msan/msan_interface_internal.h index c1e02ce72..c6990db24 100644 --- a/lib/msan/msan_interface_internal.h +++ b/lib/msan/msan_interface_internal.h @@ -37,6 +37,16 @@ void __msan_warning(); SANITIZER_INTERFACE_ATTRIBUTE __attribute__((noreturn)) void __msan_warning_noreturn(); +using __sanitizer::uptr; +using __sanitizer::sptr; +using __sanitizer::uu64; +using __sanitizer::uu32; +using __sanitizer::uu16; +using __sanitizer::u64; +using __sanitizer::u32; +using __sanitizer::u16; +using __sanitizer::u8; + SANITIZER_INTERFACE_ATTRIBUTE void __msan_maybe_warning_1(u8 s, u32 o); SANITIZER_INTERFACE_ATTRIBUTE -- cgit v1.2.3