[all-commits] [llvm/llvm-project] 6c2140: [clang-tidy] Suppress google-objc-avoid-throwing-e...

Stephane Moore via All-commits all-commits at lists.llvm.org
Wed Nov 30 16:45:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c2140943cbe257c85f7121349c5bca950a26e0d
      https://github.com/llvm/llvm-project/commit/6c2140943cbe257c85f7121349c5bca950a26e0d
  Author: Stephane Moore <stephane.moore at gmail.com>
  Date:   2022-11-30 (Wed, 30 Nov 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/test/clang-tidy/checkers/google/Inputs/system-header-throw.h
    M clang-tools-extra/test/clang-tidy/checkers/google/objc-avoid-throwing-exception.m

  Log Message:
  -----------
  [clang-tidy] Suppress google-objc-avoid-throwing-exception in system macros 🫢

The google-objc-avoid-throwing-exception check enforces the Google
Objective-C Style Guide's prohibition on throwing exceptions in user
code but the check incorrectly triggers findings for code emitted from
system headers. This commit suppresses any findings that do not have
valid locations or are emitted from macros in system headers.

Avoid Throwing Exceptions, Google Objective-C Style Guide:
https://github.com/google/styleguide/blob/gh-pages/objcguide.md#avoid-throwing-exceptions

Test Notes:
Ran clang-tidy lit tests.

Reviewed By: gribozavr2

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




More information about the All-commits mailing list