summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2016-02-16 04:14:33 +0000
committerJason Molenda <jmolenda@apple.com>2016-02-16 04:14:33 +0000
commit62e0681afb478a4005efb6ba3598c24dc24866ee (patch)
treeb527218300ffab6dda546b8914c0e6194ede5123 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent75a18c20b1c9f748a132c920e2f9b6e5dc9cac07 (diff)
downloadbcm5719-llvm-62e0681afb478a4005efb6ba3598c24dc24866ee.tar.gz
bcm5719-llvm-62e0681afb478a4005efb6ba3598c24dc24866ee.zip
Add -Wimplicit-fallthrough command line option to clang in
the xcode project file to catch switch statements that have a case that falls through unintentionally. Define LLVM_FALLTHROUGH to indicate instances where a case has code and intends to fall through. This should be in llvm/Support/Compiler.h; Peter Collingbourne originally checked in there (r237766), then reverted (r237941) because he didn't have time to mark up all the 'case' statements that were intended to fall through. I put together a patch to get this back in llvm http://reviews.llvm.org/D17063 but it hasn't been approved in the past week. I added a new lldb-private-defines.h to hold the definition for now. Every place in lldb where there is a comment that the fall-through is intentional, I added LLVM_FALLTHROUGH to silence the warning. I haven't tried to identify whether the fallthrough is a bug or not in the other places. I haven't tried to add this to the cmake option build flags. This warning will only work for clang. This build cleanly (with some new warnings) on macosx with clang under xcodebuild, but if this causes problems for people on other configurations, I'll back it out. llvm-svn: 260930
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 9cb0b3e50d4..da04d48910e 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -4418,7 +4418,7 @@ GDBRemoteCommunicationClient::ReadExtFeature (const lldb_private::ConstString ob
// last chunk
case ( 'l' ):
active = false;
- // fall through intentional
+ LLVM_FALLTHROUGH;
// more chunks
case ( 'm' ) :
OpenPOWER on IntegriCloud