diff options
author | Craig Topper <craig.topper@sifive.com> | 2022-10-24 12:30:36 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2022-10-24 12:38:32 -0700 |
commit | c3ead85e2f1c94b9be40d6c24532f2b932c8bfc7 (patch) | |
tree | d10c57ee4ed8be8747fb9c6da06bf98bd59a44f2 /clang/lib/Analysis/UninitializedValues.cpp | |
parent | 975740bf8db92e054b95a7cedd646d7bc3f74fed (diff) | |
download | llvm-c3ead85e2f1c94b9be40d6c24532f2b932c8bfc7.zip llvm-c3ead85e2f1c94b9be40d6c24532f2b932c8bfc7.tar.gz llvm-c3ead85e2f1c94b9be40d6c24532f2b932c8bfc7.tar.bz2 |
[RISCV][clang] Support RISC-V vectors in UninitializedValues.
RISC-V vectors are basically vectors, but we use builtin types to
restrict the possible types. Treat them the same as vectors and scalars
for this analysis.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D136511
Diffstat (limited to 'clang/lib/Analysis/UninitializedValues.cpp')
-rw-r--r-- | clang/lib/Analysis/UninitializedValues.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Analysis/UninitializedValues.cpp b/clang/lib/Analysis/UninitializedValues.cpp index 7f44685..8f9230c 100644 --- a/clang/lib/Analysis/UninitializedValues.cpp +++ b/clang/lib/Analysis/UninitializedValues.cpp @@ -46,7 +46,8 @@ static bool isTrackedVar(const VarDecl *vd, const DeclContext *dc) { !vd->isExceptionVariable() && !vd->isInitCapture() && !vd->isImplicit() && vd->getDeclContext() == dc) { QualType ty = vd->getType(); - return ty->isScalarType() || ty->isVectorType() || ty->isRecordType(); + return ty->isScalarType() || ty->isVectorType() || ty->isRecordType() || + ty->isRVVType(); } return false; } |