Skip to content

Wrong error non-type template argument refers to subobject for extern arrays #28513

@llvmbot

Description

@llvmbot
Bugzilla Link 28139
Version 3.8
OS Windows NT
Reporter LLVM Bugzilla Contributor

Extended Description

code:

template<int const * pci> struct X {};

extern int const ai[];
X<ai> xi;

int const ai[] = {0,1,2,3};

Then compiled with clang++ -std=c++1z test.cpp

Error test.cpp:4:3: error: non-type template argument refers to subobject '&ai' is reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions