diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-04-08 15:51:36 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-04-13 15:26:02 (GMT) |
commit | f2a33107be2d7d701708506c4c3054799d941bd6 (patch) | |
tree | 5fe7cc0705c425c368c293ff6dab6642ff1745ed /Source/cmMakefile.cxx | |
parent | 4e9e7c713e01284d48fff8f3f18b3ffb08b6eaf9 (diff) | |
download | CMake-f2a33107be2d7d701708506c4c3054799d941bd6.zip CMake-f2a33107be2d7d701708506c4c3054799d941bd6.tar.gz CMake-f2a33107be2d7d701708506c4c3054799d941bd6.tar.bz2 |
clang-tidy: address bugprone-branch-clone lints
Arguably, many of these are bugs in `clang-tidy`. An if/else tree with
other conditionals between cloned blocks may be relying on the
intermediate logic to fall out of the case and inverting this logic may
be non-trivial.
See: https://bugs.llvm.org/show_bug.cgi?id=44165
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 69f316d..0b532e7 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2513,10 +2513,7 @@ void cmMakefile::ExpandVariablesCMP0019() for (auto l = linkLibs.begin(); l != linkLibs.end(); ++l) { std::string libName = *l; - if (libName == "optimized") { - ++l; - libName = *l; - } else if (libName == "debug") { + if (libName == "optimized" || libName == "debug") { ++l; libName = *l; } |