diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2011-10-21 12:40:01 +0200 |
---|---|---|
committer | Leandro T. C. Melo <leandro.melo@nokia.com> | 2011-10-21 13:25:58 +0200 |
commit | dc23698e3a0582f378e1cd1efbb4e35f69f3df57 (patch) | |
tree | fb8b66d1ade1f1229c106fe600cc64194957b966 /src/libs | |
parent | 2ae1f0cc02e47c4e3c253f3e5f3e16e39df41831 (diff) | |
download | qt-creator-dc23698e3a0582f378e1cd1efbb4e35f69f3df57.tar.gz |
C++: Fix arg. count for functions with function-try-blocks
Task-number: QTCREATORBUG-6343
Change-Id: I71575098c71611dc8514288f7938af4c409ebaa3
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Symbols.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libs/3rdparty/cplusplus/Symbols.cpp b/src/libs/3rdparty/cplusplus/Symbols.cpp index 7cbacd9971..b1b7fbcefd 100644 --- a/src/libs/3rdparty/cplusplus/Symbols.cpp +++ b/src/libs/3rdparty/cplusplus/Symbols.cpp @@ -308,11 +308,12 @@ bool Function::hasReturnType() const unsigned Function::argumentCount() const { - const unsigned c = memberCount(); + unsigned c = memberCount(); if (c > 0 && memberAt(0)->type()->isVoidType()) return 0; - if (c > 0 && memberAt(c - 1)->isBlock()) - return c - 1; + // Definitions with function-try-blocks will have more than a block. + while (c > 0 && memberAt(c - 1)->isBlock()) + --c; return c; } |