From: Chandler Carruth Date: Mon, 19 Jan 2015 10:43:00 +0000 (+0000) Subject: Suppress the newly added Clang warning for the inaccessible base in this X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0a506e2f955645ebc7a2daf37ef283240e88c751;p=oota-llvm.git Suppress the newly added Clang warning for the inaccessible base in this test. Do that after we suppress the warnings for unknown pragmas as this warning flag is quite new in Clang and so old Clang's would warn all the time on this file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226444 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Support/AlignOfTest.cpp b/unittests/Support/AlignOfTest.cpp index 40f72958572..1119019de01 100644 --- a/unittests/Support/AlignOfTest.cpp +++ b/unittests/Support/AlignOfTest.cpp @@ -22,13 +22,13 @@ namespace { // Suppress direct base '{anonymous}::S1' inaccessible in '{anonymous}::D9' // due to ambiguity warning. -// +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Winaccessible-base" +#elif ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 // Pragma based warning suppression was introduced in GGC 4.2. Additionally // this warning is "enabled by default". The warning still appears if -Wall is // suppressed. Apparently GCC suppresses it when -w is specifed, which is odd. -// At any rate, clang on the other hand gripes about -Wunknown-pragma, so -// leaving it out of this. -#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 && !defined(__clang__) #pragma GCC diagnostic warning "-w" #endif