aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-10-09 20:01:51 -0700
committerDan Willemsen <dwillemsen@google.com>2018-10-09 20:01:51 -0700
commit4ac13f512a8a9b71ecca47adf8bd5b3cc6d1c505 (patch)
tree3bd9428a3fffac3ec51c8696012a44169e77f7bc
parentbb306940b75976fb2563fa74386102599f325df4 (diff)
parent5b4c39fdfe2fc2e457e92ab997520c2d3836ff99 (diff)
downloadkati-4ac13f512a8a9b71ecca47adf8bd5b3cc6d1c505.tar.gz
Merge remote-tracking branch 'aosp/upstream'android-o-mr1-iot-release-smart-display-r3oreo-mr1-1.2-iot-release
* aosp/upstream: Mark fallthrough cases with [[clang::fallthrough]] Test: treehugger Change-Id: I3e9cac7a16e992e970719f98fd65ed4c0b6e18d8
-rw-r--r--func.cc4
-rw-r--r--ninja.cc4
2 files changed, 6 insertions, 2 deletions
diff --git a/func.cc b/func.cc
index bc3e57f..8131e4b 100644
--- a/func.cc
+++ b/func.cc
@@ -64,7 +64,9 @@ void StripShellComment(string* cmd) {
in++;
break;
}
- /* FALLTHRU */
+#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
+ [[clang::fallthrough]];
+#endif
case '\'':
case '"':
diff --git a/ninja.cc b/ninja.cc
index fb42444..0b87d5c 100644
--- a/ninja.cc
+++ b/ninja.cc
@@ -530,7 +530,9 @@ class NinjaGenerator {
case ':':
case ' ':
r += '$';
- // fall through.
+#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
+ [[clang::fallthrough]];
+#endif
default:
r += c;
}