Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeCompletion / preferred-type.cpp
blob1c16ee0c581a54aecc735b995c369bd49f706696
1 void test(bool x) {
2 if (x) {}
3 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):7 %s | FileCheck %s
4 // CHECK: PREFERRED-TYPE: _Bool
6 while (x) {}
7 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):10 %s | FileCheck %s
9 for (; x;) {}
10 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):10 %s | FileCheck %s
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);