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.
Paths
| Differential D158056
[clang] Implement constexpr operator[] for vectors Needs ReviewPublic Authored by DaPorkchop_ on Aug 16 2023, 1:01 AM.
Details
Summary This implements the array subscript operator for vector types. As vectors don't decay into pointers, I've opted to evaluate the vector
Diff Detail Event TimelineComment Actions Fixed test code for CodeGenCXX/temporaries.cpp Creating and extracting a reference to a temporary
Revision Contents
Diff 550731 clang/include/clang/Basic/DiagnosticASTKinds.td
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/State.h
clang/test/CodeGenCXX/temporaries.cpp
clang/test/SemaCXX/constexpr-vectors.cpp
|