[PATCH] Add support to read include/exclude path lists from file

Edwin Vane edwin.vane at intel.com
Wed Apr 17 11:19:43 PDT 2013

  My concern about OS interoperability wasn't about reading the file, it was parsing it into lines: on Windows, text files are not separated by \n but by \r\n. Splitting the file buffer by '\n' may be fine but I just want to make sure.

Comment at: cpp11-migrate/Core/IncludeExcludeInfo.h:34
@@ +33,3 @@
+  /// \brief Read and parse the lists of filepaths from \a IncludeListFile
+  /// and \a ExcludeListFile.
+  ///
Perhaps mention the paths should be one per line.

Comment at: cpp11-migrate/Core/IncludeExcludeInfo.cpp:72
@@ +71,3 @@
+  parseCLInput(ExcludeString, ExcludeList, /*Separator=*/ ",");
+  return error_code::success();
Can't string parsing fail? What happens if somebody doesn't use the right separator? You'll get a bunch of paths mashed together and the sys::fs::make_absolute() call will fail (probably). Seems like we should do something other than always returning "success".


More information about the cfe-commits mailing list