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) {
#else
#define MAYBE_AccessesToNewMemory AccessesToNewMemory
#define MAYBE_AccessesToMallocMemory AccessesToMallocMemory
#define MAYBE_ArrayDeletedWithoutBraces ArrayDeletedWithoutBraces
#define MAYBE_SingleElementDeletedWithBraces SingleElementDeletedWithBraces
#endif
#endif // (defined(ADDRESS_SANITIZER) && defined(OS_IOS)) || defined(SYZYASAN)
// The following tests pass with Clang r170392, but not r172454, which
// makes AddressSanitizer detect errors in them. We disable these tests under
......@@ -126,7 +124,11 @@ TEST(ToolsSanityTest, MemoryLeak) {
#define MAYBE_SingleElementDeletedWithBraces \
DISABLED_SingleElementDeletedWithBraces
#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) {
char *foo = new char[10];
MakeSomeErrors(foo, 10);
......
......@@ -3986,7 +3986,6 @@
['_toolset=="target"', {
'cflags': [
'-fsanitize=address',
'-Wno-error=macro-redefined', # http://crbug.com/162783
],
'ldflags': [
'-fsanitize=address',
......@@ -4009,7 +4008,6 @@
'-fsanitize=undefined',
# -fsanitize=vptr is incompatible with -fno-rtti.
'-fno-sanitize=vptr',
'-Wno-error=macro-redefined', # http://crbug.com/162783
],
'ldflags': [
'-fsanitize=undefined',
......@@ -4033,7 +4031,6 @@
'-fsanitize=vptr',
'-fsanitize=null', # Avoid dereferences on null pointer objects.
'-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
'-Wno-error=macro-redefined', # http://crbug.com/162783
],
'cflags_cc!': [
'-fno-rtti',
......@@ -4629,8 +4626,6 @@
# binaries on x86_64 host is problematic.
# TODO(eugenis): re-enable.
'-fsanitize=address',
'-Wno-error=macro-redefined', # http://crbug.com/162783
],
'ldflags!': [
'-fsanitize=address',
......@@ -4800,7 +4795,6 @@
'OTHER_CFLAGS': [
'-fsanitize=address',
'-mllvm -asan-globals=0', # http://crbug.com/352073
'-Wno-error=macro-redefined', # http://crbug.com/162783
'-Wno-error=unused-function', # http://crbug.com/162783
'-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