[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-11 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 459394. junaire added a comment. Rebase, adjust commit message and release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-10 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 459287. junaire added a comment. Try to address Aaron's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133088#3782126 , @pmor13 wrote: > @aaron.ballman > >> block scope variable to have *internal* linkage instead of *no* linkage > > static int x; > > void f(void) > { > extern int x; // block scope,

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-10 Thread pmor via Phabricator via cfe-commits
pmor13 added a comment. @aaron.ballman > block scope variable to have *internal* linkage instead of *no* linkage static int x; void f(void) { extern int x; // block scope, internal linkage } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5904-5905 def err_block_extern_cant_init : Error< - "'extern' variable cannot have an initializer">; + "declaration of block scope identifier with %select{external|internal}0 " +

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. gentle ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-04 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 457855. junaire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-02 Thread pmor via Phabricator via cfe-commits
pmor13 added a comment. Looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 457485. junaire added a comment. Update the existing diagnostic and its tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-09-01 Thread pmor via Phabricator via cfe-commits
pmor13 added a comment. Note that this code: int x; void f(void) { extern int x = 1; } needs to produce: error" declaration of block scope identifier with external linkage shall have no initializer So, `err_block_extern_cant_init` needs to be updated too (I think).

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-08-31 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 457171. junaire added a comment. Simpify code a little bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133088/new/ https://reviews.llvm.org/D133088 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133088: [Clang] Fix wrong diagnostic for scope identifier with internal linkage

2022-08-31 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added a reviewer: aaron.ballman. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If the declaration of an identifier has block scope, and the identifier has