Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-8958] swift-reflection-dump.cpp fails to compile with clang 7.0.0 #51463

Closed
kevints mannequin opened this issue Oct 10, 2018 · 2 comments
Closed

[SR-8958] swift-reflection-dump.cpp fails to compile with clang 7.0.0 #51463

kevints mannequin opened this issue Oct 10, 2018 · 2 comments
Labels
bug A deviation from expected or documented behavior Compiler Reflection

Comments

@kevints
Copy link
Mannequin

kevints mannequin commented Oct 10, 2018

Previous ID SR-8958
Radar None
Original Reporter @kevints
Type Bug
Status Resolved
Resolution Done
Environment

swift-4.2-RELEASE
Ubuntu 14.04

Clang 7.0.0 from releases.llvm.org
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Reflection
Assignee None
Priority Medium

md5: 11429fe354d7cdcd9b0cb70edda4d75f

Issue Description:

This file compiles fine with clang 6.0.0, but fails on clang 7.0.0 with the following errors:

$CC++ -DCMARK_STATIC_DEFINE -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/swift-reflection-dump -I/code/workspace/swift/tools/swift-reflection-dump -Iinclude -I/code/workspace/swift/include -I/code/workspace/llvm/include -I/code/.build-Linux/workspace/linux-server-platform-x86_64/llvm-linux-x86_64/include -I/code/.build-Linux/workspace/linux-server-platform-x86_64/llvm-linux-x86_64/tools/clang/include -I/code/workspace/llvm/tools/clang/include -I/code/workspace/cmark/src -I/code/.build-Linux/workspace/linux-server-platform-x86_64/cmark-linux-x86_64/src -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections -Werror=switch -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -O3    -UNDEBUG  -fno-exceptions -fno-rtti -target x86_64-unknown-linux-gnu -O2 -g0 -UNDEBUG -DSWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS -MD -MT tools/swift-reflection-dump/CMakeFiles/swift-reflection-dump.dir/swift-reflection-dump.cpp.o -MF tools/swift-reflection-dump/CMakeFiles/swift-reflection-dump.dir/swift-reflection-dump.cpp.o.d -o tools/swift-reflection-dump/CMakeFiles/swift-reflection-dump.dir/swift-reflection-dump.cpp.o -c /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:192:5: error: 'BuiltinTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, BuiltinTypeRef, MangledName);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:144:1: note: expanded from here
BuiltinTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:209:28: note: in instantiation of function template specialization 'swift::reflection::BuiltinTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return BuiltinTypeRef::create(*this, mangledName);
                           ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:19:1: note: declared as a non-template here
TYPEREF(Builtin, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:120:1: note: expanded from here
BuiltinTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:192:5: error: 'BuiltinTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, BuiltinTypeRef, MangledName);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:146:1: note: expanded from here
BuiltinTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:19:1: note: declared as a non-template here
TYPEREF(Builtin, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:120:1: note: expanded from here
BuiltinTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:254:5: error: 'NominalTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, NominalTypeRef, MangledName, Parent);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:147:1: note: expanded from here
NominalTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:228:28: note: in instantiation of function template specialization 'swift::reflection::NominalTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return NominalTypeRef::create(*this, *mangledName, nullptr);
                           ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:20:1: note: declared as a non-template here
TYPEREF(Nominal, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:122:1: note: expanded from here
NominalTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:254:5: error: 'NominalTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, NominalTypeRef, MangledName, Parent);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:149:1: note: expanded from here
NominalTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:20:1: note: declared as a non-template here
TYPEREF(Nominal, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:122:1: note: expanded from here
NominalTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:289:5: error: 'BoundGenericTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, BoundGenericTypeRef, MangledName, GenericParams,
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:150:1: note: expanded from here
BoundGenericTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:240:33: note: in instantiation of function template specialization 'swift::reflection::BoundGenericTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return BoundGenericTypeRef::create(*this, *mangledName, args, nullptr);
                                ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:21:1: note: declared as a non-template here
TYPEREF(BoundGeneric, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:124:1: note: expanded from here
BoundGenericTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:289:5: error: 'BoundGenericTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, BoundGenericTypeRef, MangledName, GenericParams,
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:152:1: note: expanded from here
BoundGenericTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:21:1: note: declared as a non-template here
TYPEREF(BoundGeneric, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:124:1: note: expanded from here
BoundGenericTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:324:5: error: 'TupleTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, TupleTypeRef, Elements, Variadic);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:153:1: note: expanded from here
TupleTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:255:26: note: in instantiation of function template specialization 'swift::reflection::TupleTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return TupleTypeRef::create(*this, elements, isVariadic);
                         ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:22:1: note: declared as a non-template here
TYPEREF(Tuple, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:126:1: note: expanded from here
TupleTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:324:5: error: 'TupleTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, TupleTypeRef, Elements, Variadic);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:155:1: note: expanded from here
TupleTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:22:1: note: declared as a non-template here
TYPEREF(Tuple, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:126:1: note: expanded from here
TupleTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:370:5: error: 'FunctionTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, FunctionTypeRef, Params, Result, Flags);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:156:1: note: expanded from here
FunctionTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:261:29: note: in instantiation of function template specialization 'swift::reflection::FunctionTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return FunctionTypeRef::create(*this, params, result, flags);
                            ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:23:1: note: declared as a non-template here
TYPEREF(Function, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:128:1: note: expanded from here
FunctionTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:370:5: error: 'FunctionTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, FunctionTypeRef, Params, Result, Flags);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:158:1: note: expanded from here
FunctionTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:23:1: note: declared as a non-template here
TYPEREF(Function, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:128:1: note: expanded from here
FunctionTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:417:5: error: 'ProtocolCompositionTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, ProtocolCompositionTypeRef, Protocols,
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:159:1: note: expanded from here
ProtocolCompositionTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:273:40: note: in instantiation of function template specialization 'swift::reflection::ProtocolCompositionTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return ProtocolCompositionTypeRef::create(*this, protocolRefs, superclass,
                                       ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:24:1: note: declared as a non-template here
TYPEREF(ProtocolComposition, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:130:1: note: expanded from here
ProtocolCompositionTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:417:5: error: 'ProtocolCompositionTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, ProtocolCompositionTypeRef, Protocols,
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:161:1: note: expanded from here
ProtocolCompositionTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:24:1: note: declared as a non-template here
TYPEREF(ProtocolComposition, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:130:1: note: expanded from here
ProtocolCompositionTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:487:5: error: 'ExistentialMetatypeTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, ExistentialMetatypeTypeRef, InstanceType);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:2:1: note: expanded from here
ExistentialMetatypeTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:279:40: note: in instantiation of function template specialization 'swift::reflection::ExistentialMetatypeTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return ExistentialMetatypeTypeRef::create(*this, instance);
                                       ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:26:1: note: declared as a non-template here
TYPEREF(ExistentialMetatype, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:134:1: note: expanded from here
ExistentialMetatypeTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:487:5: error: 'ExistentialMetatypeTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, ExistentialMetatypeTypeRef, InstanceType);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:4:1: note: expanded from here
ExistentialMetatypeTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:26:1: note: declared as a non-template here
TYPEREF(ExistentialMetatype, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:134:1: note: expanded from here
ExistentialMetatypeTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:455:5: error: 'MetatypeTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, MetatypeTypeRef, InstanceType, WasAbstract);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:162:1: note: expanded from here
MetatypeTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:284:29: note: in instantiation of function template specialization 'swift::reflection::MetatypeTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return MetatypeTypeRef::create(*this, instance, WasAbstract);
                            ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:25:1: note: declared as a non-template here
TYPEREF(Metatype, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:132:1: note: expanded from here
MetatypeTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:455:5: error: 'MetatypeTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, MetatypeTypeRef, InstanceType, WasAbstract);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:164:1: note: expanded from here
MetatypeTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:25:1: note: declared as a non-template here
TYPEREF(Metatype, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:132:1: note: expanded from here
MetatypeTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:517:5: error: 'GenericTypeParameterTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, GenericTypeParameterTypeRef, Depth, Index);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:5:1: note: expanded from here
GenericTypeParameterTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:289:41: note: in instantiation of function template specialization 'swift::reflection::GenericTypeParameterTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return GenericTypeParameterTypeRef::create(*this, depth, index);
                                        ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:27:1: note: declared as a non-template here
TYPEREF(GenericTypeParameter, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:136:1: note: expanded from here
GenericTypeParameterTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:517:5: error: 'GenericTypeParameterTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, GenericTypeParameterTypeRef, Depth, Index);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:56:32: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.insert({ID, TR});                  \
                               ^
<scratch space>:7:1: note: expanded from here
GenericTypeParameterTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:27:1: note: declared as a non-template here
TYPEREF(GenericTypeParameter, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:136:1: note: expanded from here
GenericTypeParameterTypeRefs
^
In file included from /code/workspace/swift/tools/swift-reflection-dump/swift-reflection-dump.cpp:23:
In file included from /code/workspace/swift/include/swift/Reflection/ReflectionContext.h:29:
/code/workspace/swift/include/swift/Reflection/TypeRef.h:558:5: error: 'DependentMemberTypeRefs' following the 'template' keyword does not refer to a template
    FIND_OR_CREATE_TYPEREF(A, DependentMemberTypeRef, Member, Base, Protocol);
    ^
/code/workspace/swift/include/swift/Reflection/TypeRef.h:51:51: note: expanded from macro 'FIND_OR_CREATE_TYPEREF'
  const auto Entry = Allocator.DEPENDENT_TEMPLATE TypeRefTy##s.find(ID);       \
                                                  ^
<scratch space>:8:1: note: expanded from here
DependentMemberTypeRefs
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:296:36: note: in instantiation of function template specialization 'swift::reflection::DependentMemberTypeRef::create<swift::reflection::TypeRefBuilder>' requested here
    return DependentMemberTypeRef::create(*this, member, base, *protocol);
                                   ^
/code/workspace/swift/include/swift/Reflection/TypeRefs.def:28:1: note: declared as a non-template here
TYPEREF(DependentMember, TypeRef)
^
/code/workspace/swift/include/swift/Reflection/TypeRefBuilder.h:191:57: note: expanded from macro 'TYPEREF'
                     TypeRefID::Hash, TypeRefID::Equal> Id##TypeRefs;
                                                        ^
<scratch space>:138:1: note: expanded from here
DependentMemberTypeRefs
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Oct 12, 2018

cc @mikeash, @bob-wilson

@bob-wilson
Copy link

bob-wilson commented Oct 12, 2018

This was fixed on master in #16372 and the other PRs mentioned there.

For Swift-4.2, you should build with the older version of Clang.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior Compiler Reflection
Projects
None yet
Development

No branches or pull requests

1 participant