Shih-wei Liao | f8fd82b | 2010-02-10 11:10:31 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | |||||
3 | // PR5908 | ||||
4 | template <typename Iterator> | ||||
5 | void Test(Iterator it) { | ||||
6 | *(it += 1); | ||||
7 | } | ||||
8 | |||||
9 | namespace PR6045 { | ||||
10 | template<unsigned int r> | ||||
11 | class A | ||||
12 | { | ||||
13 | static const unsigned int member = r; | ||||
14 | void f(); | ||||
15 | }; | ||||
16 | |||||
17 | template<unsigned int r> | ||||
18 | const unsigned int A<r>::member; | ||||
19 | |||||
20 | template<unsigned int r> | ||||
21 | void A<r>::f() | ||||
22 | { | ||||
23 | unsigned k; | ||||
24 | (void)(k % member); | ||||
25 | } | ||||
26 | } |