================ @@ -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) { ---------------- bob80905 wrote:
That makes sense, I suppose set only makes sense if somehow the function was responsible for initialization. Changed set* to update*. https://github.com/llvm/llvm-project/pull/97103 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits