[all-commits] [llvm/llvm-project] 4fbc66: [Clang] Enable __has_feature(coverage_sanitizer)

Marco Elver via All-commits all-commits at lists.llvm.org
Thu May 27 09:25:13 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fbc66cd6d90d8d5169c43fcc1b1e26e8a98d3a9
      https://github.com/llvm/llvm-project/commit/4fbc66cd6d90d8d5169c43fcc1b1e26e8a98d3a9
  Author: Marco Elver <elver at google.com>
  Date:   2021-05-27 (Thu, 27 May 2021)

  Changed paths:
    M clang/docs/SanitizerCoverage.rst
    M clang/include/clang/Basic/Features.def
    M clang/include/clang/Basic/LangOptions.h
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/Lexer/has_feature_coverage_sanitizer.cpp

  Log Message:
  -----------
  [Clang] Enable __has_feature(coverage_sanitizer)

Like other sanitizers, enable __has_feature(coverage_sanitizer) if clang
has enabled at least one SanitizerCoverage instrumentation type.

Because coverage instrumentation selection is not handled via normal
-fsanitize= (and thus not in SanitizeSet), passing this information
through to LangOptions required propagating the already parsed
-fsanitize-coverage= options from CodeGenOptions through to LangOptions
in FixupInvocation().

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D103159




More information about the All-commits mailing list