mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 05:55:43 -04:00

references a const variable of integral type, the initializer may be in a different declaration than the one that name-lookup saw. Find the initializer anyway. Fixes PR6045. llvm-svn: 93514
27 lines
410 B
C++
27 lines
410 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// PR5908
|
|
template <typename Iterator>
|
|
void Test(Iterator it) {
|
|
*(it += 1);
|
|
}
|
|
|
|
namespace PR6045 {
|
|
template<unsigned int r>
|
|
class A
|
|
{
|
|
static const unsigned int member = r;
|
|
void f();
|
|
};
|
|
|
|
template<unsigned int r>
|
|
const unsigned int A<r>::member;
|
|
|
|
template<unsigned int r>
|
|
void A<r>::f()
|
|
{
|
|
unsigned k;
|
|
(void)(k % member);
|
|
}
|
|
}
|