Commit de0c7ed5 authored by tzik@chromium.org's avatar tzik@chromium.org

Avoid macro redefinition in tools_sanity_unittest.cc

This causes build failure by macro redefinition on ASan-enabled build without -w flag.

BUG=162783

Review URL: https://codereview.chromium.org/389313002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283978 0039d316-1c4b-4281-b951-d872f2087c98
parent 2ea01ec0
...@@ -112,9 +112,7 @@ TEST(ToolsSanityTest, MemoryLeak) { ...@@ -112,9 +112,7 @@ TEST(ToolsSanityTest, MemoryLeak) {
#else #else
#define MAYBE_AccessesToNewMemory AccessesToNewMemory #define MAYBE_AccessesToNewMemory AccessesToNewMemory
#define MAYBE_AccessesToMallocMemory AccessesToMallocMemory #define MAYBE_AccessesToMallocMemory AccessesToMallocMemory
#define MAYBE_ArrayDeletedWithoutBraces ArrayDeletedWithoutBraces #endif // (defined(ADDRESS_SANITIZER) && defined(OS_IOS)) || defined(SYZYASAN)
#define MAYBE_SingleElementDeletedWithBraces SingleElementDeletedWithBraces
#endif
// The following tests pass with Clang r170392, but not r172454, which // The following tests pass with Clang r170392, but not r172454, which
// makes AddressSanitizer detect errors in them. We disable these tests under // makes AddressSanitizer detect errors in them. We disable these tests under
...@@ -126,7 +124,11 @@ TEST(ToolsSanityTest, MemoryLeak) { ...@@ -126,7 +124,11 @@ TEST(ToolsSanityTest, MemoryLeak) {
#define MAYBE_SingleElementDeletedWithBraces \ #define MAYBE_SingleElementDeletedWithBraces \
DISABLED_SingleElementDeletedWithBraces DISABLED_SingleElementDeletedWithBraces
#define MAYBE_ArrayDeletedWithoutBraces DISABLED_ArrayDeletedWithoutBraces #define MAYBE_ArrayDeletedWithoutBraces DISABLED_ArrayDeletedWithoutBraces
#endif #else
#define MAYBE_ArrayDeletedWithoutBraces ArrayDeletedWithoutBraces
#define MAYBE_SingleElementDeletedWithBraces SingleElementDeletedWithBraces
#endif // defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
TEST(ToolsSanityTest, MAYBE_AccessesToNewMemory) { TEST(ToolsSanityTest, MAYBE_AccessesToNewMemory) {
char *foo = new char[10]; char *foo = new char[10];
MakeSomeErrors(foo, 10); MakeSomeErrors(foo, 10);
......
...@@ -3986,7 +3986,6 @@ ...@@ -3986,7 +3986,6 @@
['_toolset=="target"', { ['_toolset=="target"', {
'cflags': [ 'cflags': [
'-fsanitize=address', '-fsanitize=address',
'-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'ldflags': [ 'ldflags': [
'-fsanitize=address', '-fsanitize=address',
...@@ -4009,7 +4008,6 @@ ...@@ -4009,7 +4008,6 @@
'-fsanitize=undefined', '-fsanitize=undefined',
# -fsanitize=vptr is incompatible with -fno-rtti. # -fsanitize=vptr is incompatible with -fno-rtti.
'-fno-sanitize=vptr', '-fno-sanitize=vptr',
'-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'ldflags': [ 'ldflags': [
'-fsanitize=undefined', '-fsanitize=undefined',
...@@ -4033,7 +4031,6 @@ ...@@ -4033,7 +4031,6 @@
'-fsanitize=vptr', '-fsanitize=vptr',
'-fsanitize=null', # Avoid dereferences on null pointer objects. '-fsanitize=null', # Avoid dereferences on null pointer objects.
'-fsanitize-blacklist=<(ubsan_vptr_blacklist)', '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
'-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'cflags_cc!': [ 'cflags_cc!': [
'-fno-rtti', '-fno-rtti',
...@@ -4629,8 +4626,6 @@ ...@@ -4629,8 +4626,6 @@
# binaries on x86_64 host is problematic. # binaries on x86_64 host is problematic.
# TODO(eugenis): re-enable. # TODO(eugenis): re-enable.
'-fsanitize=address', '-fsanitize=address',
'-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'ldflags!': [ 'ldflags!': [
'-fsanitize=address', '-fsanitize=address',
...@@ -4800,7 +4795,6 @@ ...@@ -4800,7 +4795,6 @@
'OTHER_CFLAGS': [ 'OTHER_CFLAGS': [
'-fsanitize=address', '-fsanitize=address',
'-mllvm -asan-globals=0', # http://crbug.com/352073 '-mllvm -asan-globals=0', # http://crbug.com/352073
'-Wno-error=macro-redefined', # http://crbug.com/162783
'-Wno-error=unused-function', # http://crbug.com/162783 '-Wno-error=unused-function', # http://crbug.com/162783
'-gline-tables-only', '-gline-tables-only',
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment