-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Not planned
Not planned
Copy link
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicateregression
Description
Since 030047c, Qt (tested with 6.6) fails to compile, with errors like this:
In file included from /home/martin/code/qt/src-6.6/src/corelib/compat/removed_api.cpp:12:
In file included from include/QtCore/qmetatype.h:1:
include/QtCore/../../../src-6.6/src/corelib/kernel/qmetatype.h:2669:1: error: explicit specialization of 'QMetaTypeId<QtMetaTypePrivate::QPairVariantInterfaceImpl>' after instantiation
2669 | QT_DECL_METATYPE_EXTERN_TAGGED(QtMetaTypePrivate::QPairVariantInterfaceImpl,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2670 | QPairVariantInterfaceImpl, Q_CORE_EXPORT)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/QtCore/../../../src-6.6/src/corelib/kernel/qmetatype.h:1361:5: note: expanded from macro 'QT_DECL_METATYPE_EXTERN_TAGGED'
1361 | Q_DECLARE_METATYPE(TYPE) \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/QtCore/../../../src-6.6/src/corelib/kernel/qmetatype.h:1504:34: note: expanded from macro 'Q_DECLARE_METATYPE'
1504 | #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/QtCore/../../../src-6.6/src/corelib/kernel/qmetatype.h:1508:12: note: expanded from macro 'Q_DECLARE_METATYPE_IMPL'
1508 | struct QMetaTypeId< TYPE > \
| ^~~~~~~~~~~~~~~~~~~
include/QtCore/../../../src-6.6/src/corelib/kernel/qmetatype.h:1220:22: note: implicit instantiation first required here
1220 | enum { Defined = QMetaTypeId<T>::Defined, IsBuiltIn=false };
| ^
1 error generated.
Before this commit, this file built just fine. This can be reproduced with this attached preprocessed file,
qt-preproc.zip, compiled as clang -target armv7-w64-mingw32 -c qt-preproc.cpp
.
CC @cor3ntin
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicateregression
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
llvmbot commentedon Dec 1, 2023
@llvm/issue-subscribers-clang-frontend
Author: Martin Storsjö (mstorsjo)
Before this commit, this file built just fine. This can be reproduced with this attached preprocessed file,
qt-preproc.zip, compiled as
clang -target armv7-w64-mingw32 -c qt-preproc.cpp
.CC @cor3ntin
cor3ntin commentedon Dec 2, 2023
Reduced to
https://godbolt.org/z/KE8xP5KTz
cor3ntin commentedon Dec 2, 2023
@zygoloid I'm not 100% sure but GCC does seem to do instantiations during evaluation https://godbolt.org/z/Wz5oMzdnP
cor3ntin commentedon Dec 2, 2023
Lets keep the discussion in #73232