[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-06-03 Thread Anders Waldenborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. wanders marked 2 inline comments as done. Closed by commit rGdd2362a8bab3: [clang] Allow const variables with weak attribute to be overridden (authored by wanders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Please wait a day or two before landing in case @jyknight has additional comments, though. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-27 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders updated this revision to Diff 432669. wanders added a comment. Diff updated with release note + updated text in documentation as per jyknight's suggestion. Tests for existing behavior added in separate patch: https://reviews.llvm.org/D126578 Repository: rG LLVM Github Monorepo CHAN

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D126324#3537373 , @wanders wrote: > In D126324#3536785 , @aaron.ballman > wrote: > >> The changes so far look sensible, but I think we should add some more tests >> for a few si

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D126324#3537282 , @jyknight wrote: > In D126324#3536785 , @aaron.ballman > wrote: > >> The changes so far look sensible, but I think we should add some more tests >> for a few s

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-25 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders added a comment. In D126324#3536785 , @aaron.ballman wrote: > The changes so far look sensible, but I think we should add some more tests > for a few situations. 1) Using a const weak symbol as a valid initializer > should be diagnosed (with a

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-25 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D126324#3536785 , @aaron.ballman wrote: > The changes so far look sensible, but I think we should add some more tests > for a few situations. 1) Using a const weak symbol as a valid initializer > should be diagnosed (with a

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The changes so far look sensible, but I think we should add some more tests for a few situations. 1) Using a const weak symbol as a valid initializer should be diagnosed (with a warning? with an error?) so users are alerted to the behavioral quirks. 2) Using a con

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-25 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders updated this revision to Diff 431933. wanders added a comment. Diff updated to be git-clang-format clean and to (hopefully) accommodate for differences in test output on w64. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126324/new/ https:

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-24 Thread Chris Lattner via Phabricator via cfe-commits
lattner added a comment. I'm not a competent reviewer for the patch, but +1 on aligning with GCC behavior here. I don't recall the motivation for the original patch (apologies again for the terrible commit message). This approach makes a lot of sense to me. Repository: rG LLVM Github Mono

[PATCH] D126324: [clang] Allow const variables with weak attribute to be overridden

2022-05-24 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders created this revision. wanders added reviewers: lattner, jyknight, rsmith. wanders added a project: clang. Herald added a reviewer: aaron.ballman. Herald added a project: All. wanders requested review of this revision. Herald added a subscriber: cfe-commits. A variable with `weak` attribut