introduce SPOT_FALLTHROUGH to cope with -Wimplicit-fallthrough
* NEWS: Mention the fix. * HACKING: Mention the new macro. * spot/misc/common.hh (SPOT_FALLTHROUGH): Add the macro. * bin/randltl.cc, spot/misc/escape.cc, spot/tl/mutation.cc, spot/tl/print.cc, spot/tl/simplify.hh, spot/tl/snf.cc, spot/twa/acc.cc, spot/twaalgos/ltl2taa.cc, spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/sepsets.cc, spot/twaalgos/translate.cc: Use it.
This commit is contained in:
parent
fa80571d44
commit
a5d6aa2533
14 changed files with 85 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014, 2015 Laboratoire de Recherche et Developpement de
|
||||
// l'Epita (LRDE).
|
||||
// Copyright (C) 2014, 2015, 2016 Laboratoire de Recherche et
|
||||
// Developpement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -85,7 +85,7 @@ namespace spot
|
|||
if ((opts_ & Mut_Remove_Ops)
|
||||
&& mutation_counter_-- == 0)
|
||||
return f[0];
|
||||
// fall through
|
||||
SPOT_FALLTHROUGH;
|
||||
case op::Closure:
|
||||
case op::NegClosure:
|
||||
case op::NegClosureMarked:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2008, 2010, 2012, 2013, 2014, 2015 Laboratoire de
|
||||
// Copyright (C) 2008, 2010, 2012, 2013, 2014, 2015, 2016 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE)
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
|
|
@ -527,7 +527,7 @@ namespace spot
|
|||
emit(KNot);
|
||||
if (o == op::NegClosureMarked)
|
||||
os_ << (kw_ == utf8_kw ? "̃": "+");
|
||||
// Fall through
|
||||
SPOT_FALLTHROUGH;
|
||||
case op::Closure:
|
||||
os_ << '{';
|
||||
in_ratexp_ = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2011, 2012, 2013, 2014, 2015 Laboratoire de Recherche
|
||||
// et Developpement de l'Epita (LRDE).
|
||||
// Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire de
|
||||
// Recherche et Developpement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -58,14 +58,14 @@ namespace spot
|
|||
case 3:
|
||||
containment_checks = true;
|
||||
containment_checks_stronger = true;
|
||||
// fall through
|
||||
SPOT_FALLTHROUGH;
|
||||
case 2:
|
||||
synt_impl = true;
|
||||
// fall through
|
||||
SPOT_FALLTHROUGH;
|
||||
case 1:
|
||||
reduce_basics = true;
|
||||
event_univ = true;
|
||||
// fall through
|
||||
SPOT_FALLTHROUGH;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
|
||||
#include <spot/tl/snf.hh>
|
||||
|
||||
#if defined __clang__
|
||||
// See https://llvm.org/bugs/show_bug.cgi?id=30636
|
||||
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#endif
|
||||
|
||||
namespace spot
|
||||
{
|
||||
namespace
|
||||
|
|
@ -65,7 +70,7 @@ namespace spot
|
|||
out = f;
|
||||
break;
|
||||
}
|
||||
// Fall through
|
||||
SPOT_FALLTHROUGH;
|
||||
case op::OrRat:
|
||||
case op::AndNLM:
|
||||
// Let F designate expressions that accept [*0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue