aboutsummaryrefslogtreecommitdiff
path: root/ninja.cc
diff options
context:
space:
mode:
authorDan Willemsen <dan@danw.org>2018-10-09 18:53:54 -0700
committerGitHub <noreply@github.com>2018-10-09 18:53:54 -0700
commit5b4c39fdfe2fc2e457e92ab997520c2d3836ff99 (patch)
tree886ad280ba97bd58fa4387a683f44f1d13974484 /ninja.cc
parent7d2255db4ec4ecca7ec73b02aaa7a7aa7b16d537 (diff)
parent72887f2f9a2f1c4fc50ac6f32572322764dfdd72 (diff)
downloadkati-5b4c39fdfe2fc2e457e92ab997520c2d3836ff99.tar.gz
Merge pull request #149 from danw/fallthrough
Mark fallthrough cases with [[clang::fallthrough]]
Diffstat (limited to 'ninja.cc')
-rw-r--r--ninja.cc4
1 files changed, 3 insertions, 1 deletions
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;
}