[Lldb-commits] [lldb] r142033 - /lldb/trunk/source/Symbol/ClangASTContext.cpp
Sean Callanan
scallanan at apple.com
Fri Oct 14 18:15:07 PDT 2011
Author: spyffe
Date: Fri Oct 14 20:15:07 2011
New Revision: 142033
URL: http://llvm.org/viewvc/llvm-project?rev=142033&view=rev
Log:
Handled the call operator properly.
Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=142033&r1=142032&r2=142033&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Oct 14 20:15:07 2011
@@ -1378,20 +1378,25 @@
}
static inline bool
-check_op_param (bool unary, bool binary, uint32_t num_params)
+check_op_param (uint32_t op_kind, bool unary, bool binary, uint32_t num_params)
{
+ // Special-case call since it can take any number of operands
+ if(op_kind == OO_Call)
+ return true;
+
// The parameter count doens't include "this"
if (num_params == 0)
return unary;
if (num_params == 1)
return binary;
+ else
return false;
}
-
+;
bool
ClangASTContext::CheckOverloadedOperatorKindParameterCount (uint32_t op_kind, uint32_t num_params)
{
-#define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly) case OO_##Name: return check_op_param (Unary, Binary, num_params);
+#define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly) case OO_##Name: return check_op_param (op_kind, Unary, Binary, num_params);
switch (op_kind)
{
#include "clang/Basic/OperatorKinds.def"
More information about the lldb-commits
mailing list