diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-10 16:31:30 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-10 16:31:30 (GMT) |
commit | bd9e551c1a13f566e6ffe8cdd1262b7628ed5330 (patch) | |
tree | 2da568df40986ff0d06c2d5d5e77090c490227a5 /Tests/CMakeLib | |
parent | c5d71b28ec2682ec160dd35015e90dd5b81a5605 (diff) | |
download | CMake-bd9e551c1a13f566e6ffe8cdd1262b7628ed5330.zip CMake-bd9e551c1a13f566e6ffe8cdd1262b7628ed5330.tar.gz CMake-bd9e551c1a13f566e6ffe8cdd1262b7628ed5330.tar.bz2 |
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.
Diffstat (limited to 'Tests/CMakeLib')
-rw-r--r-- | Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in index b141942..9958021 100644 --- a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in +++ b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in @@ -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,31 +23,26 @@ 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"; - } + } if (!logarg.empty()) { 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 } + // keep searching, it may be overridden later to provoke an error } + } if (!logfile.empty()) cmSystemTools::Touch(logfile, true); |