Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
4ba623f2 |
| 30-Oct-2024 |
Balazs Benics <benicsbalazs@gmail.com> |
[clang][Index][USR][NFC] Allow customizing langopts for USR generation (#109574)
This helps to produce USRs for custom LangOpts - that differ from the
one associated with the given Decl. This can u
[clang][Index][USR][NFC] Allow customizing langopts for USR generation (#109574)
This helps to produce USRs for custom LangOpts - that differ from the
one associated with the given Decl. This can unlock usecases in tooling
opportunities that we have downstream.
This is NFC because existing calls will still result in the right
overload, thus using the LangOpts associated with the ASTContext of the
Decls and Types.
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2 |
|
#
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, 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, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
d5285376 |
| 08-Jul-2024 |
Krystian Stasiowski <sdkrystian@gmail.com> |
[Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (#98027)
Given the following:
```
template<typename T>
struct A
{
void f(
[Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (#98027)
Given the following:
```
template<typename T>
struct A
{
void f(int); // #1
template<typename U>
void f(U); // #2
template<>
void f<int>(int); // #3
};
```
Clang will generate the same USR for `#1` and `#2`. This patch fixes the
issue by including the template arguments of dependent class scope
explicit specializations in their USRs.
show more ...
|
#
ad599211 |
| 19-Jun-2024 |
Shilei Tian <i@tianshilei.me> |
[Clang][AMDGPU] Add a new builtin type for buffer rsrc (#94830)
This patch adds a new builtin type for AMDGPU's buffer rsrc data type,
which is effectively an AS 8 pointer. This is needed because w
[Clang][AMDGPU] Add a new builtin type for buffer rsrc (#94830)
This patch adds a new builtin type for AMDGPU's buffer rsrc data type,
which is effectively an AS 8 pointer. This is needed because we'd like
to expose certain intrinsics to users via builtins which take buffer
rsrc as argument.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4 |
|
#
71b9f664 |
| 16-Apr-2024 |
Krystian Stasiowski <sdkrystian@gmail.com> |
[clang][Index] Use canonical function parameter types in USRs (#68222)
This is necessary to ensure that functions declared in different
translation units whose parameter types only differ in top-le
[clang][Index] Use canonical function parameter types in USRs (#68222)
This is necessary to ensure that functions declared in different
translation units whose parameter types only differ in top-level
cv-qualification generate the same USR.
For example:
```
// A.cpp
void f(const int x); // c:@F@f#1I#
// B.cpp
void f(int x); // c:@F@f#I#
```
With this patch, the USR for both functions will be
`c:@F@f#I#`.
show more ...
|
Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
5518a9d7 |
| 21-Jan-2024 |
Andrey Ali Khan Bolshakov <32954549+bolshakov-a@users.noreply.github.com> |
[c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (#78041)
Previously committed as 9e08e51a20d0d2b1c5724bb17e969d036fced4cd, and reverted because a dependency comm
[c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (#78041)
Previously committed as 9e08e51a20d0d2b1c5724bb17e969d036fced4cd, and reverted because a dependency commit was reverted, then committed again as 4b574008aef5a7235c1f894ab065fe300d26e786 and reverted again because "dependency commit" 5a391d38ac6c561ba908334d427f26124ed9132e was reverted. But it doesn't seem that 5a391d38ac6c was a real dependency for this.
This commit incorporates 4b574008aef5a7235c1f894ab065fe300d26e786 and 18e093faf726d15f210ab4917142beec51848258 by Richard Smith (@zygoloid), with some minor fixes, most notably:
- `UncommonValue` renamed to `StructuralValue`
- `VK_PRValue` instead of `VK_RValue` as default kind in lvalue and member pointer handling branch in `BuildExpressionFromNonTypeTemplateArgumentValue`;
- handling of `StructuralValue` in `IsTypeDeclaredInsideVisitor`;
- filling in `SugaredConverted` along with `CanonicalConverted` parameter in `Sema::CheckTemplateArgument`;
- minor cleanup in `TemplateInstantiator::transformNonTypeTemplateParmRef`;
- `TemplateArgument` constructors refactored;
- `ODRHash` calculation for `UncommonValue`;
- USR generation for `UncommonValue`;
- more correct MS compatibility mangling algorithm (tested on MSVC ver. 19.35; toolset ver. 143);
- IR emitting fixed on using a subobject as a template argument when the corresponding template parameter is used in an lvalue context;
- `noundef` attribute and opaque pointers in `template-arguments` test;
- analysis for C++17 mode is turned off for templates in `warn-bool-conversion` test; in C++17 and C++20 mode, array reference used as a template argument of pointer type produces template argument of UncommonValue type, and `BuildExpressionFromNonTypeTemplateArgumentValue` makes `OpaqueValueExpr` for it, and `DiagnoseAlwaysNonNullPointer` cannot see through it; despite of "These cases should not warn" comment, I'm not sure about correct behavior; I'd expect a suggestion to replace `if` by `if constexpr`;
- `temp.arg.nontype/p1.cpp` and `dr18xx.cpp` tests fixed.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
edd690b0 |
| 03-Nov-2023 |
Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> |
[clang][NFC] Refactor `TagTypeKind` (#71160)
This patch converts TagTypeKind into scoped enum. Among other benefits,
this allows us to forward-declare it where necessary.
|
#
49fd28d9 |
| 31-Oct-2023 |
Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> |
[clang][NFC] Refactor `ArrayType::ArraySizeModifier`
This patch moves `ArraySizeModifier` before `Type` declaration so that it's complete at `ArrayTypeBitfields` declaration. It's also converted to
[clang][NFC] Refactor `ArrayType::ArraySizeModifier`
This patch moves `ArraySizeModifier` before `Type` declaration so that it's complete at `ArrayTypeBitfields` declaration. It's also converted to scoped enum along the way.
show more ...
|
Revision tags: llvmorg-17.0.4 |
|
#
48a53509 |
| 18-Oct-2023 |
kadir çetinkaya <kadircet@google.com> |
[clang][USR] Encode full decl-context also for anon namespaces (#68325)
Otherwise we create collisions, e.g. a struct named Foo inside an
anonymous
namespace will get the same USR no matter what t
[clang][USR] Encode full decl-context also for anon namespaces (#68325)
Otherwise we create collisions, e.g. a struct named Foo inside an
anonymous
namespace will get the same USR no matter what the surrounding
decl-context is.
show more ...
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
523c4712 |
| 08-Sep-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
Reapply "[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`"
This reapplies ddbcc10b9e26b18f6a70e23d0611b9da75ffa52f, except for a tiny part that was reverted separately: 65331da0032ab4253a
Reapply "[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`"
This reapplies ddbcc10b9e26b18f6a70e23d0611b9da75ffa52f, except for a tiny part that was reverted separately: 65331da0032ab4253a4bc0ddcb2da67664bd86a9. That will be reapplied later on, since it turned out to be more involved.
This commit is enabled by 5523fefb01c282c4cbcaf6314a9aaf658c6c145f and f0f548a65a215c450d956dbcedb03656449705b9, specifically the part that makes 'clang-tidy/checkers/misc/header-include-cycle.cpp' separator agnostic.
show more ...
|
#
0a9611fd |
| 06-Sep-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
Revert "[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`"
This reverts commit ddbcc10b9e26b18f6a70e23d0611b9da75ffa52f.
The 'clang-tidy/checkers/misc/header-include-cycle.cpp' test start
Revert "[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`"
This reverts commit ddbcc10b9e26b18f6a70e23d0611b9da75ffa52f.
The 'clang-tidy/checkers/misc/header-include-cycle.cpp' test started failing on Windows: https://lab.llvm.org/buildbot/#/builders/216/builds/26855.
show more ...
|
#
ddbcc10b |
| 06-Sep-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`
This commit replaces some calls to the deprecated `FileEntry::getName()` with `FileEntryRef::getName()` by swapping current usages of `Sou
[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`
This commit replaces some calls to the deprecated `FileEntry::getName()` with `FileEntryRef::getName()` by swapping current usages of `SourceManager::getFileEntryForID()` with `SourceManager::getFileEntryRefForID()`. This lowers the number of usages of the deprecated `FileEntry::getName()` from 95 to 50.
show more ...
|
Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
0d1be98a |
| 03-May-2023 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][USR] Prevent crashes on incomplete FunctionDecls
FunctionDecls can be created with null types (D124351 added such a new code path), to be filled in later. But parsing can stop before complet
[clang][USR] Prevent crashes on incomplete FunctionDecls
FunctionDecls can be created with null types (D124351 added such a new code path), to be filled in later. But parsing can stop before completing the Decl (e.g. if code completion point is reached). Unfortunately most of the methods in FunctionDecl and its derived classes assume a complete decl and don't perform null-checks. Since we're not encountring crashes in the wild along other code paths today introducing extra checks into quite a lot of places didn't feel right (due to extra complexity && run time checks). I believe another alternative would be to change Parser & Sema to never create decls with invalid types, but I can't really see an easy way of doing that, as most of the pieces are structured around filling that information as parsing proceeds.
Differential Revision: https://reviews.llvm.org/D149733
show more ...
|
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
c8b37e48 |
| 23-Feb-2023 |
Alex Lorenz <arphaman@gmail.com> |
[clang] extend external_source_symbol attribute with USR clause
Allow the user to specify a concrete USR in the external_source_symbol attribute. That will let Clang's indexer to use Swift USRs for
[clang] extend external_source_symbol attribute with USR clause
Allow the user to specify a concrete USR in the external_source_symbol attribute. That will let Clang's indexer to use Swift USRs for Swift declarations that are represented with C++ declarations.
This new clause is used by Swift when generating a C++ header representation of a Swift module: https://github.com/apple/swift/pull/63002
Differential Revision: https://reviews.llvm.org/D141324
show more ...
|
Revision tags: llvmorg-16.0.0-rc3 |
|
#
890146b1 |
| 18-Feb-2023 |
Paulo Matos <pmatos@igalia.com> |
[WebAssembly] Initial support for reference type externref in clang
This patch introduces a new type __externref_t that denotes a WebAssembly opaque reference type. It also implements builtin __buil
[WebAssembly] Initial support for reference type externref in clang
This patch introduces a new type __externref_t that denotes a WebAssembly opaque reference type. It also implements builtin __builtin_wasm_ref_null_extern(), that returns a null value of __externref_t. This lays the ground work for further builtins and reference types.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D122215
show more ...
|
Revision tags: llvmorg-16.0.0-rc2 |
|
#
bccf5999 |
| 06-Feb-2023 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[clang][WebAssembly] Initial support for reference type externref in clang"
Very likely breaks stage 3 of msan build bot. Good: 764c88a50ac76a2df2d051a0eb5badc6867aabb6 https://lab.llvm.org/
Revert "[clang][WebAssembly] Initial support for reference type externref in clang"
Very likely breaks stage 3 of msan build bot. Good: 764c88a50ac76a2df2d051a0eb5badc6867aabb6 https://lab.llvm.org/buildbot/#/builders/74/builds/17058 Looks unrelated: 48b5a06dfcab12cf093a1a3df42cb5b684e2be4c Bad: 48b5a06dfcab12cf093a1a3df42cb5b684e2be4c https://lab.llvm.org/buildbot/#/builders/74/builds/17059
This reverts commit eb66833d19573df97034a81279eda31b8d19815b.
show more ...
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
eb66833d |
| 09-Jan-2023 |
Paulo Matos <pmatos@igalia.com> |
[clang][WebAssembly] Initial support for reference type externref in clang
This patch introduces a new type __externref_t that denotes a WebAssembly opaque reference type. It also implements builtin
[clang][WebAssembly] Initial support for reference type externref in clang
This patch introduces a new type __externref_t that denotes a WebAssembly opaque reference type. It also implements builtin __builtin_wasm_ref_null_extern(), that returns a null value of __externref_t. This lays the ground work for further builtins and reference types.
Differential Revision: https://reviews.llvm.org/D122215
show more ...
|
Revision tags: llvmorg-15.0.6 |
|
#
699ae92f |
| 18-Nov-2022 |
Ben Barham <ben_barham@apple.com> |
[Index] Add various missing USR generation
Over the years there's been many builtin types added without corresponding USRs. Add a `@BT@<name>` USR for all these types. Also add a comment so that hop
[Index] Add various missing USR generation
Over the years there's been many builtin types added without corresponding USRs. Add a `@BT@<name>` USR for all these types. Also add a comment so that hopefully this doesn't continue happening.
`MSGuid` was also missing a USR, use `@MG@GUID{<uuid>}` for it.
Resolves rdar://102198268.
Differential Revision: https://reviews.llvm.org/D138322
show more ...
|
Revision tags: llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
1acffe81 |
| 24-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
NFC: [clang] Template argument cleanups.
Removes a bunch of obsolete methods in favor of a single one returning an ArrayRef of TemplateArgument.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
NFC: [clang] Template argument cleanups.
Removes a bunch of obsolete methods in favor of a single one returning an ArrayRef of TemplateArgument.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136602
show more ...
|
Revision tags: llvmorg-15.0.3, working |
|
#
20c9ac29 |
| 04-Oct-2022 |
Sam McCall <sam.mccall@gmail.com> |
[Index] USRGeneration doesn't depend on unnamed.printName() => ''. NFC
This prepares for printName() to print `(anonymous struct)` etc in D134813.
Differential Revision: https://reviews.llvm.org/D1
[Index] USRGeneration doesn't depend on unnamed.printName() => ''. NFC
This prepares for printName() to print `(anonymous struct)` etc in D134813.
Differential Revision: https://reviews.llvm.org/D135191
show more ...
|
Revision tags: llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0 |
|
#
b7a7aeee |
| 04-Sep-2022 |
Kazu Hirata <kazu@google.com> |
[clang] Qualify auto in range-based for loops (NFC)
|
Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
3f18f7c0 |
| 08-Aug-2022 |
Fangrui Song <i@maskray.me> |
[clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D131346
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3 |
|
#
75e16fd2 |
| 26-Apr-2022 |
Ilya Biryukov <ibiryukov@google.com> |
[Index] [clangd] Support for concept declarations and requires expressions
Add support for concepts and requires expression in the clang index. Genarate USRs for concepts.
Also change how `Recursiv
[Index] [clangd] Support for concept declarations and requires expressions
Add support for concepts and requires expression in the clang index. Genarate USRs for concepts.
Also change how `RecursiveASTVisitor` handles return type requirement in requires expressions. The new code unpacks the synthetic template parameter list used for storing the actual expression. This simplifies implementation of the indexing. No code seems to depend on the original traversal anyway and the synthesized template parameter list is easily accessible from inside the requires expression if needed.
Add tests in the clangd codebase.
Fixes https://github.com/clangd/clangd/issues/1103.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D124441
show more ...
|
Revision tags: llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
de867c6d |
| 23-Mar-2022 |
Nathan Sidwell <nathan@acm.org> |
[clang] Reformat
Reformat some misindentation that is coincidentally close to a piece being worked on.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D122314
|