[PATCH] D146503: Fix highlighting issue with _complex and initialization list with more than 2 items
NagaChaitanya Vellanki via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 22 15:17:21 PDT 2023
chaitanyav marked an inline comment as done.
chaitanyav added a comment.
@aaron.ballman Please review.
================
Comment at: clang/test/Sema/complex-init-list.c:37
struct teststruct invalid1 = { 1, 2 }; // expected-warning {{excess elements}}
-_Complex float invalid2 = { 1, 2, 3 }; // expected-warning {{excess elements}}
+_Complex float invalid2 = { 1, 2, 3 }; // expected-warning {{specifying real and imaginary components is an extension}} expected-warning {{excess elements in scalar initializer}}
_Complex float invalid3 = {}; // expected-error {{scalar initializer cannot be empty}} expected-warning {{GNU empty initializer}}
----------------
aaron.ballman wrote:
> This makes it a bit easier to see that there are two diagnostics being fired (even though we're not consistently doing that in this test file).
Yeah, one because its an extension and other because it has excess elements. Checked this file added that on lines its applicable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146503/new/
https://reviews.llvm.org/D146503
More information about the cfe-commits
mailing list