[all-commits] [llvm/llvm-project] 9670e0: Enable unique-object-duplication warning for windo...
Devon Loehr via All-commits
all-commits at lists.llvm.org
Fri Jun 13 07:30:03 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9670e09d0eac596fba6bf03ef1a6f3229dddee46
https://github.com/llvm/llvm-project/commit/9670e09d0eac596fba6bf03ef1a6f3229dddee46
Author: Devon Loehr <DKLoehr at users.noreply.github.com>
Date: 2025-06-13 (Fri, 13 Jun 2025)
Changed paths:
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaDecl.cpp
M clang/test/SemaCXX/unique_object_duplication.cpp
M clang/test/SemaCXX/unique_object_duplication.h
Log Message:
-----------
Enable unique-object-duplication warning for windows (#143537)
Followup to #125526. This expands the logic of the
unique-object-duplication warning so that it also works for windows
code.
For the most part, the logic is unchanged, merely substituting "has no
import/export annotation" in place of "has hidden visibility". However,
there are some small inconsistencies between the two; namely, visibility
is propagated through nested classes, while import/export annotations
aren't.
This PR:
1. Updates the logic for the warning to account for the differences
between posix and windows
2. Changes the warning message and documentation appropriately
3. Updates the tests to cover windows, and adds new test cases for the
places where behavior differs.
This PR was tested by building chromium (cross compiling linux->windows)
with the changes in place. After accounting for the differences in
semantics, no new warnings were discovered.
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