Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Assertion `!isCompleteDefinition() && "Cannot redefine record!"' failed. #643

Closed martong closed 5 years ago

martong commented 5 years ago

This happens during ctu analysis of LLVM/Clang release_70.

martong commented 5 years ago

The problem is related to LambdaExprs and to their LambdaClass.

There are 3 different problems, which will be addressed in 3 PRs: 1) We import the definition of the CXXRecordDecl connectetd to the lambda in VisitLambdaExpr. That is a mistake, because when we directly import the lambda class it will never have a definition! 2) Sturctural Eq fails to distinguish lambdas if they are at different source locations 3) Structural EQ failes to distinguish lambdas with different operator() signatures. The solution to this is check the methods of the lambda classes for equivalency.

martong commented 5 years ago

646, #647 PRs

dkrupp commented 5 years ago

and #648