Revision tags: llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2 |
|
#
57c681f3 |
| 10-Aug-2017 |
Momchil Velikov <momchil.velikov@arm.com> |
Place implictly declared functions at block scope
Such implicitly declared functions behave as if the enclosing block contained the declaration extern int name() (C90, 6.3.3.2 Function calls), thus
Place implictly declared functions at block scope
Such implicitly declared functions behave as if the enclosing block contained the declaration extern int name() (C90, 6.3.3.2 Function calls), thus their names should have block scope (C90, 6.1.2.1 Scope of identifiers).
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224
Differential Revision: https://reviews.llvm.org/D33676
llvm-svn: 310616
show more ...
|
Revision tags: llvmorg-5.0.0-rc1 |
|
#
9b9188d8 |
| 13-Jul-2017 |
Alex Lorenz <arphaman@gmail.com> |
[index] Objective-C method declarations and message sends with an empty first selector piece should store the location of the first ':'
rdar://33188656
llvm-svn: 307901
|
#
6c9af50c |
| 03-Jul-2017 |
Alex Lorenz <arphaman@gmail.com> |
Add a fixit for -Wobjc-protocol-property-synthesis
rdar://32132756
Differential Revision: https://reviews.llvm.org/D34886
llvm-svn: 307014
|
#
812012f3 |
| 19-Jun-2017 |
Alex Lorenz <arphaman@gmail.com> |
[Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods
This change avoid a crash that occurred when skipping to EOF while parsing an ObjC interface/implementation.
rdar://31963
[Parser][ObjC] Use an artificial EOF token while parsing lexed ObjC methods
This change avoid a crash that occurred when skipping to EOF while parsing an ObjC interface/implementation.
rdar://31963299
Differential Revision: https://reviews.llvm.org/D34185
llvm-svn: 305719
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1 |
|
#
f1278211 |
| 11-Apr-2017 |
Alex Lorenz <arphaman@gmail.com> |
[Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used as identifiers in Objective-C++
This commit improves the 'expected identifier' errors that are presented when a C++ keywo
[Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are used as identifiers in Objective-C++
This commit improves the 'expected identifier' errors that are presented when a C++ keyword is used as an identifier in Objective-C++ by mentioning that this is a C++ keyword in the diagnostic message. It also improves the error recovery: the parser will now treat the C++ keywords as identifiers to prevent unrelated parsing errors.
rdar://20626062
Differential Revision: https://reviews.llvm.org/D26503
llvm-svn: 299950
show more ...
|
#
11ad3391 |
| 23-Mar-2017 |
Vassil Vassilev <v.g.vassilev@gmail.com> |
Publish RAIIObjectsForParser.h for external usage.
Some clients (eg the cling interpreter) need to recover their parser from errors.
Patch by Axel Naumann (D31190)!
llvm-svn: 298606
|
#
f9371395 |
| 23-Mar-2017 |
Alex Lorenz <arphaman@gmail.com> |
Support attributes for Objective-C categories
rdar://31095315
Differential Revision: https://reviews.llvm.org/D31179
llvm-svn: 298589
|
#
194b28eb |
| 16-Mar-2017 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes
This enhances the AST to keep track of locations of the names in those ObjC prop
[index/AST] Add references for ObjC getter=/setter= property attributes and related property getter/setter role fixes
This enhances the AST to keep track of locations of the names in those ObjC property attributes, and reports them for indexing.
Patch by Nathan Hawes! https://reviews.llvm.org/D30907
llvm-svn: 297972
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2 |
|
#
dfcf1cb1 |
| 20-Jan-2017 |
Manman Ren <manman.ren@gmail.com> |
Revert r292508 given that we intend to remove driver options for cxx modules.
llvm-svn: 292639
|
#
4798302d |
| 19-Jan-2017 |
Manman Ren <manman.ren@gmail.com> |
Module: Improve diagnostic message when cxx modules are disabled and @import is used in Objective CXX.
rdar://problem/19399671
llvm-svn: 292508
|
Revision tags: llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2 |
|
#
a589abc3 |
| 01-Dec-2016 |
Alex Lorenz <arphaman@gmail.com> |
[ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression
This patch ensures that the typo fixit for the @try/@finally/@autoreleasepool {} directive is shown only when we're par
[ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression
This patch ensures that the typo fixit for the @try/@finally/@autoreleasepool {} directive is shown only when we're parsing an actual statement where such directives can actually be present.
rdar://19669565
Differential Revision: https://reviews.llvm.org/D26916
llvm-svn: 288334
show more ...
|
Revision tags: llvmorg-3.9.1-rc1 |
|
#
f95a0004 |
| 09-Nov-2016 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[index] Fix issue with protocol name locations in conformance list of an ObjC class when they come from a typedef.
The ObjC class protocol list assumes there is an associated location for each proto
[index] Fix issue with protocol name locations in conformance list of an ObjC class when they come from a typedef.
The ObjC class protocol list assumes there is an associated location for each protocol but no location is provided when the protocol list comes from a typedef, and we end up with a buffer overflow when trying to get locations for the protocol names.
Fixes crash of rdar://28980278.
llvm-svn: 286331
show more ...
|
#
731ca0e8 |
| 03-Nov-2016 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
Remove redundant calls to std::string::data()
Reviewers: aaron.ballman, mehdi_amini, dblaikie
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D26276
llvm-svn: 285
Remove redundant calls to std::string::data()
Reviewers: aaron.ballman, mehdi_amini, dblaikie
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D26276
llvm-svn: 285899
show more ...
|
#
218c8743 |
| 13-Sep-2016 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[SemaObjC] Be more strict while parsing type arguments and protocols
Fix a crash-on-invalid.
When parsing type arguments and protocols, parseObjCTypeArgsOrProtocolQualifiers() calls ParseTypeName()
[SemaObjC] Be more strict while parsing type arguments and protocols
Fix a crash-on-invalid.
When parsing type arguments and protocols, parseObjCTypeArgsOrProtocolQualifiers() calls ParseTypeName(), which tries to find matching tokens for '[', '(', etc whenever they appear among potential type names. If unmatched, ParseTypeName() yields a tok::eof token stream. This leads to crashes since the parsing at this point is not expected to go beyond the param list closing '>'.
Fix that by properly handling tok::eof in parseObjCTypeArgsOrProtocolQualifiers() callers.
Differential Revision: https://reviews.llvm.org/D23852
rdar://problem/25063557
llvm-svn: 281383
show more ...
|
#
8452327f |
| 03-Sep-2016 |
Nico Weber <nicolasweber@gmx.de> |
Move calls of MaybeParseMicrosoftAttributes() before ParseExternalDeclaration() into ParseDeclOrFunctionDefInternal() (which is called by MaybeParseMicrosoftAttributes()), so that the attributes can
Move calls of MaybeParseMicrosoftAttributes() before ParseExternalDeclaration() into ParseDeclOrFunctionDefInternal() (which is called by MaybeParseMicrosoftAttributes()), so that the attributes can be stored in the DeclSpec. No behavior change yet, part of https://reviews.llvm.org/D23895
llvm-svn: 280574
show more ...
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1 |
|
#
1383ddc4 |
| 19-Jul-2016 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[SemaObjC] Improve ObjCDictionaryLiteral and ObjCArryLiteral diagnostics
Sema actions on ObjCDictionaryLiteral and ObjCArryLiteral are currently done as a side-effect of Sema upon parent expressions
[SemaObjC] Improve ObjCDictionaryLiteral and ObjCArryLiteral diagnostics
Sema actions on ObjCDictionaryLiteral and ObjCArryLiteral are currently done as a side-effect of Sema upon parent expressions, which incurs of delayed typo corrections for such literals to be performed by TypoTransforms upon the ObjCDictionaryLiteral and ObjCArryLiteral themselves instead of its elements individually.
This is specially bad because it was not designed to act on several elements; searching through all possible combinations of corrections for several elements is very expensive. Additionally, when one of the elements has no correction candidate, we still explore all options and at the end emit no typo corrections whatsoever.
Do the proper sema actions by acting on each element alone during appropriate literal parsing time to get proper diagonistics and decent compile time behavior.
Differential Revision: http://reviews.llvm.org/D22183
rdar://problem/21046678
llvm-svn: 276020
show more ...
|
#
29099ded |
| 16-Jul-2016 |
Erik Pilkington <erik.pilkington@gmail.com> |
[ObjC] Implement @available in the Parser and AST
This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the Parser and Sema to generate it. This node represents an availability chec
[ObjC] Implement @available in the Parser and AST
This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the Parser and Sema to generate it. This node represents an availability check of the form:
@available(macos 10.10, *);
Which will eventually compile to a runtime check of the host's OS version. This is the first patch of the feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html
Differential Revision: https://reviews.llvm.org/D22171
llvm-svn: 275654
show more ...
|
#
f9e890cb |
| 16-Jun-2016 |
Olivier Goffart <ogoffart@woboq.com> |
Fix a few issues while skipping function bodies
- In functions with try { } catch { }, only the try block would be skipped, not the catch blocks
- The template functions would still be parsed.
Fix a few issues while skipping function bodies
- In functions with try { } catch { }, only the try block would be skipped, not the catch blocks
- The template functions would still be parsed.
- The initializers within a constructor would still be parsed.
- The inline functions within class would still be stored, only to be discared later.
- Invalid code with try would assert (as in "int foo() try assert_here")
This attempt to do even less while skipping function bodies.
Differential Revision: http://reviews.llvm.org/D20821
llvm-svn: 272963
show more ...
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
d063c5a1 |
| 02-Jun-2016 |
Manman Ren <manman.ren@gmail.com> |
FixIt: use getLocForEndOfToken to insert fix-it after a type name.
Instead of setting DeclSpec's range end to point to the next token after the DeclSpec, we use getLocForEndOfToken to insert fix-it
FixIt: use getLocForEndOfToken to insert fix-it after a type name.
Instead of setting DeclSpec's range end to point to the next token after the DeclSpec, we use getLocForEndOfToken to insert fix-it after a type name.
Before this fix, fix-it will change ^(NSView view) to ^(*NSView view)
This commit correctly updates the source to ^(NSView* view).
rdar://21042144 Differential Revision: http://reviews.llvm.org/D20844
llvm-svn: 271448
show more ...
|
#
bd59b489 |
| 18-Apr-2016 |
Akira Hatanaka <ahatanaka@apple.com> |
[Parser][ObjC] Make sure c++11 in-class initialization is done when the constructor's definition is in an implementation block.
Without this commit, ptr doesn't get initialized to null in the follow
[Parser][ObjC] Make sure c++11 in-class initialization is done when the constructor's definition is in an implementation block.
Without this commit, ptr doesn't get initialized to null in the following code:
struct S { S(); void *ptr = nullptr; };
@implementation I S::S() {} @end
rdar://problem/25693624
llvm-svn: 266645
show more ...
|
#
c54768f7 |
| 13-Apr-2016 |
Bruno Cardoso Lopes <bruno.cardoso@gmail.com> |
[SemaObjC] Properly handle mix between type arguments and protocols.
Under certain conditions clang currently fails to properly diagnostic ObjectC parameter list when type args and protocols are mix
[SemaObjC] Properly handle mix between type arguments and protocols.
Under certain conditions clang currently fails to properly diagnostic ObjectC parameter list when type args and protocols are mixed in the same list. This happens when the first item in the parameter list is a (1) protocol, (2) unknown type or (3) a list of protocols/unknown types up to the first type argument. Fix the problem to report the proper error, example:
NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"]; NSNumber *bar = foo[0]; NSLog(@"%@", bar);
$ clang ... x.m:7:13: error: angle brackets contain both a type ('NSValue') and a protocol ('M') NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"]; ~ ^
Differential Revision: http://reviews.llvm.org/D18997
rdar://problem/22204367
llvm-svn: 266245
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3 |
|
#
1ced5095 |
| 12-Feb-2016 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
Fix remaining Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D17218
llvm-svn: 260757
|
#
2eabcc98 |
| 09-Feb-2016 |
David Blaikie <dblaikie@gmail.com> |
Simplify EnterTokenStream API to make it more robust for memory management
While this won't help fix things like the bug that r260219 addressed, it seems like good tidy up to have anyway.
(it might
Simplify EnterTokenStream API to make it more robust for memory management
While this won't help fix things like the bug that r260219 addressed, it seems like good tidy up to have anyway.
(it might be nice if "makeArrayRef" always produced a MutableArrayRef & let it decay to an ArrayRef when needed - then I'd use that for the MutableArrayRefs in this patch)
If we had std::dynarray I'd use that instead of unique_ptr+size_t, ideally (but then it'd have to be threaded down through the Preprocessor all the way - no idea how painful that would be)
llvm-svn: 260246
show more ...
|
Revision tags: llvmorg-3.8.0-rc2 |
|
#
0fe61f86 |
| 29-Jan-2016 |
Manman Ren <manman.ren@gmail.com> |
Class Property: parse @dynamic (class).
rdar://23891898
llvm-svn: 259224
|
#
5b786407 |
| 28-Jan-2016 |
Manman Ren <manman.ren@gmail.com> |
Class Property: class property and instance property can have the same name.
Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name of the property: ObjCPropertyDecl::findPro
Class Property: class property and instance property can have the same name.
Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name of the property: ObjCPropertyDecl::findPropertyDecl, ObjCContainerDecl::FindPropertyDeclaration, ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass, ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl.
ObjCPropertyQueryKind currently has 3 values: OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class
This extra parameter specifies that we are looking for an instance property with the given name, or a class property with the given name, or any property with the given name (if both exist, the instance property will be returned).
rdar://23891898
llvm-svn: 259070
show more ...
|