minix/external/bsd/llvm/dist/clang/test/SemaCXX/local-classes.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

42 lines
636 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
namespace PR6382 {
int foo()
{
goto error;
{
struct BitPacker {
BitPacker() {}
};
BitPacker packer;
}
error:
return -1;
}
}
namespace PR6383 {
void test (bool gross)
{
struct compare_and_set
{
void operator() (const bool inner, const bool gross = false)
{
// the code
}
} compare_and_set2;
compare_and_set2 (false, gross);
}
}
namespace Templates {
template<int Value>
void f() {
struct Inner {
static int getValue() { return Value; }
};
}
}