[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / Sema / warn-main-returns-bool-literal.cpp
blob188f161dd324f8d038dfc03924d4575fb57e5afd
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wmain -verify %s
3 // expected-note@+1 {{previous definition is here}}
4 int main() {
5 return 0;
6 } // no-warning
8 // expected-error@+1 {{redefinition of 'main'}}
9 int main() {
10 return 1.0;
11 } // no-warning
13 int main() {
14 bool b = true;
15 return b; // no-warning
18 int main() {
19 return true; // expected-warning {{bool literal returned from 'main'}}