[Lldb-commits] [lldb] r106606 - in /lldb/trunk: include/lldb/Expression/ClangASTSource.h include/lldb/Expression/ClangExpressionDeclMap.h source/Expression/ClangASTSource.cpp source/Expression/ClangExpressionDeclMap.cpp

John McCall rjmccall at apple.com
Tue Jun 22 18:49:17 PDT 2010


On Jun 22, 2010, at 4:46 PM, Sean Callanan wrote:
> +    if (T->isFunctionProtoType())
> +    {
> +        FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(T);

It may not matter much, because I'm not sure how well typedef information is preserved
through DWARF, but this should be 
  if (const FunctionProtoType *FPT = T->getAs<FunctionProtoType>()) { ... }

> +        
> +        unsigned NumArgs = FPT->getNumArgs();
> +        unsigned ArgIndex;
> +        
> +        ParmVarDecl *ParmVarDecls[NumArgs];

FWIW, this is a VLA and therefore not standard C++, although it's likely to be accepted by
most implementations (including, recently, Clang).

John.



More information about the lldb-commits mailing list