diff options
author | Brad King <brad.king@kitware.com> | 2019-01-16 14:52:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-16 14:52:45 (GMT) |
commit | bd54cc774a5b14720a9e741fc40192ea11106443 (patch) | |
tree | f8d0bab5ca429938678e74af746ee9ab0ccdd778 /Source/CTest | |
parent | e2c39e05732409d60e7921b45a70dd8b9aa24b5a (diff) | |
parent | b056bc34258267c4ae59c72e3777d0a0f0b5a1b1 (diff) | |
download | CMake-bd54cc774a5b14720a9e741fc40192ea11106443.zip CMake-bd54cc774a5b14720a9e741fc40192ea11106443.tar.gz CMake-bd54cc774a5b14720a9e741fc40192ea11106443.tar.bz2 |
Merge topic 'semi-warnings'
b056bc3425 Fix most clang -Wextra-semi-stmt warnings in C++ files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2795
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 18 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 1 |
2 files changed, 11 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 539a0ce..361883c 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -357,14 +357,18 @@ int cmCTestBuildHandler::ProcessHandler() // Pre-compile regular expressions objects for all regular expressions #define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \ - regexes.clear(); \ - cmCTestOptionalLog(this->CTest, DEBUG, \ - this << "Add " #regexes << std::endl, this->Quiet); \ - for (std::string const& s : (strings)) { \ + do { \ + regexes.clear(); \ cmCTestOptionalLog(this->CTest, DEBUG, \ - "Add " #strings ": " << s << std::endl, this->Quiet); \ - (regexes).push_back(s.c_str()); \ - } + this << "Add " #regexes << std::endl, this->Quiet); \ + for (std::string const& s : (strings)) { \ + cmCTestOptionalLog(this->CTest, DEBUG, \ + "Add " #strings ": " << s << std::endl, \ + this->Quiet); \ + (regexes).push_back(s.c_str()); \ + } \ + } while (false) + cmCTestBuildHandlerPopulateRegexVector(this->CustomErrorMatches, this->ErrorMatchRegex); cmCTestBuildHandlerPopulateRegexVector(this->CustomErrorExceptions, diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 1d9a5f7..fbd1038 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -57,7 +57,6 @@ public: { this->CommandLineStrings.clear(); this->CommandLineStrings.push_back(command); - ; } void AddArgument(const char* arg) { |