xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/warn-everthing.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -Weverything -fsyntax-only %s -verify
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // This previously crashed due to a bug in the CFG.  Exercising all
4*f4a2713aSLionel Sambuc // warnings helps check CFG construction.
5*f4a2713aSLionel Sambuc class PR12271 {
6*f4a2713aSLionel Sambuc public:
7*f4a2713aSLionel Sambuc   PR12271();
8*f4a2713aSLionel Sambuc   ~PR12271();
9*f4a2713aSLionel Sambuc };
10*f4a2713aSLionel Sambuc 
testPR12271()11*f4a2713aSLionel Sambuc void testPR12271() { // expected-warning {{no previous prototype for function 'testPR12271'}}
12*f4a2713aSLionel Sambuc   PR12271 a[1][1]; // expected-warning {{unused variable 'a'}}
13*f4a2713aSLionel Sambuc }
14