Skip to content

Commit e07376a

Browse files
committed
[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. llvm-svn: 372714
1 parent 2d81047 commit e07376a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang-tools-extra/modularize/Modularize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ class CollectEntitiesVisitor
585585
LinkageLabel = "extern \"C\" {}";
586586
break;
587587
case LinkageSpecDecl::lang_cxx:
588+
case LinkageSpecDecl::lang_cxx_11:
589+
case LinkageSpecDecl::lang_cxx_14:
588590
LinkageLabel = "extern \"C++\" {}";
589591
break;
590592
}

0 commit comments

Comments
 (0)