Page MenuHomePhabricator

[Diagnostics] Implement -Wswitch-default
Changes PlannedPublic

Authored by xbolva00 on Wed, Jun 12, 3:25 AM.

Details

Summary

For MSVC compatibility, based on request in https://bugs.llvm.org/show_bug.cgi?id=4546.

Diff Detail

Repository
rC Clang

Event Timeline

xbolva00 created this revision.Wed, Jun 12, 3:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Jun 12, 3:25 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
xbolva00 planned changes to this revision.Wed, Jun 12, 3:51 AM

I will work on this after we land https://reviews.llvm.org/D63139.

xbolva00 marked an inline comment as done.Wed, Jun 12, 4:03 AM
xbolva00 added inline comments.
lib/Sema/SemaStmt.cpp
869

TODO:

if (!SC) -> switch has no default and case labels (empty body is misleading.. switch(x) x = b)

switch (x) {

// warn_empty_switch_body

}