[clang] [NFC] Tweak docs for unique-object-duplication warning (PR #142158)

2025-05-30 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/142158 This improves the documentation for the unique-object-duplication warning. It clarifies the conditions for the warning to fire, provides clearer instructions on how to resolve it, and adjusts wording to be more

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -13518,8 +13518,29 @@ bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated( // If the object isn't hidden, the dynamic linker will prevent duplication. clang::LinkageInfo Lnk = Target->getLinkageAndVisibility(); - if (Lnk.getVisibility() != HiddenVisibility) +

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -13518,8 +13518,29 @@ bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated( // If the object isn't hidden, the dynamic linker will prevent duplication. clang::LinkageInfo Lnk = Target->getLinkageAndVisibility(); - if (Lnk.getVisibility() != HiddenVisibility) +

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/143537 >From 8ff6b6828604b25ded852adba37dd82e5cf7f771 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Tue, 10 Jun 2025 13:57:06 + Subject: [PATCH 1/3] Enable UOD warning for windows --- clang/include/clang/Basic

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -13518,8 +13518,29 @@ bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated( // If the object isn't hidden, the dynamic linker will prevent duplication. clang::LinkageInfo Lnk = Target->getLinkageAndVisibility(); - if (Lnk.getVisibility() != HiddenVisibility) +

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-10 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/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

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-10 Thread Devon Loehr via cfe-commits
DKLoehr wrote: @zmodem, @nico https://github.com/llvm/llvm-project/pull/143537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -13518,8 +13518,29 @@ bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated( // If the object isn't hidden, the dynamic linker will prevent duplication. clang::LinkageInfo Lnk = Target->getLinkageAndVisibility(); - if (Lnk.getVisibility() != HiddenVisibility) +

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/143537 >From 8ff6b6828604b25ded852adba37dd82e5cf7f771 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Tue, 10 Jun 2025 13:57:06 + Subject: [PATCH 1/2] Enable UOD warning for windows --- clang/include/clang/Basic

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -806,7 +806,9 @@ def UniqueObjectDuplication : DiagGroup<"unique-object-duplication"> { Warns when objects which are supposed to be globally unique might get duplicated when built into a shared library. -If an object with hidden visibility is built into a shared library,

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -825,13 +827,15 @@ The warning can be resolved by removing one of the conditions above. In rough order of preference, this may be done by: 1. Marking the object ``const`` (if possible) 2. Moving the object's definition to a source file -3. Giving the object non-hidden visib

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/143537 >From 8ff6b6828604b25ded852adba37dd82e5cf7f771 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Tue, 10 Jun 2025 13:57:06 + Subject: [PATCH 1/2] Enable UOD warning for windows --- clang/include/clang/Basic

[clang] Enable unique-object-duplication warning for windows (PR #143537)

2025-06-11 Thread Devon Loehr via cfe-commits
@@ -13518,8 +13518,29 @@ bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated( // If the object isn't hidden, the dynamic linker will prevent duplication. clang::LinkageInfo Lnk = Target->getLinkageAndVisibility(); - if (Lnk.getVisibility() != HiddenVisibility) +

[clang] Expand annotation check for -Wunique-object-duplication on Windows. (PR #145944)

2025-06-30 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr closed https://github.com/llvm/llvm-project/pull/145944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-07-21 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/149886 This changes the glob matcher for the sanitizer special case format so that it treats `/` as matching both forward and back slashes. When dealing with cross-compiles or build systems that don't normalize slashe

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-07-22 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/149886 >From 40745a6b7caf7fae4a84b2e819ba4e45d6df0112 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Mon, 21 Jul 2025 19:07:23 + Subject: [PATCH 1/2] Make special case matcher slash-agnostic --- clang/docs/Sani

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-07-22 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/149886 >From 40745a6b7caf7fae4a84b2e819ba4e45d6df0112 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Mon, 21 Jul 2025 19:07:23 + Subject: [PATCH 1/2] Make special case matcher slash-agnostic --- clang/docs/Sani

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-07-22 Thread Devon Loehr via cfe-commits
DKLoehr wrote: > GlobPattern is also used in binary utilities' symbol/section name matching > where we want to be rigid Thanks for pointing that out! I narrowed the scope of the change so that the parts of the code which want it have to explicitly enable it. Right now that's just the special

<    1   2