This revision was automatically updated to reflect the committed changes.
Closed by commit rL303741: Method loadFromCommandLine should be able to report
errors (authored by sepavloff).
Changed prior to commit:
https://reviews.llvm.org/D33272?vs=99919&id=100069#toc
Repository:
rL LLVM
https:
alexfh accepted this revision.
alexfh added a comment.
Thanks, LG!
https://reviews.llvm.org/D33272
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sepavloff updated this revision to Diff 99919.
sepavloff added a comment.
Updated patch
https://reviews.llvm.org/D33272
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Frontend/CreateInvocationFromCommandLine.cpp
lib/Tooling/CommonOptionsParser.cpp
lib/Tooling/CompilationDatabase
sepavloff added a comment.
I see your reasons. Updated the patch accordingly.
Thank you!
https://reviews.llvm.org/D33272
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexfh added inline comments.
Comment at: lib/Tooling/CommonOptionsParser.cpp:122
+ FixedCompilationDatabase::loadFromCommandLine(argc, argv, ErrorMessage);
+ if (!Compilations && StringRef(ErrorMessage).startswith("error"))
+llvm::errs() << ErrorMessage;
--
sepavloff added a comment.
Thank you!
I put updated fix here. If it is OK, I'll commit it tomorrow.
Comment at: lib/Tooling/CompilationDatabase.cpp:292
+ if (Argc == 0) {
+ErrorMsg = "error: no arguments specified\n";
+return nullptr;
alexfh wrote:
>
sepavloff updated this revision to Diff 99786.
sepavloff marked an inline comment as done.
sepavloff added a comment.
Addressed reviewer's notes.
https://reviews.llvm.org/D33272
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Frontend/CreateInvocationFromCommandLine.cpp
lib/Tooling
alexfh added inline comments.
Comment at: lib/Tooling/CompilationDatabase.cpp:164
+// to user.
+} else if (DiagLevel >= DiagnosticsEngine::Error)
+ Other.HandleDiagnostic(DiagLevel, Info);
Another couple of nits:
1. the comment below would probably b
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
sepavloff updated this revision to Diff 99600.
sepavloff added a comment.
Change loadFromCommandLine so that it returns std::unique_ptr as methods of
CompilationDatabase does
https://reviews.llvm.org/D33272
Files:
include/clang/Tooling/CompilationDatabase.h
lib/Frontend/CreateInvocationFro
sepavloff added a comment.
In https://reviews.llvm.org/D33272#758616, @joerg wrote:
> Can this use ErrorOr?
It makes sense if constructing methods of `CompilationDatabase` were also
changed to return `ErrorOr`, as there is no need to have different interfaces
for the similar functionality. On
joerg added a comment.
Can this use ErrorOr?
https://reviews.llvm.org/D33272
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sepavloff created this revision.
Now FixedCompilationDatabase::loadFromCommandLine has no means to report
which error occurred if it fails to create compilation object. This is
a block for implementing https://reviews.llvm.org/D33013, because after that
change driver refuses
to create compilation
13 matches
Mail list logo