diff options
Diffstat (limited to 'lldb/source/Symbol/ClangASTContext.cpp')
-rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index b348ba7508d..7c571002d58 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -2227,7 +2227,7 @@ CompilerType ClangASTContext::CreateFunctionType( ParmVarDecl *ClangASTContext::CreateParameterDeclaration( clang::DeclContext *decl_ctx, const char *name, - const CompilerType ¶m_type, int storage) { + const CompilerType ¶m_type, int storage, bool add_decl) { ASTContext *ast = getASTContext(); assert(ast != nullptr); auto *decl = @@ -2235,7 +2235,9 @@ ParmVarDecl *ClangASTContext::CreateParameterDeclaration( name && name[0] ? &ast->Idents.get(name) : nullptr, ClangUtil::GetQualType(param_type), nullptr, (clang::StorageClass)storage, nullptr); - decl_ctx->addDecl(decl); + if (add_decl) + decl_ctx->addDecl(decl); + return decl; } |