clang/test/Parser/gh30908-scope-balance-on-invalid-var-direct-init-2.cpp
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | #include <non-exist-header> // expected-error {{file not found}} |
| 4 | |
| 5 | class S {}; |
| 6 | |
| 7 | template <typename T> |
| 8 | class E { |
| 9 | public: |
| 10 | E(S* scope) {} |
| 11 | S &getS(); |
| 12 | }; |
| 13 | |
| 14 | class Z { |
| 15 | private: |
| 16 | static E<Z> e; |
| 17 | static S& s(); |
| 18 | }; |
| 19 | |
| 20 | E<Z> Z::e(&__UNKNOWN_ID__); |
| 21 | |
| 22 | S& Z::s() { return Z::e.getS(); } |