Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / local-classes.cpp
blobeb0b7e43ebe40fe3789fc950bf56fcbe3421aa4c
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 namespace PR6382 {
5 int foo()
7 goto error;
9 struct BitPacker {
10 BitPacker() {}
12 BitPacker packer;
15 error:
16 return -1;
20 namespace PR6383 {
21 void test (bool gross)
23 struct compare_and_set
25 void operator() (const bool inner, const bool gross = false)
27 // the code
29 } compare_and_set2;
31 compare_and_set2 (false, gross);
35 namespace Templates {
36 template<int Value>
37 void f() {
38 struct Inner {
39 static int getValue() { return Value; }
44 namespace PR25627_dont_odr_use_local_consts {
45 template<int> struct X { X(); X(int); };
47 void foo() {
48 const int N = 10;
50 struct Local {
51 void f(X<N> = X<N>()) {} // OK
52 };