-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Closed
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
cat <<EOF | clang++ -xc++ - -fsyntax-only
template <class _ValueType = int>
class __attribute__((unavailable)) polymorphic_allocator { };
void f() {
polymorphic_allocator<void> a;
polymorphic_allocator<void> b;
}
EOFThis fails with:
<stdin>:6:5: error: 'polymorphic_allocator<void>' is unavailable
polymorphic_allocator<void> b;
^
<stdin>:2:36: note: 'polymorphic_allocator<void>' has been explicitly marked unavailable here
class __attribute__((unavailable)) polymorphic_allocator { };
^
1 error generated.In reality, it should have failed on the first usage of polymorphic_allocator<void>, which is when declaring a.
Also on Godbolt: https://godbolt.org/z/aEsfjcdT1
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party