[all-commits] [llvm/llvm-project] b660ab: [ObjC] Add a command line flag that disables recog...

Erik Pilkington via All-commits all-commits at lists.llvm.org
Tue Apr 6 08:18:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b660abc80d0d0943c54e9440636ddfa89c2d626d
      https://github.com/llvm/llvm-project/commit/b660abc80d0d0943c54e9440636ddfa89c2d626d
  Author: Erik Pilkington <erik.pilkington at gmail.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M clang/include/clang/AST/DeclObjC.h
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/AST/DeclObjC.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Sema/SemaDeclObjC.cpp
    A clang/test/CodeGenObjC/disable-direct-method.m
    M clang/test/Driver/clang_f_opts.c
    A clang/test/SemaObjC/disable-direct-method.m

  Log Message:
  -----------
  [ObjC] Add a command line flag that disables recognition of objc_direct for testability

Programmers would like to be able to test direct methods by calling them from a
different linkage unit or mocking them, both of which are impossible. This
patch adds a flag that effectively disables the attribute, which will fix this
when enabled in testable builds. rdar://71190891

Differential revision: https://reviews.llvm.org/D95845




More information about the All-commits mailing list