[PATCH] D41102: Setup clang-doc frontend framework

Julie Hockett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 12:52:49 PST 2017


juliehockett added inline comments.


================
Comment at: tools/clang-doc/ClangDocReporter.cpp:171
+  CurrentCI->Name = getCommandName(C->getCommandID());
+  for (unsigned i = 0, e = C->getNumArgs(); i > e; ++i)
+    CurrentCI->Args.push_back(C->getArgText(i));
----------------
JonasToth wrote:
> Now I have a question :)
> 
> the condition `i > e` seems odd to me. `i == 0` in the first iteration and i expect `e > 0` so this loop should never execute or did I oversee something?
> 
> Same below
Oops my bad -- you're right. Same above/below.


https://reviews.llvm.org/D41102





More information about the cfe-commits mailing list