Skip to content

Commit f5ff11c

Browse files
committed
Suppress warnings about the operations currently under test.
llvm-svn: 272819
1 parent 9d305d7 commit f5ff11c

8 files changed

+54
-0
lines changed

libcxxabi/test/catch_class_03.pass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
#include <stdlib.h>
2020
#include <assert.h>
2121

22+
// Clang emits warnings about exceptions of type 'Child' being caught by
23+
// an earlier handler of type 'Base'. Congrats clang, you've just
24+
// diagnosed the behavior under test.
25+
#if defined(__clang__)
26+
#pragma clang diagnostic ignored "-Wexceptions"
27+
#endif
28+
2229
struct B
2330
{
2431
static int count;

libcxxabi/test/catch_class_04.pass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
#include <stdlib.h>
2020
#include <assert.h>
2121

22+
// Clang emits warnings about exceptions of type 'Child' being caught by
23+
// an earlier handler of type 'Base'. Congrats clang, you've just
24+
// diagnosed the behavior under test.
25+
#if defined(__clang__)
26+
#pragma clang diagnostic ignored "-Wexceptions"
27+
#endif
28+
2229
struct B
2330
{
2431
static int count;

libcxxabi/test/catch_const_pointer_nullptr.pass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111

1212
#include <cassert>
1313

14+
// Clang emits warnings about exceptions of type 'Child' being caught by
15+
// an earlier handler of type 'Base'. Congrats clang, you've just
16+
// diagnosed the behavior under test.
17+
#if defined(__clang__)
18+
#pragma clang diagnostic ignored "-Wexceptions"
19+
#endif
20+
1421
#if __has_feature(cxx_nullptr)
1522

1623
struct A {};

libcxxabi/test/catch_ptr.pass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
#include <stdlib.h>
2020
#include <assert.h>
2121

22+
// Clang emits warnings about exceptions of type 'Child' being caught by
23+
// an earlier handler of type 'Base'. Congrats clang, you've just
24+
// diagnosed the behavior under test.
25+
#if defined(__clang__)
26+
#pragma clang diagnostic ignored "-Wexceptions"
27+
#endif
28+
2229
struct B
2330
{
2431
static int count;

libcxxabi/test/catch_ptr_02.pass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111

1212
#include <cassert>
1313

14+
// Clang emits warnings about exceptions of type 'Child' being caught by
15+
// an earlier handler of type 'Base'. Congrats clang, you've just
16+
// diagnosed the behavior under test.
17+
#if defined(__clang__)
18+
#pragma clang diagnostic ignored "-Wexceptions"
19+
#endif
20+
1421
#if __cplusplus < 201103L
1522
#define DISABLE_NULLPTR_TESTS
1623
#endif

libcxxabi/test/dynamic_cast3.pass.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#include <cassert>
1111
#include "support/timer.hpp"
1212

13+
// This test explicitly tests dynamic cast with types that have inaccessible
14+
// bases.
15+
#if defined(__clang__)
16+
#pragma clang diagnostic ignored "-Winaccessible-base"
17+
#endif
18+
1319
/*
1420
1521
A1 A2 A3

libcxxabi/test/dynamic_cast5.pass.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#include <cassert>
1111
#include "support/timer.hpp"
1212

13+
// This test explicitly tests dynamic cast with types that have inaccessible
14+
// bases.
15+
#if defined(__clang__)
16+
#pragma clang diagnostic ignored "-Winaccessible-base"
17+
#endif
18+
1319
namespace t1
1420
{
1521

libcxxabi/test/inherited_exception.pass.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727

2828
// UNSUPPORTED: libcxxabi-no-exceptions
2929

30+
// Clang emits warnings about exceptions of type 'Child' being caught by
31+
// an earlier handler of type 'Base'. Congrats clang, you've just
32+
// diagnosed the behavior under test.
33+
#if defined(__clang__)
34+
#pragma clang diagnostic ignored "-Wexceptions"
35+
#endif
36+
3037
#include <assert.h>
3138

3239
struct Base {

0 commit comments

Comments
 (0)