Skip to content

Commit

Permalink
ignore -Wswitch-default when using clang (#2373)
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraPerego authored Aug 28, 2024
1 parent 1b8710e commit 032e98c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/alpaka/platform/PlatformGenericSycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

#ifdef ALPAKA_ACC_SYCL_ENABLED

# if BOOST_COMP_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wswitch-default"
# endif

# include <sycl/sycl.hpp>

namespace alpaka
Expand Down Expand Up @@ -720,4 +725,8 @@ namespace alpaka::trait
};
} // namespace alpaka::trait

# if BOOST_COMP_CLANG
# pragma clang diagnostic pop
# endif

#endif
9 changes: 9 additions & 0 deletions include/alpaka/workdiv/WorkDivHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include <set>
#include <type_traits>

#if BOOST_COMP_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wswitch-default"
#endif

//! The alpaka library.
namespace alpaka
{
Expand Down Expand Up @@ -543,3 +548,7 @@ namespace alpaka
return isValidWorkDiv(workDiv, getAccDevProps<TAcc>(dev));
}
} // namespace alpaka

#if BOOST_COMP_CLANG
# pragma clang diagnostic pop
#endif
9 changes: 9 additions & 0 deletions test/unit/math/src/DataGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#include <limits>
#include <random>

#if BOOST_COMP_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wswitch-default"
#endif

namespace mathtest
{
//! Helper to generate random numbers of the given type for testing
Expand Down Expand Up @@ -199,3 +204,7 @@ namespace mathtest
}
}
} // namespace mathtest

#if BOOST_COMP_CLANG
# pragma clang diagnostic pop
#endif

0 comments on commit 032e98c

Please sign in to comment.