Commit 2b4d1dea authored by Jim Meyering's avatar Jim Meyering Committed by Alecs King

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
parent cb2d6c84
......@@ -30,8 +30,10 @@ class MockChannelHandler : public ChannelHandler<Rin, Rout, Win, Wout> {
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&));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment