* used as folly whitelists some functions.
*/
#if UNDEFINED_SANITIZER
-# define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(x) \
- __attribute__((no_sanitize(x)))
+#define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) \
+ __attribute__((no_sanitize(__VA_ARGS__)))
#else
-# define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(x)
+#define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...)
#endif // UNDEFINED_SANITIZER
/**
: buckets_(bucketSize, min, max, Bucket()) {}
/* Add a data point to the histogram */
- void addValue(ValueType value)
- FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("signed-integer-overflow")
- FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("unsigned-integer-overflow") {
+ void addValue(ValueType value) FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(
+ "signed-integer-overflow",
+ "unsigned-integer-overflow") {
Bucket& bucket = buckets_.getByValue(value);
// NOTE: Overflow is handled elsewhere and tests check this
// behavior (see HistogramTest.cpp TestOverflow* tests).
/* Add multiple same data points to the histogram */
void addRepeatedValue(ValueType value, uint64_t nSamples)
- FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("signed-integer-overflow")
- FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("unsigned-integer-overflow") {
+ FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(
+ "signed-integer-overflow",
+ "unsigned-integer-overflow") {
Bucket& bucket = buckets_.getByValue(value);
// NOTE: Overflow is handled elsewhere and tests check this
// behavior (see HistogramTest.cpp TestOverflow* tests).
* requested value from the appropriate bucket's sum.
*/
void removeValue(ValueType value) FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(
- "signed-integer-overflow")
- FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("unsigned-integer-overflow") {
+ "signed-integer-overflow",
+ "unsigned-integer-overflow") {
Bucket& bucket = buckets_.getByValue(value);
// NOTE: Overflow is handled elsewhere and tests check this
// behavior (see HistogramTest.cpp TestOverflow* tests).