[PATCH] -include option and -exclude ignore arguments finishing with '/'

Guillaume Papin guillaume.papin at epitech.eu
Tue Jul 30 11:03:05 PDT 2013


  Some minor comments.


================
Comment at: cpp11-migrate/Core/IncludeExcludeInfo.cpp:54
@@ -50,1 +53,3 @@
 
+/// \brief Helper function for removing relative operations from a given
+/// path i.e. "..", ".".
----------------
operations?

================
Comment at: cpp11-migrate/Core/IncludeExcludeInfo.cpp:59
@@ +58,3 @@
+  sys::path::const_iterator PathE = sys::path::end(Path);
+  SmallVector<StringRef, 32> PathT;
+  while (PathI != PathE) {
----------------
no big deal but using 32 levels of directories seems quite uncommon to me.

================
Comment at: cpp11-migrate/Core/IncludeExcludeInfo.cpp:64
@@ +63,3 @@
+      if (PathT.empty()) {
+        llvm::errs() << "Unable to remove relative operators: " << Path << "\n";
+        return "";
----------------
Wouldn't be better to print this message in parseCLInput() and instead of printing `Path` print the user-provided path (aka. `*I`)?


http://llvm-reviews.chandlerc.com/D1134



More information about the cfe-commits mailing list