[all-commits] [llvm/llvm-project] 74b538: [include-cleaner] Turn new/delete usages to ambigu...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Fri Aug 23 17:54:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 74b538d7e6428921b0bc8f1f5d5dc287c430fa29
      https://github.com/llvm/llvm-project/commit/74b538d7e6428921b0bc8f1f5d5dc287c430fa29
  Author: kadir çetinkaya <kadircet at google.com>
  Date:   2024-08-24 (Sat, 24 Aug 2024)

  Changed paths:
    M clang-tools-extra/include-cleaner/lib/WalkAST.cpp
    M clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp

  Log Message:
  -----------
  [include-cleaner] Turn new/delete usages to ambiguous references (#105844)

In practice most of these expressions just resolve to implicitly
provided `operator new` and standard says it's not necessary to include
`<new>` for that.
Hence this is resulting in a lot of churn in cases where inclusion of
`<new>` doesn't matter, and might even be undesired by the developer.

By switching to an ambiguous reference we try to find a middle ground
here, ensuring that we don't drop providers of `operator new` when the
developer explicitly listed them in the includes, and chose to believe
it's the implicitly provided `operator new` and don't insert an include
in other cases.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list