[Lldb-commits] [PATCH] D64777: Fix CreateFunctionTemplateSpecialization to prevent dangling poiner to stack memory

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 16 08:25:51 PDT 2019


JDevlieghere added inline comments.


================
Comment at: packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/main.cpp:1
+template <typename T>
+struct M {};
----------------
labath wrote:
> teemperor wrote:
> > JDevlieghere wrote:
> > > Clang format?
> > Pretty sure that file is clang-formatted (at least my clang-format doesn't modify this file)
> We have a .clang-format file for the test directory which effectively disables clang-formatting. So depending on how you run clang-format, the invocation might be completely ignored.
> 
> The .clang-format was put there before the Great Reformat to avoid it messing with the line numbers in tests. Maybe the time has come to do something about it...
Sounds like a good idea. Most test should be using the `// break here` anyway, and removing the special `.clang-format` might flush out the ones that don't. 


================
Comment at: source/Symbol/ClangASTContext.cpp:1619
+  TemplateArgumentList *template_args_ptr =
+      TemplateArgumentList::CreateCopy(func_decl->getASTContext(), infos.args);
 
----------------
teemperor wrote:
> JDevlieghere wrote:
> > Out of curiosity, who does the cleanup of this pointer? 
> It's like an AST object stored in the ASTContext.
Thanks


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64777/new/

https://reviews.llvm.org/D64777





More information about the lldb-commits mailing list