Add struct size into tooltip

On Fri, Jun 13, 2014 at 04:54:26AM -0700, Olivier Goffart wrote:
> > +{
> > +    const clang::ASTContext &ctx = t->getASTContext();
> > +    const clang::QualType &ty = ctx.getRecordType(t);
> > +    return ctx.getTypeSize(ty);
> > +}
> > +
> > +size_t getDeclSize(const clang::NamedDecl* decl)
> > +{
> > +    const clang::CXXRecordDecl *cxx = llvm::dyn_cast<clang::CXXRecordDecl>(decl);
> > +    if (cxx && (cxx = cxx->getDefinition())) {
> > +        /**
> > +         * XXX: avoid endless recursion inside
> > +         * clang::ASTContext::getTypeInfo() -> getTypeInfoImpl()
> > +         */
> > +        if (cxx->isDependentContext()) {
> > +            return (size_t)-1;
> 
> Style issue: avoid C casts:  prefer    `size_t(-1)`

I follow the rule, that for POD-types it is okay to use C-style cast.
But no problem, I will fix this.

Thanks.

> 
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/woboq/woboq_codebrowser/pull/12/files#r13747200

-- 
Respectfully
Azat Khuzhin