Skip to content

Commit

Permalink
some adjustments for libc++ (#7006)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored Nov 20, 2024
1 parent c307483 commit 9c3a1f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
SUPPRESS_WARNING_CLANG_PUSH("-Wzero-as-null-pointer-constant")
SUPPRESS_WARNING_CLANG_PUSH("-Wsuggest-destructor-override")
SUPPRESS_WARNING_CLANG_PUSH("-Winconsistent-missing-destructor-override")
SUPPRESS_WARNING_CLANG_PUSH("-Wformat") // happens with libc++ only

#include <tinyxml2.h> // IWYU pragma: export

SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP

inline static tinyxml2::XMLError xml_LoadFile(tinyxml2::XMLDocument& doc, const char* filename)
{
Expand Down
2 changes: 1 addition & 1 deletion test/testmathlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ class TestMathLib : public TestFixture {

ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: invalid");

#ifdef _LIBCPP_VERSION
#if defined(_LIBCPP_VERSION) && (defined(__APPLE__) && defined(__MACH__))
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("1invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: 1invalid");
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("1.1invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: 1.1invalid");
#else
Expand Down

0 comments on commit 9c3a1f6

Please sign in to comment.