melver added inline comments.
================ Comment at: clang/lib/Driver/SanitizerArgs.cpp:839 + // Parse -f(no-)?sanitize-metadata. + for (const auto *Arg : Args) { + if (Arg->getOption().matches( ---------------- MaskRay wrote: > Use `Args.getLastArg(...)` This won't work if someone does: -fsanitize-metadata=feature1 -fsanitize-metadata=feature2 (instead of '-fsanitize-metadata=feature1,feature2') Added a test case. ================ 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 ---------------- MaskRay wrote: > This RUN line is redundant. For other opt-in features, we don't check that > the cc1 command line doesn't have an option. I've made the negative-presence test more useful by checking -fno- option works. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130888/new/ https://reviews.llvm.org/D130888 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits