[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-07 Thread Bill Wendling via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2cbf5127d585: [Clang] Improve designated inits diagnostic location (authored by void). Changed prior to commit:

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-07 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: clang/test/SemaCXX/cxx2b-designated-initializers.cpp:13 + const S result { // expected-error {{field designator (null) does not refer to any field in type 'const S'}} +.a = x + };

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/cxx2b-designated-initializers.cpp:13 + const S result { // expected-error {{field designator (null) does not refer to any field in type 'const S'}} +.a = x + }; rsmith wrote: > Why are we

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/SemaCXX/cxx2b-designated-initializers.cpp:13 + const S result { // expected-error {{field designator (null) does not refer to any field in type 'const S'}} +.a = x + }; Why are we rejecting this?

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-06 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. Thank you for taking care of this, LGTM Comment at: clang/lib/Sema/SemaInit.cpp:2646 + if (Loc.isInvalid()) +// This could happen with a "null"

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 511529. void added a comment. Remove extraneous space. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147673/new/ https://reviews.llvm.org/D147673 Files: clang/lib/Sema/SemaInit.cpp

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-05 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: rsmith. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A "null" designator won't have a valid location. Try to approximate this location as best we can