Skip to content
Commit a0858e2f authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

Fix CreateFunctionTemplateSpecialization to prevent dangling poiner to stack memory

In ClangASTContext::CreateFunctionTemplateSpecializationInfo a TemplateArgumentList is allocated on the stack but is treated as if it is persistent in subsequent calls. When we exit the function func_decl will still point to the stack allocated memory. We will use TemplateArgumentList::CreateCopy instead which will allocate memory out of the DeclContext.

Differential Revision: https://reviews.llvm.org/D64777

llvm-svn: 366365
parent c2cd84bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment