Skip to content

Commit fafb0bb

Browse files
committed
fix: make proper assert about --file/--database_dir mutual exclusivity
1 parent 72a5e99 commit fafb0bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/generators/grpc/xpcf_grpc_gen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,12 @@ try
238238
cppast::cpp_entity_index idx; // the entity index is used to resolve cross references in the AST
239239

240240
if (!databaseDirOptIsEmpty) {
241+
assert(fileOptIsEmpty);
241242
if (int res = astParser->parse_database(options["database_dir"].as<std::string>(),options) != 0) {
242243
return res;
243244
}
244245
//parse_database(options["database_dir"].as<std::string>(),idx,options, [&](const cppast::cpp_entity_index& idx, std::ostream& out, const cppast::cpp_file& file) { astParser->parseAst(idx,out,file); });
245246
} else if (!fileOptIsEmpty) {
246-
assert(databaseDirOptIsEmpty);
247247
if (int res = astParser->parse_file(options["file"].as<std::string>(), options.count("fatal_errors") == 1) != 0) {
248248
return res;
249249
}

0 commit comments

Comments
 (0)