Builds almost completely cleanly with -WEverything in LLVM

This commit is contained in:
Phil Nash
2012-08-13 07:46:10 +01:00
parent cdc64a138b
commit a695eb9006
37 changed files with 1045 additions and 966 deletions

View File

@@ -1,13 +1,9 @@
/*
* ApproxTests.cpp
* Catch - Test
*
* Created by Phil on 28/04/2011.
* Copyright 2011 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#include "catch.hpp"

View File

@@ -1,13 +1,9 @@
/*
* ClassTests.cpp
* Catch - Test
*
* Created by Phil on 09/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#include "catch.hpp"

View File

@@ -1,14 +1,11 @@
/*
* ConditionTests.cpp
* Catch - Test
*
* Created by Phil on 08/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#pragma clang diagnostic ignored "-Wpadded"
#include "catch.hpp"

View File

@@ -1,15 +1,13 @@
/*
* ExceptionTests.cpp
* Catch - Test
*
* Created by Phil on 09/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#pragma clang diagnostic ignored "-Wpadded"
#include "catch.hpp"
#include <string>
@@ -19,7 +17,7 @@
namespace
{
ATTRIBUTE_NORETURN
CATCH_ATTRIBUTE_NORETURN
int thisThrows();
int thisThrows()
@@ -41,6 +39,7 @@ TEST_CASE( "./succeeding/exceptions/explicit", "When checked exceptions are thro
REQUIRE_THROWS( thisThrows() );
}
CATCH_ATTRIBUTE_NORETURN
TEST_CASE( "./failing/exceptions/explicit", "When checked exceptions are thrown they can be expected or unexpected" )
{
CHECK_THROWS_AS( thisThrows(), std::string );

View File

@@ -1,13 +1,9 @@
/*
* GeneratorTests.cpp
* Catch - Test
*
* Created by Phil on 28/01/2011.
* Copyright 2011 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
// This define means we have to prefix all the CATCH macros with CATCH_

View File

@@ -1,13 +1,9 @@
/*
* MessageTests.cpp
* Catch - Test
*
* Created by Phil on 09/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#include "catch.hpp"

View File

@@ -1,14 +1,11 @@
/*
* MiscTests.cpp
* Catch - Test
*
* Created by Phil on 29/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#pragma clang diagnostic ignored "-Wpadded"
#include "catch.hpp"
#include "catch_self_test.hpp"

View File

@@ -5,6 +5,8 @@
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#pragma clang diagnostic ignored "-Wpadded"
#include "catch_self_test.hpp"
TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" ) {
@@ -54,6 +56,8 @@ TEST_CASE( "meta/Misc/Sections", "looped tests" ) {
CHECK( runner.getTotals().assertions.failed == 1 );
}
#pragma clang diagnostic ignored "-Wweak-vtables"
#include "../../include/internal/catch_commandline.hpp"
#include "../../include/reporters/catch_reporter_basic.hpp"
#include "../../include/reporters/catch_reporter_xml.hpp"

View File

@@ -1,15 +1,13 @@
/*
* TrickyTests.cpp
* Catch - Test
*
* Created by Phil on 09/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#pragma clang diagnostic ignored "-Wpadded"
#include "catch.hpp"
namespace Catch

View File

@@ -1,15 +1,13 @@
/*
* catch_self_test.cpp
* Catch
*
* Created by Phil on 14/02/2012.
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
#pragma clang diagnostic ignored "-Wpadded"
#define CATCH_CONFIG_MAIN
#include "catch_self_test.hpp"
@@ -69,9 +67,6 @@ namespace Catch{
case ResultWas::Exception:
m_log << "Exception";
break;
default:
m_log << "{unrecognised ResultType enum value}";
break;
}
if( resultInfo.hasExpression() )

View File

@@ -465,14 +465,28 @@
4A6D0C2B149B3D3B00DB3EAA /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = (
"-Weverything",
"-Wno-disabled-macro-expansion",
"-Wno-global-constructors",
);
};
name = Debug;
};
4A6D0C2C149B3D3B00DB3EAA /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = (
"-Weverything",
"-Wno-disabled-macro-expansion",
"-Wno-global-constructors",
);
};
name = Release;
};