History log of /llvm-project/clang/lib/AST/Type.cpp (Results 1 – 25 of 839)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# f95a8bde 27-Jan-2025 Momchil Velikov <momchil.velikov@arm.com>

[AArch64] Refactor implementation of FP8 types (NFC) (#123604)

- The FP8 scalar type (`__mfp8`) was described as a vector type
- The FP8 vector types were described/assumed to have integer element

[AArch64] Refactor implementation of FP8 types (NFC) (#123604)

- The FP8 scalar type (`__mfp8`) was described as a vector type
- The FP8 vector types were described/assumed to have integer element
type (the element type ought to be `__mfp8`)
- Add support for `m` type specifier (denoting `__mfp8`) in
`DecodeTypeFromStr` and create builtin function prototypes using that
specifier, instead of `int8_t`

show more ...


Revision tags: llvmorg-19.1.7
# 6a01ac7d 19-Dec-2024 Joshua Batista <jbatista@microsoft.com>

[HLSL] Add concepts for Structured buffers (#119643)

This PR adds concept validation to structured buffers, in the same way
that it was done for typed buffers (like RWBuffer) in
https://github.com

[HLSL] Add concepts for Structured buffers (#119643)

This PR adds concept validation to structured buffers, in the same way
that it was done for typed buffers (like RWBuffer) in
https://github.com/llvm/llvm-project/pull/116413.
This PR should also be responsible for introducing rejection of 0 size
elements for structured buffers.
Fixes https://github.com/llvm/llvm-project/issues/117406

show more ...


Revision tags: llvmorg-19.1.6
# 46de3a70 04-Dec-2024 Sarah Spall <sarahspall@microsoft.com>

[HLSL] get inout/out ABI for array parameters working (#111047)

Get inout/out parameters working for HLSL Arrays.
Utilizes the fix from #109323, and corrects the assignment behavior
slightly to al

[HLSL] get inout/out ABI for array parameters working (#111047)

Get inout/out parameters working for HLSL Arrays.
Utilizes the fix from #109323, and corrects the assignment behavior
slightly to allow for Non-LValues on the RHS.
Closes #106917

---------

Co-authored-by: Chris B <beanz@abolishcrlf.org>

show more ...


Revision tags: llvmorg-19.1.5
# bd92e462 02-Dec-2024 Justin Bogner <mail@justinbogner.com>

[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)

This introduces `__builtin_hlsl_resource_getpointer`, which lowers to
`llvm.dx.resource.getpointer` and is use

[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)

This introduces `__builtin_hlsl_resource_getpointer`, which lowers to
`llvm.dx.resource.getpointer` and is used to implement indexing into
resources.

This will only work through the backend for typed buffers at this point,
but the changes to structured buffers should be correct as far as the
frontend is concerned.

Note: We probably want this to return a reference in the HLSL device
address space, but for now we're just using address space 0. Creating a
device address space and updating this code can be done later as
necessary.

Fixes #95956

show more ...


# df335b09 25-Nov-2024 Younan Zhang <zyn7109@gmail.com>

[Clang] Preserve partially substituted pack indexing type/expressions (#116782)

Substituting into pack indexing types/expressions can still result in
unexpanded types/expressions, such as `PackInde

[Clang] Preserve partially substituted pack indexing type/expressions (#116782)

Substituting into pack indexing types/expressions can still result in
unexpanded types/expressions, such as `PackIndexingType` or
`PackIndexingExpr`. To handle these cases correctly, we should defer the
pack size checks to the next round of transformation, when the patterns
can be fully expanded.

To that end, the `FullySubstituted` flag is now necessary for computing
the dependencies of `PackIndexingExprs`. Conveniently, this flag can
also represent the prior `ExpandsToEmpty` status with an additional
emptiness check. Therefore, I converted all stored flags to use
`FullySubstituted`.

Fixes https://github.com/llvm/llvm-project/issues/116105

show more ...


Revision tags: llvmorg-19.1.4
# dec6324c 17-Nov-2024 Kazu Hirata <kazu@google.com>

[AST] Remove unused includes (NFC) (#116549)

Identified with misc-include-cleaner.


# b9d678d2 15-Nov-2024 Joseph Huber <huberjn@outlook.com>

[Clang] Use TargetInfo when deciding if an address space is compatible (#115777)

Summary:
Address spaces are used in several embedded and GPU targets to describe
accesses to different types of memo

[Clang] Use TargetInfo when deciding if an address space is compatible (#115777)

Summary:
Address spaces are used in several embedded and GPU targets to describe
accesses to different types of memory. Currently we use the address
space enumerations to control which address spaces are considered
supersets of eachother, however this is also a target level property as
described by the C standard's passing mentions. This patch allows the
address space checks to use the target information to decide if a
pointer conversion is legal. For AMDGPU and NVPTX, all supported address
spaces can be converted to the default address space.

More semantic checks can be added on top of this, for now I'm mainly
looking to get more standard semantics working for C/C++. Right now the
address space conversions must all be done explicitly in C/C++ unlike
the offloading languages which define their own custom address spaces
that just map to the same target specific ones anyway. The main question
is if this behavior is a function of the target or the language.

show more ...


# adb0d8dd 07-Nov-2024 Younan Zhang <zyn7109@gmail.com>

[Clang] Distinguish expanding-pack-in-place cases for SubstTemplateTypeParmTypes (#114220)

In 50e5411e4, we preserved the pack substitution index within
SubstTemplateTypeParmType nodes and performe

[Clang] Distinguish expanding-pack-in-place cases for SubstTemplateTypeParmTypes (#114220)

In 50e5411e4, we preserved the pack substitution index within
SubstTemplateTypeParmType nodes and performed in-place expansions of
packs such that type constraints on a lambda that serve as a pattern of
a fold expression could be evaluated if the type constraints contain any
packs that are expanded by the fold expression.

However, we made an incorrect assumption of the condition under which
in-place expansion should occur. For example, a SizeOfPackExpr case
relies on SubstTemplateTypeParmType nodes being transformed to
SubstTemplateTypeParmPackTypes rather than expanding them immediately in
place.

This fixes that by adding a flag to SubstTemplateTypeParmType to
discriminate such in-place expansion situations.

Fixes https://github.com/llvm/llvm-project/issues/113518

show more ...


# 17d8ed71 04-Nov-2024 Sam McCall <sam.mccall@gmail.com>

[clang] Make nullability-on-classes more robust to redeclarations (#114778)

This is relevant after b24650e814e55d90acfc40acf045456c98f32b9c where
the selected template decl can be anything, even ap

[clang] Make nullability-on-classes more robust to redeclarations (#114778)

This is relevant after b24650e814e55d90acfc40acf045456c98f32b9c where
the selected template decl can be anything, even apparently a friend
declaration in some cases.

show more ...


# d3daa3c4 31-Oct-2024 Pavel Yaskevich <xedin@apache.org>

[clang/AST] Make it possible to use SwiftAttr in type context (#108631)

Swift ClangImporter now supports concurrency annotations on imported
declarations and their parameters/results, to make it po

[clang/AST] Make it possible to use SwiftAttr in type context (#108631)

Swift ClangImporter now supports concurrency annotations on imported
declarations and their parameters/results, to make it possible to use
imported APIs in Swift safely there has to be a way to annotate
individual parameters and result types with relevant attributes that
indicate that e.g. a block is called on a particular actor or it accepts
a `Sendable` parameter.

To faciliate that `SwiftAttr` is switched from `InheritableAttr` which
is a declaration attribute to `DeclOrTypeAttr`. To support this
attribute in type context we need access to its "Attribute" argument
which requires `AttributedType` to be extended to include `Attr *` when
available instead of just `attr::Kind` otherwise it won't be possible to
determine what attribute should be imported.

show more ...


Revision tags: llvmorg-19.1.3
# 6dad29ae 23-Oct-2024 CarolineConcatto <caroline.concatto@arm.com>

[CLANG][AArch64]Add Neon vectors for mfloat8_t (#99865)

This patch adds these new vector sizes for neon:
mfloat8x16_t and mfloat8x8_t

According to the ARM ACLE PR#323[1].

[1] ARM-s

[CLANG][AArch64]Add Neon vectors for mfloat8_t (#99865)

This patch adds these new vector sizes for neon:
mfloat8x16_t and mfloat8x8_t

According to the ARM ACLE PR#323[1].

[1] ARM-software/acle#323

show more ...


# 9b984554 22-Oct-2024 Helena Kotas <hekotas@microsoft.com>

[HLSL][NFC] Move IsIntangibleType from SemaHLSL to Type to make it accessible outside of Sema (#113206)

Moves `IsIntangibleType` from SemaHLSL to Type class and renames it to
`isHLSLIntangibleType`

[HLSL][NFC] Move IsIntangibleType from SemaHLSL to Type to make it accessible outside of Sema (#113206)

Moves `IsIntangibleType` from SemaHLSL to Type class and renames it to
`isHLSLIntangibleType`. The existing `isHLSLIntangibleType` is renamed
to `isHLSLBuiltinIntangibleType` and updated to return true only for the
builtin `__hlsl_resource_t` type.

This change makes `isHLSLIntangibleType` functionality accessible
outside of Sema, for example from clang CodeGen.

show more ...


# 7dbfa7b9 18-Oct-2024 Helena Kotas <hekotas@microsoft.com>

[HLSL] Add handle initialization for simple resource declarations (#111207)

Adds `@_init_resource_bindings()` function to module initialization that
includes `handle.fromBinding` intrinsic calls fo

[HLSL] Add handle initialization for simple resource declarations (#111207)

Adds `@_init_resource_bindings()` function to module initialization that
includes `handle.fromBinding` intrinsic calls for simple resource
declarations. Arrays of resources or resources inside user defined types
are not supported yet.

While this unblocks our progress on [Compile a runnable shader from
clang](https://github.com/llvm/wg-hlsl/issues/7) milestone, this is
probably not the way we would like to handle resource binding
initialization going forward. Ideally, it should be done via the
resource class constructors in order to support dynamic resource binding
or unbounded arrays if resources.

Depends on PRs #110327 and #111203.

Part 1 of #105076

show more ...


# cb43021e 17-Oct-2024 CarolineConcatto <caroline.concatto@arm.com>

[CLANG]Add Scalable vectors for mfloat8_t (#101644)

This patch adds these new vector sizes for sve:
svmfloat8_t

According to the ARM ACLE PR#323[1].

[1] ARM-software/acle#323


# 3b451207 15-Oct-2024 Helena Kotas <hekotas@microsoft.com>

[HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (#110327)

Translates `RWBuffer` and `StructuredBuffer` resources buffer types to
Di

[HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (#110327)

Translates `RWBuffer` and `StructuredBuffer` resources buffer types to
DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`.

Includes a change of `HLSLAttributesResourceType` from 'sugar' type to
full canonical type. This is required for codegen and other clang
infrastructure to work property on HLSL resource types.

Fixes #95952 (part 2/2)

show more ...


Revision tags: llvmorg-19.1.2
# 7fe43ada 03-Oct-2024 Doug Wyatt <doug@sonosphere.com>

[Clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (#99656)

- In Sema, when encountering Decls with function effects needing
verification, add them to a vector, DeclsWith

[Clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (#99656)

- In Sema, when encountering Decls with function effects needing
verification, add them to a vector, DeclsWithEffectsToVerify.
- Update AST serialization to include DeclsWithEffectsToVerify.
- In AnalysisBasedWarnings, use DeclsWithEffectsToVerify as a work
queue, verifying functions with declared effects, and inferring (when
permitted and necessary) whether their callees have effects.

---------

Co-authored-by: Doug Wyatt <dwyatt@apple.com>
Co-authored-by: Sirraide <aeternalmail@gmail.com>
Co-authored-by: Erich Keane <ekeane@nvidia.com>

show more ...


# fe61dbf1 01-Oct-2024 Jay Foad <jay.foad@amd.com>

[AMDGPU] Specify width and align for all AMDGPU builtin types. NFC. (#109656)

This will be used in ASTContext::getTypeInfo which needs this
information for all builtin types, not just pointers.


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0
# fa658047 07-Sep-2024 Matheus Izvekov <mizvekov@gmail.com>

[clang] Implement CWG2398 provisional TTP matching to class templates (#94981)

This extends default argument deduction to cover class templates as
well, applying only to partial ordering, adding to

[clang] Implement CWG2398 provisional TTP matching to class templates (#94981)

This extends default argument deduction to cover class templates as
well, applying only to partial ordering, adding to the provisional
wording introduced in https://github.com/llvm/llvm-project/pull/89807.

This solves some ambuguity introduced in P0522 regarding how template
template parameters are partially ordered, and should reduce the
negative impact of enabling `-frelaxed-template-template-args` by
default.

Given the following example:
```C++
template <class T1, class T2 = float> struct A;
template <class T3> struct B;

template <template <class T4> class TT1, class T5> struct B<TT1<T5>>; // #1
template <class T6, class T7> struct B<A<T6, T7>>; // #2

template struct B<A<int>>;
```
Prior to P0522, `#2` was picked. Afterwards, this became ambiguous. This
patch restores the pre-P0522 behavior, `#2` is picked again.

show more ...


# aacdc657 04-Sep-2024 Younan Zhang <zyn7109@gmail.com>

[Clang] Preserve the ExpandsToEmpty flag in PackIndexingType (#107181)

Similar to PackIndexingExpr, we should avoid another round of
transformation of the pattern if the pattern has already turned

[Clang] Preserve the ExpandsToEmpty flag in PackIndexingType (#107181)

Similar to PackIndexingExpr, we should avoid another round of
transformation of the pattern if the pattern has already turned out to
be an empty pack. As an outcome, the empty SubstTemplateTypeParmPackType
won't occur, and we don't need to collect any unexpanded packs.

Fixes https://github.com/llvm/llvm-project/issues/105903

show more ...


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# 52956b0f 05-Aug-2024 Helena Kotas <hekotas@microsoft.com>

[HLSL] Implement intangible AST type (#97362)

HLSL has a set of intangible types which are described in in the
[draft HLSL Specification
(**[Basic.types]**)](https://microsoft.github.io/hlsl-specs

[HLSL] Implement intangible AST type (#97362)

HLSL has a set of intangible types which are described in in the
[draft HLSL Specification
(**[Basic.types]**)](https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf):
There are special implementation-defined types such as handle types,
which fall into a category of standard intangible types. Intangible
types are types that have no defined object representation or value
representation, as such the size is unknown at compile time.

A class type T is an intangible class type if it contains an base
classes or members of intangible class type, standard intangible type,
or arrays of such types. Standard intangible types and intangible class
types are collectively called intangible
types([9](https://microsoft.github.io/hlsl-specs/specs/hlsl.html#Intangible)).

This PR implements one standard intangible type `__hlsl_resource_t`
and sets up the infrastructure that will make it easier to add more
in the future, such as samplers or raytracing payload handles. The
HLSL intangible types are declared in
`clang/include/clang/Basic/HLSLIntangibleTypes.def` and this file is
included with related macro definition in most places that require edits
when a new type is added.

The new types are added as keywords and not typedefs to make sure they
cannot be redeclared, and they can only be declared in builtin implicit
headers. The `__hlsl_resource_t` type represents a handle to a memory
resource and it is going to be used in builtin HLSL buffer types like this:

template <typename T>
class RWBuffer {
[[hlsl::contained_type(T)]]
[[hlsl::is_rov(false)]]
[[hlsl::resource_class(uav)]]
__hlsl_resource_t Handle;
};

Part 1/3 of llvm/llvm-project#90631.

---------

Co-authored-by: Justin Bogner <mail@justinbogner.com>

show more ...


Revision tags: llvmorg-19.1.0-rc2
# 1961f9fc 31-Jul-2024 Timm Baeder <tbaeder@redhat.com>

[clang][NFC] Add Type::isPointerOrReferenceType() (#101206)

Seems to be a common pattern.


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# 0bb68b55 17-Jul-2024 Doug Wyatt <doug@sonosphere.com>

Performance optimizations for function effects (nonblocking attribute etc.) (#96844)

- Put new FunctionProtoType trailing objects last.
- Inline FunctionEffectsRef::get()
- Manually inline Functio

Performance optimizations for function effects (nonblocking attribute etc.) (#96844)

- Put new FunctionProtoType trailing objects last.
- Inline FunctionEffectsRef::get()
- Manually inline FunctionEffectsRef::Profile().

---------

Co-authored-by: Doug Wyatt <dwyatt@apple.com>

show more ...


# a56e009e 17-Jul-2024 Mital Ashok <mital@mitalashok.co.uk>

[Clang] [C23] Fix typeof_unqual for qualified array types (#92767)

Properly remove qualifiers for both the element type and the array type

Fixes #92667

---------

Co-authored-by: cor3ntin <c

[Clang] [C23] Fix typeof_unqual for qualified array types (#92767)

Properly remove qualifiers for both the element type and the array type

Fixes #92667

---------

Co-authored-by: cor3ntin <corentinjabot@gmail.com>

show more ...


# c6e996a9 12-Jul-2024 Nikolas Klauser <nikolasklauser@berlin.de>

Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (#97894)

This reverts commit 567b2c608c307c097315dd5ec4d6a5bbcddf898d.


# 567b2c60 28-Jun-2024 Zequan Wu <zequanwu@google.com>

Revert "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002)

Reverts llvm/llvm-project#93113


12345678910>>...34