PseudoMemcheck: revise style with clang-format.

Rename memtester.cxx.in to memtester.cxx, run clang-format, then restore
the original name.  Fix the @_retval@ placeholder that was broken by
clang-format.
This commit is contained in:
Daniel Pfeifer 2016-06-10 18:31:30 +02:00
parent c5d71b28ec
commit bd9e551c1a
1 changed files with 8 additions and 14 deletions

View File

@ -4,8 +4,7 @@
#define RETVAL @_retval@
int
main(int ac, char **av)
int main(int ac, char** av)
{
cmsys::Encoding::CommandLineArguments args =
cmsys::Encoding::CommandLineArguments::Main(ac, av);
@ -24,8 +23,7 @@ main(int ac, char **av)
#else
logarg = "-log-file=";
#endif
else if (exename.find("BC") != exename.npos)
{
else if (exename.find("BC") != exename.npos) {
nextarg = true;
logarg = "/X";
}
@ -34,16 +32,12 @@ main(int ac, char **av)
std::string logfile;
for (int i = 1; i < argc; i++) {
std::string arg = argv[i];
if (arg.find(logarg) == 0)
{
if (nextarg)
{
if (arg.find(logarg) == 0) {
if (nextarg) {
if (i == argc - 1)
return 1; // invalid command line
logfile = argv[i + 1];
}
else
{
} else {
logfile = arg.substr(logarg.length());
}
// keep searching, it may be overridden later to provoke an error