[all-commits] [llvm/llvm-project] 5ab311: Expand annotation check for -Wunique-object-duplic...

Devon Loehr via All-commits all-commits at lists.llvm.org
Mon Jun 30 07:51:25 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ab3114bd12cdafc1e4e384e3a06c7258723ebde
      https://github.com/llvm/llvm-project/commit/5ab3114bd12cdafc1e4e384e3a06c7258723ebde
  Author: Devon Loehr <DKLoehr at users.noreply.github.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/SemaCXX/unique_object_duplication.h

  Log Message:
  -----------
  Expand annotation check for -Wunique-object-duplication on Windows. (#145944)

Since dllexport/dllimport annotations don't propagate the same way as
visibility, the unique object duplication warning needs to check both
the object in question and its containing class. Previously, we
restricted this check to static data members, but it applies to all
objects inside a class, including functions. Not checking functions
leads to false positives, so remove that restriction.



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