[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / warn-inline-namespace-reopened-noninline-disable.cpp
blob3cc683006c412d39de98ac297778c9cf9fc51f8d
1 // RUN: %clang_cc1 -fsyntax-only -Wall -verify -std=c++11 %s
2 // RUN: %clang_cc1 -fsyntax-only -Wall -Wno-inline-namespace-reopened-noninline -DSILENCE -verify -std=c++11 %s
4 namespace X {
5 #ifndef SILENCE
6 inline namespace {} // expected-note {{previous definition}}
7 namespace {} // expected-warning {{inline namespace reopened as a non-inline namespace}}
8 #else
9 // expected-no-diagnostics
10 inline namespace {}
11 namespace {}
12 #endif