Skip to content

[clang] Crash on templated type with address space #101685

@jdoerfert

Description

@jdoerfert

Clang crashes with a TypeLocBuilder assertion when run on this code (https://godbolt.org/z/or16hfTzf), no other command line options necessary:

template <int AS>
using ASPtrTy = void [[clang::address_space(AS)]] *;

template <int AS>
struct EntryTy {
    ASPtrTy<AS> Base;
};

clang::TypeLoc clang::TypeLocBuilder::pushImpl(clang::QualType, size_t, unsigned int): Assertion `TLast == LastTy && "mismatch between last type and new type's inner type"' failed.

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"crash-on-valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions