aaron.ballman added a comment. This basically LGTM, but we should add documentation to the internals manual too: https://clang.llvm.org/docs/InternalsManual.html#spellings
================ Comment at: clang/lib/AST/TypePrinter.cpp:1724-1727 + if (T->getAttrKind() == attr::ArmStreaming) { + OS << "__arm_streaming"; + return; + } ---------------- rsandifo-arm wrote: > aaron.ballman wrote: > > This seems like something that tablegen should automatically handle more > > generally for these attributes. > I wondered about trying to use tablegen for > TypePrinter::printAttributedAfter, but decided against it. > RegularKeyword is really a spelling-level classification rather than an > attribute-level classification, and in general, an attribute could have both > GNU and RegularKeyword spellings. In contrast, printAttributedAfter is only > given the attribute kind and the type that results from applying the > attribute. AFAIK, it doesn't have access to the original attribute spelling. > This means that some attribute-specific or type-specific knowledge might be > needed to print the attribute in the best way. Yeah, we've run into this problem a number of times. Ultimately, we should retain what spelling the user used because that's salient information for the AST (for example, doing AST matching looking for an `AlignedAttr` attribute where the spelling used matters for the intended semantics. But that's not something you need to address. ================ Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5262 + case ParsedAttr::AT_ArmStreaming: + CC = CC_C; // Placeholder until real SME support is added. + break; ---------------- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits