]> granicus.if.org Git - clang/commit
[Sema/Attribute] Make types declared with address_space an AttributedType
authorLeonard Chan <leonardchan@google.com>
Mon, 27 Aug 2018 17:57:29 +0000 (17:57 +0000)
committerLeonard Chan <leonardchan@google.com>
Mon, 27 Aug 2018 17:57:29 +0000 (17:57 +0000)
commit5e8d6f98ab8ae500b0d731dd0aee638d97583401
tree05d909567fe90f0ac32bacb5fc0808a1f0158324
parent3a27fd7b06b566eb0b85480aa011d9e11688196b
[Sema/Attribute] Make types declared with address_space an AttributedType

Currently an address_space is stored in a qualifier. This makes any type
declared with an address_space attribute in the form
`__attribute__((address_space(1))) int 1;` be wrapped in an AttributedType.

This is for a later patch where if `address_space` is declared in a macro,
any diagnostics that would normally print the address space will instead dump
the macro name. This will require saving any macro information in the
AttributedType.

Differential Revision: https://reviews.llvm.org/D51229

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340765 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Attr.td
lib/AST/TypePrinter.cpp
lib/Sema/SemaType.cpp