brintos

brintos / llvm-project-archived public Read only

0
0
Text · 522 B · 1c16ee0 Raw
16 lines · cpp
1void test(bool x) {2  if (x) {}3  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):7 %s | FileCheck %s4  // CHECK: PREFERRED-TYPE: _Bool5 6  while (x) {}7  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):10 %s | FileCheck %s8 9  for (; x;) {}10  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):10 %s | FileCheck %s11 12  // FIXME(ibiryukov): the condition in do-while is parsed as expression, so we13  // fail to detect it should be converted to bool.14  // do {} while (x);15}16