llvm-project/clang/test/SemaCXX/warn-inline-namespace-reopened-noninline-disable.cpp
Elvina Yakubova 16501782c8 [Clang] Add support for -Wno-inline-namespace-reopened-noninline
This patch adds the option for disabling warn_inline_namespace_reopened_noninline
warning described here: https://bugs.llvm.org/show_bug.cgi?id=46106

Patch by Elvina Yakubova

Differential Revision: https://reviews.llvm.org/D81825
2020-06-25 18:48:50 +03:00

14 lines
455 B
C++

// 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
}