[cfe-commits] [PATCH] Don't warn on fall-through from unreachable code.

Alexander Kornienko alexfh at google.com
Mon Jan 28 08:00:43 PST 2013


  An attempt to avoid a separate pass to mark reachable blocks, it works already,
  but doesn't handle a number of corner cases:
    * outputs a warning per fallthrough path, doesn't demultiplex them;
    * doesn't distinguish between misplaced annotations and unreachable ones,
      which leads to confusing warnings;
    * doesn't skip fix-it hints for partly annotated fall-throughs.

  Implementing those will add some 20-40 lines of code and additional data
  structures, so I really think this is going to be neither more elegant, nor
  more optimal solution. I'd prefer to go on with the original approach instead.

Hi rsmith, doug.gregor,

http://llvm-reviews.chandlerc.com/D330

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D330?vs=776&id=790#toc

Files:
  lib/Sema/AnalysisBasedWarnings.cpp
  test/SemaCXX/switch-implicit-fallthrough.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D330.5.patch
Type: text/x-patch
Size: 10711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130128/26ed64ad/attachment.bin>


More information about the cfe-commits mailing list