[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-24 Thread Hubert Tong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce21c926f8ef: [Clang] Work with multiple pragmas weak before definition (authored by hubert.reinterpretcast). Changed prior to commit: https://reviews.llvm.org/D121927?vs=417755=418092#toc Repository:

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 417755. hubert.reinterpretcast added a comment. - Adjust per observation: Use DenseMapInfo for the alias pointer value Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121927/new/

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/Weak.h:47 +static unsigned getHashValue(const WeakInfo ) { + return W.getAlias() ? DenseMapInfo::getHashValue(W.getAlias()->getName()) + : DenseMapInfo::getHashValue("");

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Sema/Weak.h:47 +static unsigned getHashValue(const WeakInfo ) { + return W.getAlias() ? DenseMapInfo::getHashValue(W.getAlias()->getName()) + :

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thank you for the fix! Comment at: clang/include/clang/Sema/Weak.h:62 +return false; + return LHS.getAlias()->getName() == RHS.getAlias()->getName(); +}

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @aaron.ballman, I believe I have responded to all of the comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121927/new/ https://reviews.llvm.org/D121927 ___

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 417666. hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added a comment. - Address review comments: Return `const` from getAlias() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 417443. hubert.reinterpretcast added a comment. - Address review comments: Add release notes, expand comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121927/new/

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Sema/Weak.h:33 + : alias(Alias), loc(Loc) {} + inline IdentifierInfo *getAlias() const { return alias; } inline SourceLocation getLocation() const { return loc; }

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 417386. hubert.reinterpretcast marked 2 inline comments as done. hubert.reinterpretcast added a comment. - Address review comments: Use default member init in WeakInfo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Sema/Weak.h:33 + : alias(Alias), loc(Loc) {} + inline IdentifierInfo *getAlias() const { return alias; } inline SourceLocation

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Sema/Weak.h:62 +return false; + return LHS.getAlias()->getName() == RHS.getAlias()->getName(); +}

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the fix? Comment at: clang/include/clang/Sema/Sema.h:1075-1077 /// WeakUndeclaredIdentifiers - Identifiers contained in /// \#pragma weak before declared. rare. may alias another /// identifier,

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 417042. hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added a comment. - Address review comments: Remove deleted non-operator member functions; add extra line to test Repository: rG LLVM Github Monorepo

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Sema/Weak.h:35 inline SourceLocation getLocation() const { return loc; } - void setUsed(bool Used=true) { used = Used; } - inline bool

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-18 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm accepted this revision. cebowleratibm added a comment. This revision is now accepted and ready to land. Makes sense to me. Comment at: clang/include/clang/Sema/Weak.h:35 inline SourceLocation getLocation() const { return loc; } - void setUsed(bool Used=true)

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: jamieschmeiser, aaron.ballman, chandlerc, cebowleratibm, w2yehia. Herald added a project: All. hubert.reinterpretcast requested review of this revision. Herald added a project: clang. Update