[cfe-dev] Small code problems in SemaTemplateDeduction.cpp and ASTContext.cpp
Chad Rosier
mcrosier at apple.com
Thu Aug 4 12:28:35 PDT 2011
On Aug 4, 2011, at 12:10 PM, Lockal S wrote:
> Few days ago Andrey Karpov analyzed Clang and LLVM code using statical analisys
> tool for Visual Studio his company developed. He wrote a big article in russian
> on http://habrahabr.ru/blogs/compilers/125626/ for advertising purposes.
>
> I have wrote to llvmdev list about llvm-related bugs.
> However few problems are Clang-related:
>
> clang/lib/Sema/SemaTemplateDeduction.cpp:3239
> if ((P->isPointerType() && A->isPointerType()) ||
> (P->isMemberPointerType() && P->isMemberPointerType()))
>
> Note the identical sub-expressions 'P->isMemberPointerType()' to the left and
> to the right of the '&&' operator. Probably the second one should be
> A->isMemberPointerType().
>
> ----
>
> clang/lib/AST/ASTContext.cpp:3953
> ParmOffset = PtrSize;
>
> // Argument types.
> ParmOffset = PtrSize;
>
> Probably just some duplicated code.
>
Thanks, I've removed the redundant code in clang revision 136907.
I left the first fix for someone who has a better understanding of the template deduction code.
Regards,
Chad
> -----
>
> That's all for Clang. Thank you in advance for any comments and fixes.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list