test(bool x)1 void test(bool x) {
2   if (x) {}
3   // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:2:7 %s | FileCheck %s
4   // CHECK: PREFERRED-TYPE: _Bool
5 
6   while (x) {}
7   // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:6:10 %s | FileCheck %s
8 
9   for (; x;) {}
10   // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:9:10 %s | FileCheck %s
11 
12   // FIXME(ibiryukov): the condition in do-while is parsed as expression, so we
13   // fail to detect it should be converted to bool.
14   // do {} while (x);
15 }
16