Ignore -Wmisleading-indentation in util/pcre.cc only.
Fixes #118.
Change-Id: I8a626949666ae6dca3c86038a1698f9d817f974b
Reviewed-on: https://code-review.googlesource.com/7930
Reviewed-by: Paul Wankadia <[email protected]>
diff --git a/util/pcre.cc b/util/pcre.cc
index 61103cc..fab0388 100644
--- a/util/pcre.cc
+++ b/util/pcre.cc
@@ -21,6 +21,13 @@
#include "util/pcre.h"
#include "util/strutil.h"
+// Silence warnings about the wacky formatting in the operator() functions.
+// Note that we test for Clang first because it defines __GNUC__ as well.
+#if defined(__clang__)
+#elif defined(__GNUC__) && __GNUC__ >= 6
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+
#define PCREPORT(level) LOG(level)
// Default PCRE limits.