summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectSyntax.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-10-17 02:10:33 +0000
committerJason Molenda <jmolenda@apple.com>2014-10-17 02:10:33 +0000
commit8e96e6b6f2f470b276de6a54c83e2f06aecd11a8 (patch)
tree8fea03fa79b1f4b42028c758221f4e85219d3fa8 /lldb/source/Commands/CommandObjectSyntax.cpp
parent81926c3ffe461b9b3e773bfb37304eb17dfb5e54 (diff)
downloadbcm5719-llvm-8e96e6b6f2f470b276de6a54c83e2f06aecd11a8.tar.gz
bcm5719-llvm-8e96e6b6f2f470b276de6a54c83e2f06aecd11a8.zip
Break out of the command word parsing loop if we hit
an invalid combination of words; don't accidentally continue trying to parse the command line. clang static analysis fixit. llvm-svn: 220026
Diffstat (limited to 'lldb/source/Commands/CommandObjectSyntax.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSyntax.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectSyntax.cpp b/lldb/source/Commands/CommandObjectSyntax.cpp
index d2021ea3eb1..5093c3b9933 100644
--- a/lldb/source/Commands/CommandObjectSyntax.cpp
+++ b/lldb/source/Commands/CommandObjectSyntax.cpp
@@ -69,12 +69,18 @@ CommandObjectSyntax::DoExecute (Args& command, CommandReturnObject &result)
{
std::string sub_command = command.GetArgumentAtIndex (i);
if (!cmd_obj->IsMultiwordObject())
+ {
all_okay = false;
+ break;
+ }
else
{
cmd_obj = cmd_obj->GetSubcommandObject(sub_command.c_str());
if (!cmd_obj)
+ {
all_okay = false;
+ break;
+ }
}
}
OpenPOWER on IntegriCloud