[PATCH] D47946: [ASTmporter] Fix infinite recursion on function import with struct definition in parameters

Zoltán Gera via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 8 08:12:55 PDT 2018


gerazo created this revision.
gerazo added reviewers: a.sidorin, r.stahl.
Herald added a subscriber: cfe-commits.

Importing a function having a struct definition in the parameter list causes a crash in the importer via infinite recursion. This patch avoids the crash and reports such functions as not supported. Unit tests make sure that normal struct definitions inside function bodies work normally on the other hand and LLDB-like type imports also do.


Repository:
  rC Clang

https://reviews.llvm.org/D47946

Files:
  lib/AST/ASTImporter.cpp
  unittests/AST/ASTImporterTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47946.150519.patch
Type: text/x-patch
Size: 8824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180608/1d8b2521/attachment-0001.bin>


More information about the cfe-commits mailing list