]> granicus.if.org Git - clang/commitdiff
When wrapping lazily generated builtins in an extern "C" context,
authorEnea Zaffanella <zaffanella@cs.unipr.it>
Wed, 20 Nov 2013 15:41:05 +0000 (15:41 +0000)
committerEnea Zaffanella <zaffanella@cs.unipr.it>
Wed, 20 Nov 2013 15:41:05 +0000 (15:41 +0000)
flag the LinkageSpecDecl as being implicitly generated too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195255 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 1892809bcedcec1080644e99e6c034f540a07b03..4fe55765d34b224638b252c2118c2065bd061164 100644 (file)
@@ -1540,6 +1540,7 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid,
     LinkageSpecDecl *CLinkageDecl =
         LinkageSpecDecl::Create(Context, Parent, Loc, Loc,
                                 LinkageSpecDecl::lang_c, false);
+    CLinkageDecl->setImplicit();
     Parent->addDecl(CLinkageDecl);
     Parent = CLinkageDecl;
   }