[cfe-dev] Small code problems in SemaTemplateDeduction.cpp and ASTContext.cpp
Lockal S
lockalsash at gmail.com
Thu Aug 4 12:10:28 PDT 2011
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.
-----
That's all for Clang. Thank you in advance for any comments and fixes.
More information about the cfe-dev
mailing list