[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

Saurabh Jha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 3 06:35:49 PDT 2021


SaurabhJha updated this revision to Diff 335083.
SaurabhJha added a comment.

Addressed most of the comments. I couldn't understand "..would also be good to have C++ tests that test casting with matrix types where some of the dimensions are template arguments...". When I tried this

"""
cx4x4 m1;

(void)(ix4x4)m1
"""

it gave me the error
"""
C-style cast from 'cx4x4' (aka 'char __attribute__((matrix_type(4, 4)))') to 'ix4x4' (aka 'int __attribute__((matrix_type(4, 4)))') is not allowed
"""
should I address it as part of this patch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99037/new/

https://reviews.llvm.org/D99037

Files:
  clang/include/clang/AST/OperationKinds.def
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/Expr.cpp
  clang/lib/AST/ExprConstant.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CGExprAgg.cpp
  clang/lib/CodeGen/CGExprComplex.cpp
  clang/lib/CodeGen/CGExprConstant.cpp
  clang/lib/CodeGen/CGExprScalar.cpp
  clang/lib/Edit/RewriteObjCFoundationAPI.cpp
  clang/lib/Sema/SemaCast.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
  clang/test/CodeGen/matrix-cast.c
  clang/test/Sema/matrix-cast.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99037.335083.patch
Type: text/x-patch
Size: 20833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210403/73282e4a/attachment-0001.bin>


More information about the cfe-commits mailing list