Fix travis (compile for clang < 3.9)

Summary:
Travis fail because it uses clang 3.6 which don't recognize
`__attribute__((__no_sanitize__("undefined")))`
Closes https://github.com/facebook/rocksdb/pull/1601

Differential Revision: D4257175

Pulled By: IslamAbdelRahman

fbshipit-source-id: fb4d1ab
main
Islam AbdelRahman 8 years ago committed by Facebook Github Bot
parent 3f407b065c
commit e39d080871
  1. 2
      db/fault_injection_test.cc
  2. 2
      util/hash.cc
  3. 2
      utilities/col_buf_encoder.cc

@ -228,7 +228,7 @@ class FaultInjectionTest : public testing::Test,
return Status::OK();
}
#if defined(__clang__)
#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 9)
__attribute__((__no_sanitize__("undefined")))
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
__attribute__((__no_sanitize_undefined__))

@ -14,7 +14,7 @@
namespace rocksdb {
// This function may intentionally do a left shift on a -ve number
#if defined(__clang__)
#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 9)
__attribute__((__no_sanitize__("undefined")))
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
__attribute__((__no_sanitize_undefined__))

@ -46,7 +46,7 @@ ColBufEncoder *ColBufEncoder::NewColBufEncoder(
return nullptr;
}
#if defined(__clang__)
#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 9)
__attribute__((__no_sanitize__("undefined")))
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
__attribute__((__no_sanitize_undefined__))

Loading…
Cancel
Save