[clang] [llvm] [Clang] Fix cleanup attribute by delaying type checks after the type is deduced (PR #164440)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 24 06:50:23 PDT 2025
================
@@ -5061,6 +5061,32 @@ void EmitClangAttrParsedAttrKinds(const RecordKeeper &Records,
<< "}\n";
}
+// Emits Sema calls for type dependent attributes
+void EmitClangAttrIsTypeDependent(const RecordKeeper &Records,
+ raw_ostream &OS) {
+ emitSourceFileHeader("Attribute is type dependent", OS, Records);
+
+ std::set<StringRef> Seen;
----------------
erichkeane wrote:
Rather than a separate loop, just make your loop below:
```
for (const auto *A : Records.getAllDerivedDefinitions("Attr")) {
if (Attr.getValueAsBit("IsTypeDependent")) {
OS << /*stuff you have below*/;
}
OS << "default:\n";
...etc
```
The separate structure isn't really necessary, just skip printing below.
https://github.com/llvm/llvm-project/pull/164440
More information about the cfe-commits
mailing list