File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -674,6 +674,22 @@ class TypeEncoder final : public TypeVisitor<TypeEncoder> {
674674
675675 VisitQualType (t);
676676 }
677+
678+ void VisitAutoType (const AutoType *T) {
679+ if (!T->isGNUAutoType ()) {
680+ printDiag (Context, DiagnosticsEngine::Warning,
681+ " Encountered unexpected auto type" ,
682+ src_loc, src_range);
683+ return ;
684+ }
685+
686+ auto t = T->desugar ();
687+ auto qt = encodeQualType (t);
688+ encodeType (T, TagAutoType,
689+ [qt](CborEncoder *local) { cbor_encode_uint (local, qt); });
690+
691+ VisitQualType (t);
692+ }
677693};
678694
679695class TranslateASTVisitor final
Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ enum TypeTag {
152152
153153 TagFloat128,
154154 TagAtomicType,
155+
156+ TagAutoType,
155157};
156158
157159enum StringTypeTag {
You can’t perform that action at this time.
0 commit comments