[clang] [clang] Add support for omitting only global destructors (PR #104899)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 09:05:13 PDT 2024


================
@@ -0,0 +1,9 @@
+// RUN: %clang -### -c -fc++-static-destructors=all %s 2>&1 | FileCheck --check-prefix ALL %s
+// RUN: %clang -### -c -fc++-static-destructors %s 2>&1 | FileCheck --check-prefix ALL %s
+// RUN: %clang -### -c -fc++-static-destructors=none %s 2>&1 | FileCheck --check-prefix NONE %s
----------------
MaskRay wrote:

You can add -fc++-static-destructors before -fc++-static-destructors=none to enhance the test to show we use the `getLastArg` semantics

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


More information about the cfe-commits mailing list