[PATCH] [yaml2obj] Add new command line option `-docnum`

Sean Silva chisophugis at gmail.com
Fri May 30 13:32:14 PDT 2014


LGTM with the tiny naming nit above about convertYaml/convertYAML.

I'm slightly worried that using indices could end up being brittle as test files are changed, but I can't think of a better way to select a document without introducing a lot of complexity. We can always change it later if it turns out to be a source of bugs.

================
Comment at: tools/yaml2obj/yaml2obj.cpp:65
@@ +64,3 @@
+
+int convertYaml(yaml::Input & YIn, raw_ostream &Out, ConvertFuncPtr Convert) {
+  unsigned CurDocNum = 0;
----------------
Tiny nit: typically when we use the acronym "yaml" in camel case, we spell it with all caps, so this function should be "convertYAML".

There are good arguments for doing it the way you have here (My favorite: HTTPSend/HTTPSEnd vs HttpSend/HttpsEnd), but I'd rather stick to convention.

http://reviews.llvm.org/D3901






More information about the llvm-commits mailing list