[libcxxabi] r305173 - cxa_demangle: fix -Wimplicit-fallthrough for GCC:7

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 11 15:57:31 PDT 2017


Author: compnerd
Date: Sun Jun 11 17:57:31 2017
New Revision: 305173

URL: http://llvm.org/viewvc/llvm-project?rev=305173&view=rev
Log:
cxa_demangle: fix -Wimplicit-fallthrough for GCC:7

Use the C++11 (formalised in C++17) tag to indicate a fallthrough in the
switch case.  Silences a -Wimplicit-fallthrough warning with gcc:7

Modified:
    libcxxabi/trunk/src/cxa_demangle.cpp

Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=305173&r1=305172&r2=305173&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Sun Jun 11 17:57:31 2017
@@ -2258,7 +2258,7 @@ parse_type(const char* first, const char
                                 break;
                             }
                         }
-                        // drop through
+                        [[gnu::fallthrough]];
                     default:
                         // must check for builtin-types before class-enum-types to avoid
                         // ambiguities with operator-names




More information about the cfe-commits mailing list