Nathan =?utf-8?q?Gauër?= <brio...@google.com>,
Nathan =?utf-8?q?Gauër?= <brio...@google.com>,
Nathan =?utf-8?q?Gauër?= <brio...@google.com>,
Nathan =?utf-8?q?Gauër?= <brio...@google.com>,
Nathan =?utf-8?q?Gauër?= <brio...@google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/141...@github.com>


================
@@ -1147,6 +1154,26 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D, 
const ParsedAttr &AL) {
                  HLSLSV_DispatchThreadIDAttr(getASTContext(), AL));
 }
 
+bool SemaHLSL::diagnosePositionType(QualType T, const ParsedAttr &AL) {
+  const auto *VT = T->getAs<VectorType>();
+
+  if (!T->hasFloatingRepresentation() || (VT && VT->getNumElements() > 4)) {
+    Diag(AL.getLoc(), diag::err_hlsl_attr_invalid_type)
+        << AL << "float/float1/float2/float3";
----------------
farzonl wrote:

I mean some thing like float vector between 1 and `VT->getNumElements()`

https://github.com/llvm/llvm-project/pull/141759
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to