mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 00:16:39 +00:00

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
14 lines
455 B
C++
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
|
|
}
|