[PATCH] D146582: [clang] Fix wrong highlight for _Complex
Ilyas Mustafazade via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 22 00:25:54 PDT 2023
1lyasm updated this revision to Diff 507254.
1lyasm added a comment.
Deleted comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146582/new/
https://reviews.llvm.org/D146582
Files:
clang/lib/Sema/SemaInit.cpp
Index: clang/lib/Sema/SemaInit.cpp
===================================================================
--- clang/lib/Sema/SemaInit.cpp
+++ clang/lib/Sema/SemaInit.cpp
@@ -1252,6 +1252,8 @@
unsigned DK = ExtraInitsIsError ? diag::err_excess_initializers
: diag::ext_excess_initializers;
+ if (T->isAnyComplexType() && Index < IList->getNumInits() - 1)
+ ++Index;
SemaRef.Diag(IList->getInit(Index)->getBeginLoc(), DK)
<< initKind << IList->getInit(Index)->getSourceRange();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146582.507254.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230322/433e3aa5/attachment.bin>
More information about the cfe-commits
mailing list