[PATCH] D13790: Add "-Wc++11-inline-namespace" so that libc++ can use -pedantic in C++03.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 15 15:22:40 PDT 2015
EricWF created this revision.
EricWF added a reviewer: rsmith.
EricWF added a subscriber: cfe-commits.
The title says it all.
http://reviews.llvm.org/D13790
Files:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticParseKinds.td
Index: include/clang/Basic/DiagnosticParseKinds.td
===================================================================
--- include/clang/Basic/DiagnosticParseKinds.td
+++ include/clang/Basic/DiagnosticParseKinds.td
@@ -271,7 +271,7 @@
"reference qualifiers on functions are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
def ext_inline_namespace : ExtWarn<
- "inline namespaces are a C++11 feature">, InGroup<CXX11>;
+ "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>;
def warn_cxx98_compat_inline_namespace : Warning<
"inline namespaces are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
Index: include/clang/Basic/DiagnosticGroups.td
===================================================================
--- include/clang/Basic/DiagnosticGroups.td
+++ include/clang/Basic/DiagnosticGroups.td
@@ -217,6 +217,7 @@
def IncompleteModule : DiagGroup<"incomplete-module",
[IncompleteUmbrella, NonModularIncludeInModule]>;
+def CXX11InlineNamespace : DiagGroup<"c++11-inline-namespace">;
def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
@@ -679,7 +680,8 @@
// A warning group for warnings about using C++11 features as extensions in
// earlier C++ versions.
-def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11LongLong]>;
+def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11InlineNamespace,
+ CXX11LongLong]>;
// A warning group for warnings about using C++14 features as extensions in
// earlier C++ versions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13790.37528.patch
Type: text/x-patch
Size: 1698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151015/5905609c/attachment.bin>
More information about the cfe-commits
mailing list