Author: uabelho
Date: Tue Sep 24 02:44:55 2019
New Revision: 372714

URL: http://llvm.org/viewvc/llvm-project?rev=372714&view=rev
Log:
[modularize] Fix compilation warning after r372681

In r372681 lang_cxx_11 and lang_cxx_14 were added to LanguageIDs
but they were not handled in the switch in VisitLinkageSpecDecl in
Modularize.cpp so at clang 8 complained with

/data/repo/master/clang-tools-extra/modularize/Modularize.cpp:583:13: error: 
enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch 
[-Werror,-Wswitch]
    switch (D->getLanguage()) {
            ^
1 error generated.

With this patch we now treat lang_cxx, lang_cxx_11 and lang_cxx_14 the
same way in the switch in VisitLinkageSpecDecl.

Modified:
    clang-tools-extra/trunk/modularize/Modularize.cpp

Modified: clang-tools-extra/trunk/modularize/Modularize.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=372714&r1=372713&r2=372714&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/Modularize.cpp (original)
+++ clang-tools-extra/trunk/modularize/Modularize.cpp Tue Sep 24 02:44:55 2019
@@ -585,6 +585,8 @@ public:
       LinkageLabel = "extern \"C\" {}";
       break;
     case LinkageSpecDecl::lang_cxx:
+    case LinkageSpecDecl::lang_cxx_11:
+    case LinkageSpecDecl::lang_cxx_14:
       LinkageLabel = "extern \"C++\" {}";
       break;
     }


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to