[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / gh30908-scope-balance-on-invalid-var-direct-init-1.cpp
blob1a692fe8ff1e72f7479a9eeac0a05354aad1a364
1 // RUN: %clang_cc1 -ferror-limit 2 -fsyntax-only -verify %s
3 // expected-error@* {{too many errors emitted}}
5 namespace llvm {
6 namespace Hexagon {}
8 void set() {
9 Hexagon::NoRegister;
10 // expected-error@-1 {{use of undeclared identifier}}
11 // expected-note@-5 {{declared here}}
12 // expected-error@-3 {{no member named 'NoRegister' in namespace}}
14 template <class> struct pair { pair(int, int); };
15 struct HexagonMCChecker {
16 static pair<int> Unconditional;
17 void checkRegisters();
19 pair<int> HexagonMCChecker::Unconditional(Hexagon::NoRegister, 0);
20 void HexagonMCChecker::checkRegisters() {}