summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
commit14cd5182c5f64c43581c82db8c958369152226ac (patch)
tree57f150ba2707f29214eeb9b1eaad2373780d1b15 /codemaker
parente4bb2b4f4875c15bd68297b5be716edd6859841e (diff)
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/codemaker/typemanager.cxx2
-rw-r--r--codemaker/source/cppumaker/dependencies.cxx2
-rw-r--r--codemaker/source/cppumaker/includes.cxx2
-rw-r--r--codemaker/source/javamaker/javatype.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx
index f0886286f247..32769f7c769f 100644
--- a/codemaker/source/codemaker/typemanager.cxx
+++ b/codemaker/source/codemaker/typemanager.cxx
@@ -186,7 +186,7 @@ codemaker::UnoType::Sort TypeManager::decompose(
}
break;
}
- // fall through
+ SAL_FALLTHROUGH;
case codemaker::UnoType::Sort::Void:
case codemaker::UnoType::Sort::Boolean:
case codemaker::UnoType::Sort::Byte:
diff --git a/codemaker/source/cppumaker/dependencies.cxx b/codemaker/source/cppumaker/dependencies.cxx
index d7e40aed7b2d..00c333d23460 100644
--- a/codemaker/source/cppumaker/dependencies.cxx
+++ b/codemaker/source/cppumaker/dependencies.cxx
@@ -271,7 +271,7 @@ void Dependencies::insert(OUString const & name, bool base) {
{
insert(b2u(arg));
}
- // fall through
+ SAL_FALLTHROUGH;
case UnoType::Sort::Sequence:
case UnoType::Sort::Enum:
case UnoType::Sort::PlainStruct:
diff --git a/codemaker/source/cppumaker/includes.cxx b/codemaker/source/cppumaker/includes.cxx
index 27d26cfa58aa..500f8e99ca5e 100644
--- a/codemaker/source/cppumaker/includes.cxx
+++ b/codemaker/source/cppumaker/includes.cxx
@@ -104,7 +104,7 @@ void Includes::add(OString const & entityName) {
{
add(arg);
}
- // fall through
+ SAL_FALLTHROUGH;
case codemaker::UnoType::Sort::Sequence:
case codemaker::UnoType::Sort::Enum:
case codemaker::UnoType::Sort::PlainStruct:
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index c2dba14deb87..c39230a8fcb7 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -235,7 +235,7 @@ SpecialType translateUnoTypeToDescriptor(
}
return SPECIAL_TYPE_INTERFACE;
}
- // fall through
+ SAL_FALLTHROUGH;
case codemaker::UnoType::Sort::Sequence:
case codemaker::UnoType::Sort::Enum:
case codemaker::UnoType::Sort::PlainStruct: