Loading base/include/android-base/logging.h +0 −7 Original line number Diff line number Diff line Loading @@ -487,21 +487,14 @@ namespace std { // Note: to print the pointer, use "<< static_cast<const void*>(string_pointer)" instead. // Note: a not-recommended alternative is to let Clang ignore the warning by adding // -Wno-user-defined-warnings to CPPFLAGS. #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #define OSTREAM_STRING_POINTER_USAGE_WARNING \ __attribute__((diagnose_if(true, "Unexpected logging of string pointer", "warning"))) #else #define OSTREAM_STRING_POINTER_USAGE_WARNING /* empty */ #endif inline std::ostream& operator<<(std::ostream& stream, const std::string* string_pointer) OSTREAM_STRING_POINTER_USAGE_WARNING { return stream << static_cast<const void*>(string_pointer); } #ifdef __clang__ #pragma clang diagnostic pop #endif #undef OSTREAM_STRING_POINTER_USAGE_WARNING } // namespace std base/include/android-base/macros.h +0 −10 Original line number Diff line number Diff line Loading @@ -170,17 +170,7 @@ void UNUSED(const T&...) { // // In either case this macro has no effect on runtime behavior and performance // of code. #if defined(__clang__) && defined(__has_warning) #if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") #define FALLTHROUGH_INTENDED [[clang::fallthrough]] // NOLINT #endif #endif #ifndef FALLTHROUGH_INTENDED #define FALLTHROUGH_INTENDED \ do { \ } while (0) #endif // Current ABI string #if defined(__arm__) Loading base/include/android-base/parseint.h +0 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,7 @@ bool ParseUint(const char* s, T* out, T max = std::numeric_limits<T>::max(), const char* suffixes = "bkmgtpe"; const char* suffix; if (!allow_suffixes || (suffix = strchr(suffixes, tolower(*end))) == nullptr) return false; #if __clang__ // TODO: win32 still builds with GCC :-( if (__builtin_mul_overflow(result, 1ULL << (10 * (suffix - suffixes)), &result)) return false; #endif } if (max < result) { return false; Loading base/include/android-base/thread_annotations.h +1 −5 Original line number Diff line number Diff line Loading @@ -16,11 +16,7 @@ #pragma once #if defined(__SUPPORT_TS_ANNOTATION__) || defined(__clang__) #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) #else #define THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op #endif #define CAPABILITY(x) \ THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) Loading base/include/android-base/unique_fd.h +1 −7 Original line number Diff line number Diff line Loading @@ -142,10 +142,4 @@ inline bool Socketpair(int type, unique_fd* left, unique_fd* right) { template <typename T> int close(const android::base::unique_fd_impl<T>&) #if defined(__clang__) __attribute__((__unavailable__( #else __attribute__((__error__( #endif "close called on unique_fd" ))); __attribute__((__unavailable__("close called on unique_fd"))); Loading
base/include/android-base/logging.h +0 −7 Original line number Diff line number Diff line Loading @@ -487,21 +487,14 @@ namespace std { // Note: to print the pointer, use "<< static_cast<const void*>(string_pointer)" instead. // Note: a not-recommended alternative is to let Clang ignore the warning by adding // -Wno-user-defined-warnings to CPPFLAGS. #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #define OSTREAM_STRING_POINTER_USAGE_WARNING \ __attribute__((diagnose_if(true, "Unexpected logging of string pointer", "warning"))) #else #define OSTREAM_STRING_POINTER_USAGE_WARNING /* empty */ #endif inline std::ostream& operator<<(std::ostream& stream, const std::string* string_pointer) OSTREAM_STRING_POINTER_USAGE_WARNING { return stream << static_cast<const void*>(string_pointer); } #ifdef __clang__ #pragma clang diagnostic pop #endif #undef OSTREAM_STRING_POINTER_USAGE_WARNING } // namespace std
base/include/android-base/macros.h +0 −10 Original line number Diff line number Diff line Loading @@ -170,17 +170,7 @@ void UNUSED(const T&...) { // // In either case this macro has no effect on runtime behavior and performance // of code. #if defined(__clang__) && defined(__has_warning) #if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") #define FALLTHROUGH_INTENDED [[clang::fallthrough]] // NOLINT #endif #endif #ifndef FALLTHROUGH_INTENDED #define FALLTHROUGH_INTENDED \ do { \ } while (0) #endif // Current ABI string #if defined(__arm__) Loading
base/include/android-base/parseint.h +0 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,7 @@ bool ParseUint(const char* s, T* out, T max = std::numeric_limits<T>::max(), const char* suffixes = "bkmgtpe"; const char* suffix; if (!allow_suffixes || (suffix = strchr(suffixes, tolower(*end))) == nullptr) return false; #if __clang__ // TODO: win32 still builds with GCC :-( if (__builtin_mul_overflow(result, 1ULL << (10 * (suffix - suffixes)), &result)) return false; #endif } if (max < result) { return false; Loading
base/include/android-base/thread_annotations.h +1 −5 Original line number Diff line number Diff line Loading @@ -16,11 +16,7 @@ #pragma once #if defined(__SUPPORT_TS_ANNOTATION__) || defined(__clang__) #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) #else #define THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op #endif #define CAPABILITY(x) \ THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) Loading
base/include/android-base/unique_fd.h +1 −7 Original line number Diff line number Diff line Loading @@ -142,10 +142,4 @@ inline bool Socketpair(int type, unique_fd* left, unique_fd* right) { template <typename T> int close(const android::base::unique_fd_impl<T>&) #if defined(__clang__) __attribute__((__unavailable__( #else __attribute__((__error__( #endif "close called on unique_fd" ))); __attribute__((__unavailable__("close called on unique_fd")));