mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
fix(test): use __SANITIZE_ADDRESS__ alone for sanitizer detection (gcc-portable)
GCC's preprocessor doesn't short-circuit 'defined(__has_feature) && __has_feature(...)' — it tries to parse the call syntax of the undefined token and errors with 'missing binary operator before token "("'. Modern GCC and Clang both define __SANITIZE_ADDRESS__ under -fsanitize=address, so use that single check.
This commit is contained in:
1 parent
d5211f6ae0
commit
297003aab4
2 files changed
+2
-2
No files matched your search
@@ -242,7 +242,7 @@ TEST(cslsp_bench_resolution_ratio) {
|
||||
/* Time budget. ASan+UBSan instrumentation slows the parse ~5-10×, so
|
||||
* scale the budget when a sanitizer is active. Native: 200 ms for a
|
||||
* ~260-line fixture; sanitized: 2000 ms. */
|
||||
#if defined(__SANITIZE_ADDRESS__) || (defined(__has_feature) && __has_feature(address_sanitizer))
|
||||
#ifdef __SANITIZE_ADDRESS__
|
||||
ASSERT(ms < 2000.0);
|
||||
#else
|
||||
ASSERT(ms < 200.0);
|
||||
|
||||
@@ -262,7 +262,7 @@ TEST(pylsp_bench_resolution_ratio) {
|
||||
/* Time budget. ASan+UBSan instrumentation slows the parse ~5-10×, so
|
||||
* scale the budget when a sanitizer is active. Native: 150 ms for a
|
||||
* ~200-line fixture; sanitized: 1500 ms. */
|
||||
#if defined(__SANITIZE_ADDRESS__) || (defined(__has_feature) && __has_feature(address_sanitizer))
|
||||
#ifdef __SANITIZE_ADDRESS__
|
||||
ASSERT(ms < 1500.0);
|
||||
#else
|
||||
ASSERT(ms < 150.0);
|
||||
|
||||
Reference in new issue
Block a user