Clang currently doesn't warn about unreachable code in template functions, as it may not be unreachable in all instantiations.
Do the same for unreachable fallthrough annotations.
| Paths 
 |  Differential  D31069  
Don't warn about an unreachable fallthrough annotation in a template function ClosedPublic Authored by ahmedasadi on Mar 16 2017, 8:52 PM. 
Details Summary Clang currently doesn't warn about unreachable code in template functions, as it may not be unreachable in all instantiations. Do the same for unreachable fallthrough annotations. 
Diff Detail 
 Event Timelinersmith edited edge metadata.Comment Actions This needs a test case, but the change itself looks fine to me. This revision is now accepted and ready to land.Mar 16 2017, 10:36 PM Closed by commit rL298477: Suppress warning on unreachable [[clang::fallthrough]] within a template… (authored by rsmith).  ·  Explain WhyMar 21 2017, 7:01 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 92588 cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
 cfe/trunk/test/SemaCXX/P30636.cpp
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||