[all-commits] [llvm/llvm-project] f6d6e3: [clang] Give better message for unsupported no_san...

Alex Brachet via All-commits all-commits at lists.llvm.org
Thu Sep 1 15:36:39 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f6d6e33abc2e8657b04721841d15191b7c3ff3d1
      https://github.com/llvm/llvm-project/commit/f6d6e33abc2e8657b04721841d15191b7c3ff3d1
  Author: Alex Brachet <abrachet at google.com>
  Date:   2022-09-01 (Thu, 01 Sep 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/SemaCXX/attr-no-sanitize.cpp

  Log Message:
  -----------
  [clang] Give better message for unsupported no_sanitize on globals

Previously if you specified no_sanitize("known_sanitizer") on a global you
would yield a misleading error "'no_sanitize' attribute only applies to
functions and methods", but no_sanitize("unknown") would simply be a warning,
"unknown sanitizer 'unknown' ignored". This changes the former to a warning
"'no_sanitize' attribute argument not supported for globals: known_sanitizer".

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




More information about the All-commits mailing list