brintos

brintos / llvm-project-archived public Read only

0
0
Text · 349 B · 310afe0 Raw
20 lines · cpp
1// RUN: clang-tidy %s -checks='-*,readability-simplify-boolean-expr' -- -std=c++17 | count 02struct RAII {};3bool foo(bool Cond) {4  bool Result;5 6  if (RAII Object; Cond)7    Result = true;8  else9    Result = false;10 11  if (bool X = Cond; X)12    Result = true;13  else14    Result = false;15 16  if (bool X = Cond; X)17    return true;18  return false;19}20