logic: fixed potential crash when solving decls in lambda captures
* fixed potential crash when solving decls in lambda captures * fixed solving type of anonymous structs/classes in c code * added null checks in name resolvers
This commit is contained in:
@@ -312,13 +312,13 @@ bool CxxAstVisitor::TraverseTemplateArgumentLoc(const clang::TemplateArgumentLoc
|
||||
|
||||
bool CxxAstVisitor::TraverseLambdaCapture(clang::LambdaExpr *lambdaExpr, const clang::LambdaCapture *capture)
|
||||
{
|
||||
clang::VarDecl* d = capture->getCapturedVar();
|
||||
if (lambdaExpr->isInitCapture(capture))
|
||||
{
|
||||
TraverseDecl(d);
|
||||
TraverseDecl(capture->getCapturedVar());
|
||||
}
|
||||
else
|
||||
else if (capture->capturesVariable())
|
||||
{
|
||||
clang::VarDecl* d = capture->getCapturedVar();
|
||||
SymbolKind symbolKind = getSymbolKind(d);
|
||||
if (symbolKind == SYMBOL_LOCAL_VARIABLE || symbolKind == SYMBOL_PARAMETER)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user