[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

Piyou Chen via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 3 23:12:53 PST 2024


================
@@ -463,7 +463,8 @@ ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const {
         Ret.Duplicate = "tune=";
 
       Ret.Tune = AttrString;
-    }
+    } else if (Feature.starts_with("+"))
----------------
BeMg wrote:

This code section will make clang violate target attribute syntax specification.

https://github.com/riscv-non-isa/riscv-c-api-doc/blob/master/riscv-c-api.md#__attribute__targetattr-string 

https://github.com/llvm/llvm-project/pull/83674


More information about the cfe-commits mailing list