зеркало из https://github.com/microsoft/clang-1.git
ParmVarDecls have no linkage. Previously we would report that parameters
in type signatures have external linkage. Fixes rdar://10058317. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145551 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
26ced127b7
Коммит
f8d34ed0d0
|
@ -721,6 +721,8 @@ static LinkageInfo getLVForDecl(const NamedDecl *D, LVFlags Flags) {
|
|||
switch (D->getKind()) {
|
||||
default:
|
||||
break;
|
||||
case Decl::ParmVar:
|
||||
return LinkageInfo::none();
|
||||
case Decl::TemplateTemplateParm: // count these as external
|
||||
case Decl::NonTypeTemplateParm:
|
||||
case Decl::ObjCAtDefsField:
|
||||
|
|
|
@ -11,6 +11,8 @@ void bar(int y) {
|
|||
extern int n;
|
||||
static int wibble(int);
|
||||
|
||||
void ena(int (*dio)(int tria));
|
||||
|
||||
// CHECK: EnumDecl=Baz:3:6 (Definition)linkage=External
|
||||
// CHECK: EnumConstantDecl=Qux:3:12 (Definition)linkage=External
|
||||
// CHECK: VarDecl=x:4:5linkage=External
|
||||
|
@ -22,5 +24,7 @@ static int wibble(int);
|
|||
// CHECK: VarDecl=k:9:7 (Definition)linkage=NoLinkage
|
||||
// CHECK: VarDecl=n:11:12linkage=External
|
||||
// CHECK: FunctionDecl=wibble:12:12linkage=Internal
|
||||
// CHECL: ParmDecl=:12:22 (Definition)linkage=NoLinkage
|
||||
|
||||
// CHECK: ParmDecl=:12:22 (Definition)linkage=NoLinkage
|
||||
// CHECK: FunctionDecl=ena:14:6linkage=External
|
||||
// CHECK: ParmDecl=dio:14:16 (Definition)linkage=NoLinkage
|
||||
// CHECK: ParmDecl=tria:14:25 (Definition)linkage=NoLinkage
|
||||
|
|
Загрузка…
Ссылка в новой задаче