From: Jim Meyering Date: Sat, 14 Feb 2015 00:37:37 +0000 (-0800) Subject: wangle: make new pragma use portable to older clang X-Git-Tag: v0.27.0~38 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b4d1dea72dda8611716b987b60038fe34460a86;p=folly.git wangle: make new pragma use portable to older clang Summary: * folly/wangle/channel/test/MockChannelHandler.h: Avoiding a new warning that rendered this file uncompilable by clang-3.5 and older. Add cpp conditionals to protect against that. Test Plan: Ensure it works with clang-3.4, 3.5 and clang:dev. I.e., ensure that this prints PASS at the end. for i in '' 3.5 dev; do test -n "$i" && i=--with-project-version=clang:$i fbconfig -r --clang $i folly/wangle/channel/test && fbmake runtests_dbgo done && echo PASS Reviewed By: meyering@fb.com Subscribers: mpawlowski, fugalh, mathieubaudet, folly-diffs@, jsedgwick, yfeldblum FB internal diff: D1849474 Tasks: 6244745 Blame Revision: D1848330 @build-break --- diff --git a/folly/wangle/channel/test/MockChannelHandler.h b/folly/wangle/channel/test/MockChannelHandler.h index 93086704..c611bd56 100644 --- a/folly/wangle/channel/test/MockChannelHandler.h +++ b/folly/wangle/channel/test/MockChannelHandler.h @@ -30,8 +30,10 @@ class MockChannelHandler : public ChannelHandler { MockChannelHandler(MockChannelHandler&&) = default; #ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Winconsistent-missing-override" +# pragma clang diagnostic push +# if __clang_major__ > 3 || __clang_minor__ >= 6 +# pragma clang diagnostic ignored "-Winconsistent-missing-override" +# endif #endif MOCK_METHOD2_T(read_, void(Context*, Rin&));