From 5ab723e51c6695b2986b23c461f2ea95cdddaecd Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Tue, 20 Aug 2013 03:18:39 -0700 Subject: [PATCH] make StringGen clang-compatible Test Plan: fbconfig -r folly/test && fbmake opt -j32 Reviewed By: tjackson@fb.com FB internal diff: D935182 --- folly/experimental/StringGen-inl.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/folly/experimental/StringGen-inl.h b/folly/experimental/StringGen-inl.h index a763dda0..aa32a294 100644 --- a/folly/experimental/StringGen-inl.h +++ b/folly/experimental/StringGen-inl.h @@ -222,6 +222,12 @@ class UnsplitBuffer : public Operator> { template inline Target passthrough(Target target) { return target; } +#pragma GCC diagnostic push +#ifdef __clang__ +// Clang isn't happy with eatField() hack below. +#pragma GCC diagnostic ignored "-Wreturn-stack-address" +#endif // __clang__ + /** * ParseToTuple - For splitting a record and immediatlely converting it to a * target tuple type. Primary used through the 'eachToTuple' helper, like so: @@ -257,6 +263,8 @@ class SplitTo { } }; +#pragma GCC diagnostic pop + } // namespace detail } // namespace gen -- 2.34.1