alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
Thank you! This looks good with one nit (see the inline comment).
================
Comment at: lib/Tooling/CompilationDatabase.cpp:292
+ if (Argc == 0) {
+ ErrorMsg = "error: no arguments specified\n";
+ return nullptr;
----------------
The lack of the arguments (or the `--` below) shouldn't be treated as an error
(at least an error that is worth showing to the user). The caller will just
move on to trying the next kind of a compilation database. The only actual
errors we can get here may be coming from `stripPositionalArgs`.
The caller should be modified accordingly (i.e. not output anything when both
the return value is `nullptr` and `ErrorMsg` is empty).
https://reviews.llvm.org/D33272
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits