aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-10-09 21:26:46 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-09 21:26:46 -0700
commit80e02e57122b92946ec644ee127f85119f9ae7d1 (patch)
tree3bd9428a3fffac3ec51c8696012a44169e77f7bc
parentfe17169a51bf1f84fa3c5407303bd6afb5519139 (diff)
parent4ac13f512a8a9b71ecca47adf8bd5b3cc6d1c505 (diff)
downloadkati-80e02e57122b92946ec644ee127f85119f9ae7d1.tar.gz
Merge remote-tracking branch 'aosp/upstream'
am: 4ac13f512a Change-Id: I5e1a6faba8f47544c472a763ddadf39aa420d139
-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;
}