diff options
author | Dan Willemsen <dan@danw.org> | 2018-10-09 18:53:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-09 18:53:54 -0700 |
commit | 5b4c39fdfe2fc2e457e92ab997520c2d3836ff99 (patch) | |
tree | 886ad280ba97bd58fa4387a683f44f1d13974484 | |
parent | 7d2255db4ec4ecca7ec73b02aaa7a7aa7b16d537 (diff) | |
parent | 72887f2f9a2f1c4fc50ac6f32572322764dfdd72 (diff) | |
download | kati-5b4c39fdfe2fc2e457e92ab997520c2d3836ff99.tar.gz |
Merge pull request #149 from danw/fallthrough
Mark fallthrough cases with [[clang::fallthrough]]
-rw-r--r-- | func.cc | 4 | ||||
-rw-r--r-- | ninja.cc | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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 '"': @@ -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; } |