Hi Sarcasm,

When transforming headers using -include, arguments that ended with '/' were 
ignored.

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

Files:
  cpp11-migrate/Core/IncludeExcludeInfo.cpp

Index: cpp11-migrate/Core/IncludeExcludeInfo.cpp
===================================================================
--- cpp11-migrate/Core/IncludeExcludeInfo.cpp
+++ cpp11-migrate/Core/IncludeExcludeInfo.cpp
@@ -66,10 +66,12 @@
     // off or it interferes with prefix checking.
     if (Path.endswith("/."))
       List.push_back(Path.slice(0, Path.size() - 2).str());
+    else if (Path.endswith("/"))
+      List.push_back(Path.slice(0, Path.size() - 1).str());
     else
       List.push_back(Path.str());
 
-    llvm::errs() << "Parse: " <<List.back() << "\n";
+    llvm::errs() << "Parse: " << List.back() << "\n";
   }
   return error_code::success();
 }
Index: cpp11-migrate/Core/IncludeExcludeInfo.cpp
===================================================================
--- cpp11-migrate/Core/IncludeExcludeInfo.cpp
+++ cpp11-migrate/Core/IncludeExcludeInfo.cpp
@@ -66,10 +66,12 @@
     // off or it interferes with prefix checking.
     if (Path.endswith("/."))
       List.push_back(Path.slice(0, Path.size() - 2).str());
+    else if (Path.endswith("/"))
+      List.push_back(Path.slice(0, Path.size() - 1).str());
     else
       List.push_back(Path.str());
 
-    llvm::errs() << "Parse: " <<List.back() << "\n";
+    llvm::errs() << "Parse: " << List.back() << "\n";
   }
   return error_code::success();
 }
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to