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:
https://reviews.llvm.org/D147673?v
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
+ };
--
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
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?
Repos
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" designato
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
clang/test/SemaCXX/cxx2b-de
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 in