forked from OSchip/llvm-project
-Wmissing-prototypes: Don't warn in named namespaces nested in anonymous namespaces
This commit is contained in:
parent
2edc21e856
commit
e1e74f6cd6
|
@ -3251,7 +3251,6 @@ bool FunctionDecl::isGlobal() const {
|
|||
if (const auto *Namespace = cast<NamespaceDecl>(DC)) {
|
||||
if (!Namespace->getDeclName())
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,10 @@ namespace NS {
|
|||
namespace {
|
||||
// Don't warn about functions in anonymous namespaces.
|
||||
void f() { }
|
||||
// Even if they're in nested namespaces within an anonymous namespace.
|
||||
namespace NS {
|
||||
void f() { }
|
||||
}
|
||||
}
|
||||
|
||||
struct A {
|
||||
|
|
Loading…
Reference in New Issue