================
@@ -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);
----------------
lukel97 wrote:

> > @4vtomat if the MCPU has a feature but the function explicitly disables it 
> > then I think we want the `-`
> 
> Why don't we just remove it from feature map?

We also need the negative extensions if the target attribute string is a 
complete arch, e.g. `__attribute__((target="arch=rv64i")))`, because any 
extensions from mcpu need to be turned off.

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

Reply via email to