[clang] [NFC][clang][test][asan] Make `instantiation-depth-default.cpp` a valid test case under `asan` and `ubsan` configs (PR #75254)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 03:18:21 PST 2024


================
@@ -1,18 +1,12 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-backtrace-limit=2 %s
-//
-// FIXME: Disable this test when Clang was built with ASan, because ASan
-// increases our per-frame stack usage enough that this test no longer fits
-// within our normal stack space allocation.
-// UNSUPPORTED: asan
-//
+// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-backtrace-limit=2 -Wno-stack-exhausted %s
----------------
goussepi wrote:

Is it possible to disable the stack-exhausted warning only if asan or ubsan? I am thinking we still might want to be able to detect stack usage regressions. It also helps documenting.
Not tested but maybe something like ```// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-backtrace-limit=2 %if {{asan|ubsan}} %{ -Wno-stack-exhausted %} %s```
If not possible then LGTM, let me know if you need someone to commit for you.

https://github.com/llvm/llvm-project/pull/75254


More information about the cfe-commits mailing list