[PATCH] D41102: Setup clang-doc frontend framework
Julie Hockett via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 11:55:12 PST 2018
juliehockett added inline comments.
================
Comment at: clang-doc/BitcodeWriter.cpp:407
+
+void ClangDocBinaryWriter::writeBitstream(const EnumInfo &I,
+ BitstreamWriter &Stream,
----------------
lebedev.ri wrote:
> Hmm, common pattern again
> ```
> void ClangDocBinaryWriter::writeBitstream(const <TYPENAME> &I,
> BitstreamWriter &Stream,
> bool writeBlockInfo) {
> if (writeBlockInfo) emitBlockInfoBlock(Stream);
> StreamSubBlock Block(Stream, BI_<ENUM_NAMETYPE>_BLOCK_ID);
> ...
> }
> ```
> Could be solved if a mapping from `TYPENAME` -> `BI_<ENUM_NAMETYPE>_BLOCK_ID` can be added.
> If LLVM would be using C++14, that'd be easy, but with C++11, it would require whole new class (although with just a single static variable).
Do you want me to try to write that class, or leave it as it is?
================
Comment at: clang-doc/Mapper.cpp:113
+ populateInfo(I, D, C);
+ I.Loc.emplace_back(Location{LineNumber, File});
+}
----------------
lebedev.ri wrote:
> ```
> I.Loc.emplace_back({LineNumber, File});
> ```
That...doesn't work? Throws a no-matching-function error (suggesting to try emplacing a Location instead of a <brace-enclosed initializer list>
https://reviews.llvm.org/D41102
More information about the cfe-commits
mailing list