aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.h
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2024-11-25 12:15:31 +0100
committerGitHub <noreply@github.com>2024-11-25 12:15:31 +0100
commitceaf6e912a846b88f19df682c6bdbe9516be04e9 (patch)
tree44b88a7b4d3a0ceb3f81407c4b24cdd049081e32 /clang/lib/AST/ByteCode/Compiler.h
parente477989a055f92f6ca63fc8f76929cde81d33e44 (diff)
downloadllvm-ceaf6e912a846b88f19df682c6bdbe9516be04e9.zip
llvm-ceaf6e912a846b88f19df682c6bdbe9516be04e9.tar.gz
llvm-ceaf6e912a846b88f19df682c6bdbe9516be04e9.tar.bz2
[clang][bytecode] Support ImplicitValueInitExpr for multi-dim arrays (#117312)
The attached test case from https://github.com/llvm/llvm-project/issues/117294 used to cause an assertion because we called classifPrim() on an array type. The new result doesn't crash but isn't exactly perfect either. Since the problem arises when evaluating an ImplicitValueInitExpr, we have no proper source location to point to. Point to the caller instead.
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.h')
-rw-r--r--clang/lib/AST/ByteCode/Compiler.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.h b/clang/lib/AST/ByteCode/Compiler.h
index d1b624d..2a94f5e 100644
--- a/clang/lib/AST/ByteCode/Compiler.h
+++ b/clang/lib/AST/ByteCode/Compiler.h
@@ -325,6 +325,7 @@ private:
/// Emits a zero initializer.
bool visitZeroInitializer(PrimType T, QualType QT, const Expr *E);
bool visitZeroRecordInitializer(const Record *R, const Expr *E);
+ bool visitZeroArrayInitializer(QualType T, const Expr *E);
/// Emits an APSInt constant.
bool emitConst(const llvm::APSInt &Value, PrimType Ty, const Expr *E);