================
Comment at: clang-modernize/tool/ClangModernize.cpp:362
@@ +361,3 @@
+    llvm::report_fatal_error(
+        "No sources or compilation database were provided.");
+
----------------
I'd just say "Could not determine sources to transform".

================
Comment at: clang-modernize/tool/ClangModernize.cpp:353
@@ +352,3 @@
+      // if the file is included when include/exclude paths are specified.
+      if (GlobalOptions.ModifiableFiles.isIncludeListEmpty() ||
+          GlobalOptions.ModifiableFiles.isFileIncluded(*I))
----------------
As we talked about: until all transforms are smart enough to generate 
replacements only if they can make changes to all necessary files, we shouldn't 
transform all sources in the compilation database without an explicit -include. 
Otherwise none of the headers will transform and some (at least the 
use-auto_ptr transform) will produce broken code.

For now, exit with a message saying "Use -include to indicate which files of 
the compilation database to transform".


http://llvm-reviews.chandlerc.com/D1517
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to