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
This commit is contained in:
Islam AbdelRahman 2016-12-01 10:02:12 -08:00 committed by Facebook Github Bot
parent 3f407b065c
commit e39d080871
3 changed files with 3 additions and 3 deletions

View File

@ -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__))

View File

@ -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__))

View File

@ -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__))