|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, 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, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, 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, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
| #
452db157 |
| 20-Jun-2022 |
Kazu Hirata <[email protected]> |
[clang] Don't use Optional::hasValue (NFC)
|
| #
8c7b64b5 |
| 15-Jun-2022 |
Martin Boehme <[email protected]> |
[clang] Reject non-declaration C++11 attributes on declarations
For backwards compatiblity, we emit only a warning instead of an error if the attribute is one of the existing type attributes that we
[clang] Reject non-declaration C++11 attributes on declarations
For backwards compatiblity, we emit only a warning instead of an error if the attribute is one of the existing type attributes that we have historically allowed to "slide" to the `DeclSpec` just as if it had been specified in GNU syntax. (We will call these "legacy type attributes" below.)
The high-level changes that achieve this are:
- We introduce a new field `Declarator::DeclarationAttrs` (with appropriate accessors) to store C++11 attributes occurring in the attribute-specifier-seq at the beginning of a simple-declaration (and other similar declarations). Previously, these attributes were placed on the `DeclSpec`, which made it impossible to reconstruct later on whether the attributes had in fact been placed on the decl-specifier-seq or ahead of the declaration.
- In the parser, we propgate declaration attributes and decl-specifier-seq attributes separately until we can place them in `Declarator::DeclarationAttrs` or `DeclSpec::Attrs`, respectively.
- In `ProcessDeclAttributes()`, in addition to processing declarator attributes, we now also process the attributes from `Declarator::DeclarationAttrs` (except if they are legacy type attributes).
- In `ConvertDeclSpecToType()`, in addition to processing `DeclSpec` attributes, we also process any legacy type attributes that occur in `Declarator::DeclarationAttrs` (and emit a warning).
- We make `ProcessDeclAttribute` emit an error if it sees any non-declaration attributes in C++11 syntax, except in the following cases: - If it is being called for attributes on a `DeclSpec` or `DeclaratorChunk` - If the attribute is a legacy type attribute (in which case we only emit a warning)
The standard justifies treating attributes at the beginning of a simple-declaration and attributes after a declarator-id the same. Here are some relevant parts of the standard:
- The attribute-specifier-seq at the beginning of a simple-declaration "appertains to each of the entities declared by the declarators of the init-declarator-list" (https://eel.is/c++draft/dcl.dcl#dcl.pre-3)
- "In the declaration for an entity, attributes appertaining to that entity can appear at the start of the declaration and after the declarator-id for that declaration." (https://eel.is/c++draft/dcl.dcl#dcl.pre-note-2)
- "The optional attribute-specifier-seq following a declarator-id appertains to the entity that is declared." (https://eel.is/c++draft/dcl.dcl#dcl.meaning.general-1)
The standard contains similar wording to that for a simple-declaration in other similar types of declarations, for example:
- "The optional attribute-specifier-seq in a parameter-declaration appertains to the parameter." (https://eel.is/c++draft/dcl.fct#3)
- "The optional attribute-specifier-seq in an exception-declaration appertains to the parameter of the catch clause" (https://eel.is/c++draft/except.pre#1)
The new behavior is tested both on the newly added type attribute `annotate_type`, for which we emit errors, and for the legacy type attribute `address_space` (chosen somewhat randomly from the various legacy type attributes), for which we emit warnings.
Depends On D111548
Reviewed By: aaron.ballman, rsmith
Differential Revision: https://reviews.llvm.org/D126061
show more ...
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
3b762b3a |
| 31-Mar-2022 |
Volodymyr Sapsai <[email protected]> |
[clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`.
Differential Revision: https://reviews.llvm.org/D124285
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
f558acf4 |
| 06-Jan-2022 |
David Goldman <[email protected]> |
Reland "[clang][ObjC] Add fix it for missing methods in impl"
This reverts commit 37be74885946f18dbeb70343ad659924c61d2549/ relands https://reviews.llvm.org/D116417 now that the internal issue has b
Reland "[clang][ObjC] Add fix it for missing methods in impl"
This reverts commit 37be74885946f18dbeb70343ad659924c61d2549/ relands https://reviews.llvm.org/D116417 now that the internal issue has been fixed.
show more ...
|
| #
37be7488 |
| 05-Jan-2022 |
Rumeet Dhindsa <[email protected]> |
Revert "[clang][ObjC] Add fix it for missing methods in impl"
This reverts commit dd72ae3dcc6895f95e1203b40aabcb069c76a0ab.
Notified the author of the internal failure and author suggested to rever
Revert "[clang][ObjC] Add fix it for missing methods in impl"
This reverts commit dd72ae3dcc6895f95e1203b40aabcb069c76a0ab.
Notified the author of the internal failure and author suggested to revert it for now.
show more ...
|
| #
dd72ae3d |
| 30-Dec-2021 |
David Goldman <[email protected]> |
[clang][ObjC] Add fix it for missing methods in impl
We suggest inserting the method with an empty body at the end of the implementation decl.
Differential Revision: https://reviews.llvm.org/D116417
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
d0ac215d |
| 14-Nov-2021 |
Kazu Hirata <[email protected]> |
[clang] Use isa instead of dyn_cast (NFC)
|
| #
4db2e4ce |
| 31-Oct-2021 |
Kazu Hirata <[email protected]> |
Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC)
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4 |
|
| #
bde305ba |
| 20-Sep-2021 |
Nico Weber <[email protected]> |
[clang] Fix a few comment more typos to cycle bots
|
| #
e6020b2a |
| 16-Sep-2021 |
Richard Howell <[email protected]> |
[clang][NFC] refactor GlobalMethodPool to encapsulate its map
This refactor changes the GlobalMethodPool to a class that contains the DenseMap of methods. This is to allow for the addition of a sepa
[clang][NFC] refactor GlobalMethodPool to encapsulate its map
This refactor changes the GlobalMethodPool to a class that contains the DenseMap of methods. This is to allow for the addition of a separate DenseSet in a follow-up diff that will handle method de-duplication when inserting methods into the global method pool.
Changes: - the `GlobalMethods` pair becomes `GlobalMethodPool::Lists` - the `GlobalMethodPool` becomes a class containing the `DenseMap` of methods - pass through methods are added to maintain most of the existing code without changing `MethodPool` -> `MethodPool.Methods` everywhere
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D109898
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5 |
|
| #
b660abc8 |
| 05-Apr-2021 |
Erik Pilkington <[email protected]> |
[ObjC] Add a command line flag that disables recognition of objc_direct for testability
Programmers would like to be able to test direct methods by calling them from a different linkage unit or mock
[ObjC] Add a command line flag that disables recognition of objc_direct for testability
Programmers would like to be able to test direct methods by calling them from a different linkage unit or mocking them, both of which are impossible. This patch adds a flag that effectively disables the attribute, which will fix this when enabled in testable builds. rdar://71190891
Differential revision: https://reviews.llvm.org/D95845
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
| #
2fd11e0b |
| 04-Jan-2021 |
Thorsten Schütt <[email protected]> |
Revert "[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)"
This reverts commit efc82c4ad2bcb256a4f4c20238d08cd3afba4d2d.
|
| #
efc82c4a |
| 23-Dec-2020 |
Thorsten Schütt <[email protected]> |
[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D93765
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
db226cdf |
| 04-Dec-2020 |
Alex Lorenz <[email protected]> |
[objc] diagnose protocol conformance in categories with direct members in their corresponding class interfaces
Categories that add protocol conformances to classes with direct members should prohibi
[objc] diagnose protocol conformance in categories with direct members in their corresponding class interfaces
Categories that add protocol conformances to classes with direct members should prohibit protocol conformances when the methods/properties that the protocol expects are actually declared as 'direct' in the class.
Differential Revision: https://reviews.llvm.org/D92602
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
e4d27932 |
| 11-Nov-2020 |
Faisal Vali <[email protected]> |
[NFC, Refactor] Rename the (scoped) enum DeclaratorContext's enumerators to remove duplication
Since these are scoped enumerators, they have to be prefixed by DeclaratorContext, so lets remove Conte
[NFC, Refactor] Rename the (scoped) enum DeclaratorContext's enumerators to remove duplication
Since these are scoped enumerators, they have to be prefixed by DeclaratorContext, so lets remove Context from the name, and return some characters to the multiverse.
Patch was reviewed here: https://reviews.llvm.org/D91011
Thank you to aaron, bruno, wyatt and barry for indulging me.
show more ...
|
| #
e2d4174e |
| 13-Oct-2020 |
Richard Smith <[email protected]> |
Ensure that InheritedAttrs are properly inherited along a redeclaration chain for ObjCInterfaceDecls.
Only one such declaration can actually have attributes (the definition, if any), but generally w
Ensure that InheritedAttrs are properly inherited along a redeclaration chain for ObjCInterfaceDecls.
Only one such declaration can actually have attributes (the definition, if any), but generally we assume that we can look for InheritedAttrs on the most recent declaration.
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2 |
|
| #
02899d7f |
| 11-Aug-2020 |
Raphael Isemann <[email protected]> |
[clang] Don't make ObjCIvarDecl visible twice when adding them to an implicit ObjCInterfaceDecl
`addDecl` is making the ivar visible in its primary context. The primary context of the ivar here is i
[clang] Don't make ObjCIvarDecl visible twice when adding them to an implicit ObjCInterfaceDecl
`addDecl` is making the ivar visible in its primary context. The primary context of the ivar here is in a 'fragile' ABI the ObjCInterfaceDecl and in a 'non-fragile' ABI the current ObjCImplementationDecl. The additional call to `makeDeclVisibleInContext` to make the ivar visible in the ObjCInterfaceDecl is only necessary in the 'non-fragile' case (as in the 'fragile' case the Decl becomes automatically visible in the ObjCInterfaceDecl with the `addDecl` call as thats its primary context). See `Sema::ActOnIvar` for where the ivar is put into a different context depending on the ABI.
To put this into an example:
``` lang=c++ @implementation SomeClass { id ivar1; } @end
fragile case: implicit ObjCInterfaceDecl 'SomeClass' `- ivar1 (in primary context and will be automatically made visible) ObjCImplementationDecl 'SomeClass'
non-fragile case: implicit ObjCInterfaceDecl 'SomeClass' `-<<<ivar1 not visible here and needs to be manually marked as visible.>>> ObjCImplementationDecl 'SomeClass' `- ivar1 (in its primary context and will be automatically made visible here) ```
Making a Decl visible multiple times in the same context is inefficient and potentially can lead to crashes. See D84827 for more info and what this is breaking.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D84829
show more ...
|
| #
442a8029 |
| 11-Aug-2020 |
Raphael Isemann <[email protected]> |
[clang] Don't make synthesized accessor stub functions visible twice
`addDecl` is making the Decl visible, so there is no need to make it explicitly visible again. Making it visible twice will also
[clang] Don't make synthesized accessor stub functions visible twice
`addDecl` is making the Decl visible, so there is no need to make it explicitly visible again. Making it visible twice will also make the lookup storage less efficient and potentially lead to crashes, see D84827 for that.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D84828
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
1f593f46 |
| 20-Jun-2020 |
Eric Christopher <[email protected]> |
[AST/Lex/Parse/Sema] As part of using inclusive language within the llvm project, migrate away from the use of blacklist and whitelist.
|
| #
2e92b397 |
| 08-Jun-2020 |
Martin Boehme <[email protected]> |
[clang] Rename Decl::isHidden() to isUnconditionallyVisible().
Also invert the sense of the return value.
As pointed out by the FIXME that this change resolves, isHidden() wasn't a very accurate na
[clang] Rename Decl::isHidden() to isUnconditionallyVisible().
Also invert the sense of the return value.
As pointed out by the FIXME that this change resolves, isHidden() wasn't a very accurate name for this function.
I haven't yet changed any of the strings that are output in ASTDumper.cpp / JSONNodeDumper.cpp / TextNodeDumper.cpp in response to whether isHidden() is set because
a) I'm not sure whether it's actually desired to change these strings (would appreciate feedback on this), and
b) In any case, I'd like to get this pure rename out of the way first, without any changes to tests. Changing the strings that are output in the various ...Dumper.cpp files will require changes to quite a few tests, and I'd like to make those in a separate change.
Differential Revision: https://reviews.llvm.org/D81392
Reviewed By: rsmith
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1 |
|
| #
65f58878 |
| 23-Apr-2020 |
Volodymyr Sapsai <[email protected]> |
[ObjC generics] Fix not inheriting type bounds in categories/extensions.
When a category/extension doesn't repeat a type bound, corresponding type parameter is substituted with `id` when used as a t
[ObjC generics] Fix not inheriting type bounds in categories/extensions.
When a category/extension doesn't repeat a type bound, corresponding type parameter is substituted with `id` when used as a type argument. As a result, in the added test case it was causing errors like
> type argument 'T' (aka 'id') does not satisfy the bound ('id<NSCopying>') of type parameter 'T'
We are already checking that type parameters should be consistent everywhere (see `checkTypeParamListConsistency`) and update `ObjCTypeParamDecl` to have correct underlying type. And when we use the type parameter as a method return type or a method parameter type, it is substituted to the bounded type. But when we use the type parameter as a type argument, we check `ObjCTypeParamType` that wasn't updated and remains `id`.
Fix by updating not only `ObjCTypeParamDecl` UnderlyingType but also TypeForDecl as we use the underlying type to create a canonical type for `ObjCTypeParamType` (see `ASTContext::getObjCTypeParamType`).
This is a different approach to fixing the issue. The previous one was 02c2ab3d8872416589bd1a6ca3dfb96ba373a3b9 which was reverted in 4c539e8da1b3de38a53ef3f7497f5c45a3243b61. The problem with the previous approach was that `ObjCTypeParamType::desugar` was returning underlying type for `ObjCTypeParamDecl` without applying any protocols stored in `ObjCTypeParamType`. It caused inconsistencies in comparing types before and after desugaring.
Re-applying after fixing intermittent test failures.
rdar://problem/54329242
Reviewed By: erik.pilkington
Differential Revision: https://reviews.llvm.org/D72872
show more ...
|
| #
8fb7cfce |
| 08-Apr-2020 |
Volodymyr Sapsai <[email protected]> |
Revert "[ObjC generics] Fix not inheriting type bounds in categories/extensions."
This reverts commit a8c8b627f23f204fb621bd2a8c495cfc8bc16ae7. It causes intermittent
Clang :: SemaObjC/paramete
Revert "[ObjC generics] Fix not inheriting type bounds in categories/extensions."
This reverts commit a8c8b627f23f204fb621bd2a8c495cfc8bc16ae7. It causes intermittent
Clang :: SemaObjC/parameterized_classes_subst.m
test failures on various bots.
show more ...
|
| #
a8c8b627 |
| 03-Apr-2020 |
Volodymyr Sapsai <[email protected]> |
[ObjC generics] Fix not inheriting type bounds in categories/extensions.
When a category/extension doesn't repeat a type bound, corresponding type parameter is substituted with `id` when used as a t
[ObjC generics] Fix not inheriting type bounds in categories/extensions.
When a category/extension doesn't repeat a type bound, corresponding type parameter is substituted with `id` when used as a type argument. As a result, in the added test case it was causing errors like
> type argument 'T' (aka 'id') does not satisfy the bound ('id<NSCopying>') of type parameter 'T'
We are already checking that type parameters should be consistent everywhere (see `checkTypeParamListConsistency`) and update `ObjCTypeParamDecl` to have correct underlying type. And when we use the type parameter as a method return type or a method parameter type, it is substituted to the bounded type. But when we use the type parameter as a type argument, we check `ObjCTypeParamType` that wasn't updated and remains `id`.
Fix by updating not only `ObjCTypeParamDecl` UnderlyingType but also TypeForDecl as we use the underlying type to create a canonical type for `ObjCTypeParamType` (see `ASTContext::getObjCTypeParamType`).
This is a different approach to fixing the issue. The previous one was 02c2ab3d8872416589bd1a6ca3dfb96ba373a3b9 which was reverted in 4c539e8da1b3de38a53ef3f7497f5c45a3243b61. The problem with the previous approach was that `ObjCTypeParamType::desugar` was returning underlying type for `ObjCTypeParamDecl` without applying any protocols stored in `ObjCTypeParamType`. It caused inconsistencies in comparing types before and after desugaring.
rdar://problem/54329242
Reviewed By: erik.pilkington
Differential Revision: https://reviews.llvm.org/D72872
show more ...
|
| #
20d704a7 |
| 23-Mar-2020 |
Pierre Habouzit <[email protected]> |
[objc_direct] also go through implementations when looking for clashes
Some methods are sometimes declared in the @implementation blocks which can cause undiagnosed clashes.
Just write a checkObjCD
[objc_direct] also go through implementations when looking for clashes
Some methods are sometimes declared in the @implementation blocks which can cause undiagnosed clashes.
Just write a checkObjCDirectMethodClashes() for this purpose.
Also make sure that "unavailable" selectors do not inherit objc_direct_members.
Differential Revision: https://reviews.llvm.org/D76643 Signed-off-by: Pierre Habouzit <[email protected]> Radar-ID: rdar://problem/59332804, rdar://problem/59782963
show more ...
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4 |
|
| #
d7c5037e |
| 12-Mar-2020 |
Reid Kleckner <[email protected]> |
Prune TargetInfo.h include from ParsedAttr.h, NFC
Saves ~400 includes of related headers:
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] ' | sort | uniq -c | sor
Prune TargetInfo.h include from ParsedAttr.h, NFC
Saves ~400 includes of related headers:
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] ' | sort | uniq -c | sort -nr 468 - llvm-project/clang/include/clang/Basic/TargetInfo.h 468 - llvm-project/clang/include/clang/Basic/TargetCXXABI.h 368 - llvm-project/llvm/include/llvm/Support/CodeGen.h 368 - llvm-project/clang/include/clang/Basic/XRayInstr.h 368 - llvm-project/clang/include/clang/Basic/CodeGenOptions.h 368 - llvm-project/clang/include/clang/Basic/CodeGenOptions.def 367 - llvm-project/llvm/include/llvm/ADT/FloatingPointMode.h 367 - llvm-project/clang/include/clang/Basic/DebugInfoOptions.h
show more ...
|