brintos

brintos / llvm-project-archived public Read only

0
0
Text · 400 B · 188f161 Raw
21 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wmain -verify %s2 3// expected-note@+1 {{previous definition is here}}4int main() {5  return 0;6}  // no-warning7 8// expected-error@+1 {{redefinition of 'main'}}9int main() {10  return 1.0;11}  // no-warning12 13int main() {14  bool b = true;15  return b;  // no-warning16}17 18int main() {19  return true;  // expected-warning {{bool literal returned from 'main'}}20}21