================ @@ -8927,8 +8927,13 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } - if (T->isRVVSizelessBuiltinType()) - checkRVVTypeSupport(T, NewVD->getLocation(), cast<Decl>(CurContext)); + if (T->isRVVSizelessBuiltinType() && isa<FunctionDecl>(CurContext)) { + const FunctionDecl *FD = cast<FunctionDecl>(CurContext); + llvm::StringMap<bool> CallerFeatureMap; + Context.getFunctionFeatureMap(CallerFeatureMap, FD); ---------------- 4vtomat wrote:
> > But we don't have the FunctionDecl info in the > > RISCVTargetInfo::initFeatureMap call. > > What about keeping this map in ASTContext instead? I guess it might be a feasible solution, however the memory usage might increase since it has to keep the map for each function during the lifetime of the ASTContext. @topperc Do you think we can do this? Or we can leave it in TODO until it becomes a problem in some real cases. https://github.com/llvm/llvm-project/pull/83674 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits