llvm-for-llvmta/tools/clang/test/SemaCXX/warn-inline-namespace-reope...

14 lines
455 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -fsyntax-only -Wall -verify -std=c++11 %s
// RUN: %clang_cc1 -fsyntax-only -Wall -Wno-inline-namespace-reopened-noninline -DSILENCE -verify -std=c++11 %s
namespace X {
#ifndef SILENCE
inline namespace {} // expected-note {{previous definition}}
namespace {} // expected-warning {{inline namespace reopened as a non-inline namespace}}
#else
// expected-no-diagnostics
inline namespace {}
namespace {}
#endif
}