[PATCH] D27784: Add a class ASTRecordReader which wraps an ASTReader, a RecordData, and ModuleFile.

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 11:50:57 PST 2016

rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.

Comment at: lib/Serialization/ASTReader.cpp:5870-5876
+    TL.setWrittenTypeSpec(
+        static_cast<DeclSpec::TST>(Reader.getRecordData()[Idx++]));
+    TL.setWrittenSignSpec(
+        static_cast<DeclSpec::TSS>(Reader.getRecordData()[Idx++]));
+    TL.setWrittenWidthSpec(
+        static_cast<DeclSpec::TSW>(Reader.getRecordData()[Idx++]));
+    TL.setModeAttr(Reader.getRecordData()[Idx++]);
Can you remove the `.getRecordData()` here and use `ASTRecordReader::operator[]` instead?


More information about the cfe-commits mailing list