[PATCH] D158056: [clang] Implement constexpr operator[] for vectors
Joey Rabil via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 16 01:01:33 PDT 2023
DaPorkchop_ created this revision.
DaPorkchop_ added reviewers: erichkeane, rsmith, efriedma, void.
Herald added a project: All.
DaPorkchop_ requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This implements the array subscript operator for vector types.
As vectors don't decay into pointers, I've opted to evaluate the vector
operand as an LValue, which still gives the expected behavior.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158056
Files:
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/State.h
clang/test/SemaCXX/constexpr-vectors.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158056.550649.patch
Type: text/x-patch
Size: 57131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230816/71e53887/attachment-0001.bin>
More information about the cfe-commits
mailing list