summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-02 23:42:12 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-02 23:42:12 +0000
commitbcfc7d02293691a1050b76be2c99e008469644f9 (patch)
treec3384c75ffc01d79696207ff4aadb3bf4f237535 /clang/lib/AST/Decl.cpp
parent9dff9f4c41b2cea20d3a268307424d57583f5890 (diff)
downloadbcm5719-llvm-bcfc7d02293691a1050b76be2c99e008469644f9.tar.gz
bcm5719-llvm-bcfc7d02293691a1050b76be2c99e008469644f9.zip
When we treat an #include or #import as a module import, create an
implicit ImportDecl in the translation unit to record the presence of the import. llvm-svn: 145727
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 2f167eedd15..1ed149b68f2 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -2657,9 +2657,7 @@ ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC,
Module *Imported,
SourceLocation EndLoc) {
void *Mem = C.Allocate(sizeof(ImportDecl) + sizeof(SourceLocation));
- ImportDecl *Import
- = new (Mem) ImportDecl(DC, ImportLoc, Imported,
- ArrayRef<SourceLocation>(&EndLoc, 1));
+ ImportDecl *Import = new (Mem) ImportDecl(DC, ImportLoc, Imported, EndLoc);
Import->setImplicit();
return Import;
}
OpenPOWER on IntegriCloud