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
@@ -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)
+
@@ -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)
+
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
@@ -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)
+
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
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
@@ -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)
+
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
@@ -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,
@@ -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
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
@@ -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)
+
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
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
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
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
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
101 - 118 of 118 matches
Mail list logo