Remove suppression of units conversion warnings in 19 #789 (#814)

Removed checks on dead units conversion messenger.  Units conversion
messages cannot be suppressed.  Added deprecated messages to the functions
that modified the message printouts.
This commit is contained in:
Alex Lin
2019-06-18 10:59:51 -05:00
committed by GitHub
parent 5e9723c630
commit 187fa37540
5 changed files with 16 additions and 10 deletions

View File

@ -256,10 +256,8 @@ void FieldDescription::parseComment(std::string comment) {
// map old unit names to new names
std::string new_units = map_trick_units_to_udunits(units) ;
if ( units.compare(new_units) ) {
if ( ! units_truth_is_scary ) {
std::cout << bold(color(WARNING, "Warning ") + file_name + ":" + std::to_string(line_no)) << std::endl
<< " Units converted from " << quote(units) << " to " << quote(new_units) << std::endl;
}
std::cout << bold(color(WARNING, "Warning ") + file_name + ":" + std::to_string(line_no)) << std::endl
<< " Units converted from " << quote(units) << " to " << quote(new_units) << std::endl;
units = new_units ;
}
ut_unit * test_units = ut_parse(u_system, units.c_str() , UT_ASCII) ;

View File

@ -30,7 +30,8 @@
/* Command line arguments. These work better as globals, as suggested in llvm/CommandLine documentation */
llvm::cl::list<std::string> include_dirs("I", llvm::cl::Prefix, llvm::cl::desc("Include directory"), llvm::cl::value_desc("directory"));
llvm::cl::list<std::string> defines("D", llvm::cl::Prefix, llvm::cl::desc("Defines"), llvm::cl::value_desc("define"));
llvm::cl::opt<bool> units_truth_is_scary("units-truth-is-scary", llvm::cl::desc("Don't print units conversion messages"));
// TODO: remove units_truth_is_scary in 2021.
llvm::cl::opt<bool> units_truth_is_scary("units-truth-is-scary", llvm::cl::desc("DEPRECATED: Don't print units conversion messages"));
llvm::cl::opt<bool> sim_services_flag("s", llvm::cl::desc("Gernerate io_src for Trick core headers"));
llvm::cl::opt<bool> force("f", llvm::cl::desc("Force all io_src files to be generated"));
llvm::cl::opt<int> attr_version("v", llvm::cl::desc("Select version of attributes to produce. 10 and 13 are valid"), llvm::cl::init(10));