================
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD,
// the resource attr could be on the record decl itself or on one of
// its fields (the resource handle, most commonly)
- const auto *Attr = TheRecordDecl->getAttr<HLSLResourceAttr>();
+ const auto *Attr = TheRecordDecl->getAttr<T>();
if (!Attr) {
for (auto *FD : TheRecordDecl->fields()) {
- Attr = FD->getAttr<HLSLResourceAttr>();
+ Attr = FD->getAttr<T>();
if (Attr)
break;
}
}
return Attr;
- } else if (CBufferOrTBuffer) {
- const auto *Attr = CBufferOrTBuffer->getAttr<HLSLResourceAttr>();
- return Attr;
}
- llvm_unreachable("one of the two conditions should be true.");
+ llvm_unreachable("VD should not be null");
return nullptr;
}
-void traverseType(QualType TheQualTy, RegisterBindingFlags &Flags) {
+static void setFlagsFromType(QualType TheQualTy, RegisterBindingFlags &Flags) {
----------------
damyanp wrote:
nit: maybe should `updateFlagsFromType` since it modifies the Flags passed in
to it, doesn't set them.
https://github.com/llvm/llvm-project/pull/97103
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits