1 // RUN: clang-tidy %s -checks='-*,readability-simplify-boolean-expr' -- -std=c++17 | count 0
2 struct RAII {};
foo(bool Cond)3 bool foo(bool Cond) {
4   bool Result;
5 
6   if (RAII Object; Cond)
7     Result = true;
8   else
9     Result = false;
10 
11   if (bool X = Cond; X)
12     Result = true;
13   else
14     Result = false;
15 
16   if (bool X = Cond; X)
17     return true;
18   return false;
19 }
20