[PATCH] D130888: [Clang] Introduce -fexperimental-sanitize-metadata=
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 2 20:18:18 PDT 2022
MaskRay added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:5502
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceStores">>;
+def fexperimental_sanitize_metadata_covered
+ : Flag<["-"], "fexperimental-sanitize-metadata-covered">,
----------------
Let CC1 options use the same spelling as the driver options.
================
Comment at: clang/lib/Driver/SanitizerArgs.cpp:839
+ // Parse -f(no-)?sanitize-metadata.
+ for (const auto *Arg : Args) {
+ if (Arg->getOption().matches(
----------------
Use `Args.getLastArg(...)`
================
Comment at: clang/test/Driver/fsanitize-metadata.c:1
+// RUN: %clang -target x86_64-linux-gnu %s -### 2>&1 | FileCheck %s
+// CHECK-NOT: -fexperimental-sanitize-metadata
----------------
This RUN line is redundant. For other opt-in features, we don't check that the cc1 command line doesn't have an option.
================
Comment at: clang/test/Driver/fsanitize-metadata.c:4
+
+// RUN: %clang -target x86_64-linux-gnu -fexperimental-sanitize-metadata=bad_arg %s -### 2>&1 | \
+// RUN: FileCheck -check-prefix=CHECK-INVALID %s
----------------
`-target ` is legacy. Use `--target=`. If a feature isn't Linux specific, use `--target=x86_64`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130888/new/
https://reviews.llvm.org/D130888
More information about the cfe-commits
mailing list