From 56f96b6c085881cd3fdad1672543a23477041340 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 17 Jan 2013 14:58:50 -0800 Subject: [PATCH] Hide clang pragmas behind an #ifdef --- cpp/ycm/ClangCompleter/ClangResultsCache.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cpp/ycm/ClangCompleter/ClangResultsCache.h b/cpp/ycm/ClangCompleter/ClangResultsCache.h index e1dba0b7..6ee61d60 100644 --- a/cpp/ycm/ClangCompleter/ClangResultsCache.h +++ b/cpp/ycm/ClangCompleter/ClangResultsCache.h @@ -48,15 +48,19 @@ public: } #ifndef BOOST_NO_RVALUE_REFERENCES -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++98-compat" +# ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wc++98-compat" +# endif //#ifdef __clang__ void SetCompletionDatas( std::vector< CompletionData >&& new_completions ) { completion_datas_ = new_completions; } -#pragma clang diagnostic pop +# ifdef __clang__ +# pragma clang diagnostic pop +# endif //#ifdef __clang__ #endif //#ifndef BOOST_NO_RVALUE_REFERENCES template< typename T >