================
@@ -2200,47 +2200,43 @@ static void BuildFlattenedTypeList(QualType BaseTy,
}
bool SemaHLSL::IsTypedResourceElementCompatible(clang::QualType QT) {
- if (QT.isNull())
+ // null and array types are not allowed.
+ if (QT.isNull() || QT->isArrayType())
return false;
- // check if the outer type was an array type
- if (QT->isArrayType())
+ // UDT types are not allowed
+ clang::QualType CanonicalType = QT.getCanonicalType();
----------------
llvm-beanz wrote:
Most of the ways you're actually using this you likely don't need to query the
canonical type. `QT->isRecordType()` will query the type of the canonical type
directly.
https://github.com/llvm/llvm-project/pull/115045
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits