================ @@ -2993,10 +2993,17 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return Diag(LiteralLoc, diag::warn_unsupported_target_attribute) << Unknown << Tune << ParsedAttrs.Tune << Target; - if (Context.getTargetInfo().getTriple().isRISCV() && - ParsedAttrs.Duplicate != "") - return Diag(LiteralLoc, diag::err_duplicate_target_attribute) - << Duplicate << None << ParsedAttrs.Duplicate << Target; + if (Context.getTargetInfo().getTriple().isRISCV()) { + if (ParsedAttrs.Duplicate != "") + return Diag(LiteralLoc, diag::err_duplicate_target_attribute) + << Duplicate << None << ParsedAttrs.Duplicate << Target; + for (const auto &Feature : ParsedAttrs.Features) { + auto CurFeature = StringRef(Feature); + if (!CurFeature.starts_with("+") && !CurFeature.starts_with("-")) ---------------- topperc wrote:
Use `'+'` and `'-'` instead of `"+"` and `"-"` since we're checking a single character. https://github.com/llvm/llvm-project/pull/106495 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits