llvm-project/clang/test/ASTMerge/Inputs
Sean Callanan 59721b3d3f Implemented ASTImporter support for Stmts and fixed
some bugs in the ASTImporter that this exposed:

- When importing functions, the body (if any) was
  previously ignored.  This patch ensures that the
  body is imported also.

- When a function-local Decl is imported, the first
  thing the ASTImporter does is import its context
  (via ImportDeclParts()).  This can trigger 
  importing the Decl again as part of the body of
  the function (but only once, since the function's
  Decl has been added to ImportedDecls).  This patch
  fixes that problem by extending ImportDeclParts()
  to return the imported Decl if it was imported as
  part of importing its context, and the patch adds
  ASTImporter::GetAlreadyImportedOrNull() to support
  this query.  All callers of ImportDeclParts return
  the imported version of the Decl if ImportDeclParts()
  returns it.

- When creating functions, InnerLocStart of the source
  function was re-used without importing.  This is a
  straight up bug, and this patch makes ASTImporter
  import the InnerLocStart and use the imported version.

- When importing FileIDs, the ASTImporter previously
  always tried to re-load the file for the corresponding
  CacheEntry from disk.  This doesn't work if the 
  CacheEntry corresponds to a named memory buffer.  This
  patch changes the code so that if the UniqueID for the
  cache entry is invalid (i.e., it is not a disk file)
  the whole entry is treated as if it were invalid, which
  forces an in-memory copy of the buffer.

Also added test cases, using the new support committed in
236011.

llvm-svn: 236012
2015-04-28 18:41:46 +00:00
..
body1.c Implemented ASTImporter support for Stmts and fixed 2015-04-28 18:41:46 +00:00
body2.c Implemented ASTImporter support for Stmts and fixed 2015-04-28 18:41:46 +00:00
category1.m
category2.m
class-template1.cpp
class-template2.cpp
class1.cpp
class2.cpp
enum1.c
enum2.c
exprs1.c
exprs2.c
function1.c
function2.c
interface1.m
interface2.m
namespace1.cpp
namespace2.cpp
property1.m
property2.m
struct1.c
struct2.c
typedef1.c
typedef2.c
var1.c
var1.h
var2.c