[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 21 03:31:50 PDT 2017


teemperor created this revision.

GCC has named this `-Wnoexcept-type`, so let's add an alias to stay compatible with the GCC flags.


https://reviews.llvm.org/D34439

Files:
  include/clang/Basic/DiagnosticGroups.td
  test/SemaCXX/cxx1z-noexcept-function-type.cpp


Index: test/SemaCXX/cxx1z-noexcept-function-type.cpp
===================================================================
--- test/SemaCXX/cxx1z-noexcept-function-type.cpp
+++ test/SemaCXX/cxx1z-noexcept-function-type.cpp
@@ -1,6 +1,7 @@
 // RUN: %clang_cc1 -std=c++14 -verify -fexceptions -fcxx-exceptions %s
 // RUN: %clang_cc1 -std=c++1z -verify -fexceptions -fcxx-exceptions %s -Wno-dynamic-exception-spec
 // RUN: %clang_cc1 -std=c++14 -verify -fexceptions -fcxx-exceptions -Wno-c++1z-compat-mangling -DNO_COMPAT_MANGLING %s
+// RUN: %clang_cc1 -std=c++14 -verify -fexceptions -fcxx-exceptions -Wno-noexcept-type -DNO_COMPAT_MANGLING %s
 
 #if __cplusplus > 201402L
 
Index: include/clang/Basic/DiagnosticGroups.td
===================================================================
--- include/clang/Basic/DiagnosticGroups.td
+++ include/clang/Basic/DiagnosticGroups.td
@@ -150,6 +150,8 @@
 def FormatExtraArgs : DiagGroup<"format-extra-args">;
 def FormatZeroLength : DiagGroup<"format-zero-length">;
 def CXX1zCompatMangling : DiagGroup<"c++1z-compat-mangling">;
+// Name of this warning in GCC.
+def NoexceptType : DiagGroup<"noexcept-type", [CXX1zCompatMangling]>;
 
 // Warnings for C++1y code which is not compatible with prior C++ standards.
 def CXXPre14Compat : DiagGroup<"c++98-c++11-compat">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34439.103340.patch
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170621/42a9ff23/attachment.bin>


More information about the cfe-commits mailing list