diff options
author | terminaldweller <thabogre@gmail.com> | 2021-07-14 06:34:01 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-07-14 06:34:01 +0000 |
commit | e447e32aa105dac13375818c245404120d5f28af (patch) | |
tree | 6d68ea789c338a14350ec349f296d426015a4af6 | |
parent | fix for llvm 13 (diff) | |
download | cgrep-1.1.1.tar.gz cgrep-1.1.1.zip |
fix for llvm 13v1.1.1
-rw-r--r-- | cgrep.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1106,11 +1106,16 @@ private: /*Main*/ int main(int argc, const char **argv) { #if __clang_major__ >= 13 - auto op = CommonOptionsParser::create(argc, argv, CGrepCat); + auto op = + CommonOptionsParser::create(argc, argv, CGrepCat); + if (auto error = op.takeError()) { + errs() << toString(std::move(error)) << "\n"; + return 1; + } + ClangTool Tool(op->getCompilations(), op->getSourcePathList()); #else CommonOptionsParser op(argc, argv, CGrepCat); #endif - ClangTool Tool(op.getCompilations(), op.getSourcePathList()); int ret = 0; if ("" != CO_TRACE) { |