[PATCH] D29768: [TargetInfo] Set 'UseSignedCharForObjCBool' to false by default

2018-04-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 141045. arphaman marked 2 inline comments as done. arphaman added a comment. Herald added subscribers: jkorous-apple, kbarton, javed.absar, nemanjai. Sorry, missed the comments last year. Updated. Repository: rC Clang https://reviews.llvm.org/D29768 Fil

[PATCH] D29768: [TargetInfo] Set 'UseSignedCharForObjCBool' to false by default

2018-04-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 141070. arphaman added a comment. Only make the change for the Darwin platforms to avoid ObjC ABI breakage for non-Darwin platforms. https://reviews.llvm.org/D29768 Files: lib/Basic/TargetInfo.cpp lib/Basic/Targets/AArch64.cpp lib/Basic/Targets/ARM.

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2018-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D40983#1059087, @arphaman wrote: > In https://reviews.llvm.org/D40983#968796, @bruno wrote: > > > Makes sense, LGTM. > > > > Should we add documentation explaining how to use this? I'm fine if it > > comes in a follow up commit. > > > Sorry,

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2018-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D40983#968796, @bruno wrote: > Makes sense, LGTM. > > Should we add documentation explaining how to use this? I'm fine if it comes > in a follow up commit. Sorry, just got time to get back to this now. Thanks for the review! I'll add a doc

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2018-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329442: Generate Libclang invocation reproducers using a new -cc1gen-reproducer (authored by arphaman, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D38985#906893, @sammccall wrote: > Thanks, this looks a bunch simpler. > > I have a question about the direction here: AFAICS there's various efforts in > the refactoring infrastructure to allow consumers of the Refactor libs (e.g. > clang-r

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120335. arphaman added a comment. - Refactoring operations like ExtractFunction should be declared in headers and should contain the initiation checks. - Refactoring actions can now be all created in one "engine" file. - A new descriptor interface describes

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120336. arphaman added a comment. Remove unused function Repository: rL LLVM https://reviews.llvm.org/D38985 Files: include/clang/Tooling/Refactoring/Extract/ExtractFunction.h include/clang/Tooling/Refactoring/RefactoringActionRegistry.def include

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. The updated patch introduces some redundancy between the `RefactoringAction` and the descriptor interface. I will address this in a follow-up patch. Repository: rL LLVM https://reviews.llvm.org/D38985 ___ cfe-commits ma

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 5 inline comments as done. arphaman added inline comments. Comment at: include/clang/Tooling/Refactoring/Extract/ExtractFunction.h:21 +/// then called from the place where the original code was. +class ExtractFunction final : public SourceChangeRefactoringRule { +

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120466. arphaman added a comment. - Use a `RefactoringDescriptor` struct that's accessible from a static function in an operation class. - Make `createSourceReplacements` private. Repository: rL LLVM https://reviews.llvm.org/D38985 Files: include/cla

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/RefactoringActions.cpp:28 + +// FIXME: Remove the Actions alltogether. +class ExtractRefactoring final : public RefactoringAction { ioeric wrote: > Maybe I'm missing the context here... Why do we

[PATCH] D39332: [clang-refactor] Introduce "local-qualified-rename" action.

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I've committed https://reviews.llvm.org/D38985, so you'd have to rebase unfortunately. Things are still somewhat unstable :) Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:154 + +class LocalQualifiedRename final : public RefactoringActi

[PATCH] D37341: [Sema] Fix an assert-on-invalid by avoiding function template specialisation deduction for invalid functions with fabricated template arguments

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316778: [Sema] Fix an assert-on-invalid by avoiding function template specialisation (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D37341?vs=119967&id=120658#toc Repository:

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked 3 inline comments as done. Closed by commit rL316780: [refactor] Describe refactorings in the operation classes (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D38985?vs=120466&id

[PATCH] D39332: [clang-refactor] Introduce "local-qualified-rename" action.

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:154 + +class LocalQualifiedRename final : public RefactoringAction { +public: ioeric wrote: > ioeric wrote: > > arphaman wrote: > > > hokein wrote: > > > > sammccall wro

[PATCH] D39057: [clangd][WIP] Integrate the refactoring actions into clangd

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D39057#907820, @sammccall wrote: > In https://reviews.llvm.org/D39057#906297, @ilya-biryukov wrote: > > > There's another patch (https://reviews.llvm.org/D39276) that tries to add > > `workspace/executeCommand` for a slightly different use-ca

[PATCH] D38320: [clang] Fix serializers for `TypeTemplateParmDecl` + related types

2017-10-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Hi, Thanks for your patch! Could you please post a patch with full context (git diff -U9)? Comment at: lib/Serialization/ASTWriterDecl.cpp:1541 - bool OwnsDefaultArg = D->hasDefaultArgument() && -!D->defaultArgumentWasI

[PATCH] D39332: [clang-refactor] Introduce "local-qualified-rename" action.

2017-10-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:101 + std::string NewQualifiedName) { + return QualifiedRenameRule(std::move(OldQualifiedName), + std::move(NewQualifiedName));

[PATCH] D39441: [refactor][extract] insert semicolons into extracted/inserted code when needed

2017-10-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. This patch implements the semicolon insertion logic into the extract refactoring. The following rules are taken: - extracting expression: add terminating ';' to the extracted function. - extracting statements that don't require t

[PATCH] D39446: [PGO] Detect more structural changes with the stable hash

2017-10-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CodeGenPGO.cpp:186 +if (Hash.getHashVersion() != PGO_HASH_V1) + Type = getHashType(Hash.getHashVersion(), S); + Am I missing something or will this call always return the same type as before since

[PATCH] D39050: Add index-while-building support to Clang

2017-10-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Index/IndexDataStoreSymbolUtils.h:13 + +#include "indexstore/indexstore.h" +#include "clang/Index/IndexSymbol.h" It looks to me like this header, `"indexstore/indexstore.h"`, and `IndexDataStoreUtils.cpp`

[PATCH] D39522: [clang-rename] Use add_clang_tool

2017-11-01 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D39441: [refactor][extract] insert semicolons into extracted/inserted code when needed

2017-11-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 121339. arphaman marked 3 inline comments as done. arphaman added a comment. Address review comments Repository: rL LLVM https://reviews.llvm.org/D39441 Files: include/clang/Lex/Lexer.h lib/Lex/Lexer.cpp lib/Tooling/Refactoring/CMakeLists.txt li

[PATCH] D39332: [clang-refactor] Introduce a new rename rule for qualified symbols

2017-11-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:101 + std::string NewQualifiedName) { + return QualifiedRenameRule(std::move(OldQualifiedName), + std::move(NewQualifiedName));

[PATCH] D39419: Fix crash when parsing objective-c++ containing invalid lambda

2017-11-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:1020 - PA.Commit(); - return false; + PA2.Revert(); + return true; Just to clarify: It seems like this revert (in addition to two TPAs) is the main addition. Did we hit the assertion pr

[PATCH] D39419: Fix crash when parsing objective-c++ containing invalid lambda

2017-11-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D39419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D39441: [refactor][extract] insert semicolons into extracted/inserted code when needed

2017-11-03 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317343: [refactor][extract] insert semicolons into extracted/inserted code (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D39441?vs=121339&id=121516#toc Repository: rL LLVM

[PATCH] D39676: [clangd] Add rename support.

2017-11-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Side-comment: will want to let the user know about the fact that global symbols aren't really renamed yet until global rename works? https://reviews.llvm.org/D39676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D39332: [clang-refactor] Introduce a new rename rule for qualified symbols

2017-11-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:101 + std::string NewQualifiedName) { + return QualifiedRenameRule(std::move(OldQualifiedName), + std::move(NewQualifiedName));

[PATCH] D39706: [refactor][extract] Initial implementation of variable captures

2017-11-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. This patch adds an initial rudimentary support for capturing variables that should be passed to the extracted function. The variables are passed to the extracted function if they're used in the extracted code. If they're defined

[PATCH] D38708: [AST] Flag the typo-corrected nodes for better tooling

2017-11-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D38708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39730: Enabling constructor code completion

2017-11-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. This approach doesn't look right. We don't want to code-complete constructors after the `.`. Instead we want to complete the constructors/destructors in bodies of classes and in out-of-line declarations after `~`, right? https://reviews.llvm.org/D39730

[PATCH] D39751: [libc++] Add _LIBCPP_INLINE_VISIBILITY to __compressed_pair_elem members

2017-11-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. The commit r300140 changed the implementation of __compressed_pair, but didn't add _LIBCPP_INLINE_VISIBILITY to the constructors and `get` members of the __compressed_pair_elem class. This patch adds the visibility annotation. I'm not sure how to test this (and i

[PATCH] D39762: [ObjC] Boxed strings should use the nullability from stringWithUTF8String's return type

2017-11-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Objective-C NSString has a class method `stringWithUTF8String` that creates a new NSString from a C string. Objective-C box expression `@(...)` can be used to create an NSString instead of invoking the `stringWithUTF8String` method directly (The compiler lowers i

[PATCH] D39332: [clang-refactor] Introduce a new rename rule for qualified symbols

2017-11-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D39332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D39762: [ObjC] Boxed strings should use the nullability from stringWithUTF8String's return type

2017-11-08 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317727: [ObjC] Boxed strings should use the nullability from stringWithUTF8String's… (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D39762?vs=121982&id=122148#toc Repository:

[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I would prefer to make this behaviour configurable. https://reviews.llvm.org/D39836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39751: [libc++] Add _LIBCPP_INLINE_VISIBILITY to __compressed_pair_elem members

2017-11-09 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317816: Add _LIBCPP_INLINE_VISIBILITY to __compressed_pair_elem members (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D39751?vs=121939&id=122261#toc Repository: rL LLVM h

[PATCH] D39706: [refactor][extract] Initial implementation of variable captures

2017-11-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.cpp:36 + return true; +// FIXME: Capture 'self'. +if (!VD->isLocalVarDeclOrParm()) ioeric wrote: > and `this`? This is a different kind of expression that wo

[PATCH] D39706: [refactor][extract] Initial implementation of variable captures

2017-11-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 122270. arphaman marked 5 inline comments as done. arphaman added a comment. Address review comments Repository: rL LLVM https://reviews.llvm.org/D39706 Files: lib/Tooling/Refactoring/CMakeLists.txt lib/Tooling/Refactoring/Extract/CaptureVariables.c

[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)

2017-11-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D39836#920587, @sammccall wrote: > So I probably should have started from the other end, here :-) > > I'd really like to make the completion retrieval and ranking more flexible. > In particular > > - incorporating results from other sources (

[PATCH] D39730: Enabling constructor code completion

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It doesn't look like this works in the body of the class (at least there's no test for it). For that you might have to inject these kind results by performing another lookup when completing inside the body of the class. Comment at: lib/Sema/SemaCodeC

[PATCH] D39730: Enabling constructor code completion

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Also, Comment at: lib/Sema/SemaCodeComplete.cpp:980 + if (isa(R.Declaration) + && dyn_cast(CurContext) == nullptr + && dyn_cast(CurContext) == nullptr arphaman wrote: > You can use `!isa` Have you checked if this check works

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: javed.absar. This patch extends the -Wavailability warning to warn about cases where a method declaration is missing an availability attribute clause that's present in the method's definition. We also warn about missing `deprecated` attr

[PATCH] D39446: [PGO] Detect more structural changes with the stable hash

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Generally it LG Comment at: lib/CodeGen/CodeGenPGO.cpp:244 + DEFINE_NESTABLE_TRAVERSAL(CXXTryStmt) + DEFINE_NESTABLE_TRAVERSAL(CXXCatchStmt) + What about `ObjCAtTryStmt`? Comment at: lib/CodeGen/CodeGenPGO.cpp:321

[PATCH] D39446: [PGO] Detect more structural changes with the stable hash

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. ok, sgtm https://reviews.llvm.org/D39446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D36790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39706: [refactor][extract] Initial implementation of variable captures

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 122565. arphaman marked 3 inline comments as done. arphaman added a comment. Address review comments Repository: rL LLVM https://reviews.llvm.org/D39706 Files: lib/Tooling/Refactoring/CMakeLists.txt lib/Tooling/Refactoring/Extract/CaptureVariables.c

[PATCH] D39706: [refactor][extract] Initial implementation of variable captures

2017-11-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.h:36 + explicit CapturedExtractedEntity(const VarDecl *VD) + : Kind(CapturedVarDecl), VD(VD) {} + ioeric wrote: > arphaman wrote: > > ioeric wrote: > > > Maybe a `F

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 122740. arphaman added a comment. - formatting - simplify checks - support c++ Repository: rL LLVM https://reviews.llvm.org/D39913 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDec

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:2300 + }; + + llvm::SmallPtrSet MissingPlatformAttributes; erik.pilkington wrote: > I hate to rewrite your function, but have you considered just doing the > second loop over the attrs inlin

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D39913#924131, @ahatanak wrote: > Is it not necessary to print a diagnostic when a non-member function > declaration is missing an availability attribute? > > void foo1(); > > __attribute__((availability(macos, introduced=10.1))) > vo

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 122949. arphaman added a comment. Remove C++ support for now (it will be in a followup patch along with non-member function support). Repository: rL LLVM https://reviews.llvm.org/D39913 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clan

[PATCH] D39730: Enabling constructor code completion

2017-11-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D39730#926108, @jkorous-apple wrote: > Sorry, what do you mean by "this works in the body of the class"? > > Definition of constructor inside class definition has been working even > before: > > struct foo { > foo(); > f > }; >

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2017-11-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for the patch! Comment at: lib/Frontend/ASTUnit.cpp:541 +// language. +PP.getIdentifierTable().AddKeywords(LangOpt); + Have you tried adding the keywords in `PP.Initialize`? We might not need an additional parameter to

[PATCH] D40141: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles

2017-11-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch ensures that -Warc-retain-cycles doesn't warn about captures in blocks that are passed into parameters that have a `noescape` attribute. Repository: rL LLVM https://reviews.llvm.org/D40141 Files: lib/Sema/SemaChecking.cpp test/SemaObjC/warn-ret

[PATCH] D40141: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles

2017-11-17 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL318552: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D40141?vs=123211

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. How is this attribute going to handle a trampoline that performs a virtual dispatch from C++ call into Swift? In that case, the target is not known. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146595/new/ https://review

[PATCH] D148266: [clang][driver] Linking to just-built libc++.dylib when bootstrapping libc++ with clang

2023-05-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:431 + // libc++.dylib in the toolchain. + if ((!Args.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc, +options::OPT_nostdincxx)) && ldionne wrote: > Th

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-02-23 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc8b37e48f6f0: [clang] extend external_source_symbol attribute with USR clause (authored by arphaman). Herald added a project: clang. Changed prior t

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-12-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping @mizvekov. Unfortunately I'm unable to revert this commit now so we won't be able to get the bot back to green until it's fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131858/new/ https://reviews.llvm.org/D13

[PATCH] D139938: [clang] Don't spuriously pass -stdlib=libc++ to CC1 on Darwin

2022-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Great, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139938/new/ https://reviews.llvm.org/D139938 __

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D27163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 81584. arphaman marked 3 inline comments as done. arphaman added a comment. The updated patch removes the dependency on the "-Wreturn-type" diagnostic and verifies that functions that return a type with a non-trivial default constructor are always optimized

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Sema/AnalysisBasedWarnings.h:93 - void IssueWarnings(Policy P, FunctionScopeInfo *fscope, - const Decl *D, const BlockExpr *blkExpr); + void IssueWarnings(Policy P, FunctionScopeInfo *fscope, Decl *

[PATCH] D27837: Add fix-it notes to the nullability consistency warning

2016-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaType.cpp:3491 +/// taking into account whitespace before and after. +static FixItHint fixItNullability(Sema &S, SourceLocation pointerLoc, + NullabilityKind nullability) { N

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2016-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I don't think that generating calls to `dispatch_once` and `Gestalt` is the right approach. Swift generates a call to `_stdlib_isOSVersionAtLeast`, so maybe we could add some function like that into compiler-rt? `Gestalt` is also deprecated, we should use something bet

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D27163#623811, @majnemer wrote: > My 2 cents: If making this a target-specific default is not OK, why not turn > on -fno-strict-return if -fapple-kext is specified? I believe that would > cover the critical use case in question. We've had

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:1078 + QualType T = FD->getReturnType(); + if (T.isTriviallyCopyableType(Context)) { +// Avoid the optimization for functions that return trivially copyable rjmccall wrote: > arpham

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Driver/Options.td:1324 + HelpText<"Use C++ undefined behaviour optimization for control flow paths" + "that reach the end of the function without executing a required return">; +def fno_strict_return : Flag<["-"], "fn

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2016-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D27827#625438, @erik.pilkington wrote: > I seem to remember that mapping from kernel versions to marketing versions > was tossed around as a potential alternative to Gestalt. I think that the > problem was Apple sometimes introduces (or rese

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. This looks good to me. It would be nice if we could get rid of the 2nd `expected expression` error in `auto s0 = S1{[name=]() {}};`, but it can be done later. https://reviews.llvm.org/D2

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2016-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 81950. arphaman marked an inline comment as done. arphaman added a comment. The updated patch renames the attribute to `loads_format_specifier_value_using_key` and addresses Aaron's comments Repository: rL LLVM https://reviews.llvm.org/D27165 Files:

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2016-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Basic/Attr.td:862 +def FormatDynamicKeyArg : InheritableAttr { + let Spellings = [GCC<"format_dynamic_key_arg">]; + let Args = [IntArgument<"FormatIdx">]; aaron.ballman wrote: > Does GCC support this att

[PATCH] D27165: Add format_dynamic_key_arg attribute to improve "-Wformat" warnings for functions that load the formatting string dynamically based on a key value

2016-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 81952. arphaman added a comment. Update to fix a test failure. Repository: rL LLVM https://reviews.llvm.org/D27165 Files: include/clang/Analysis/Analyses/FormatString.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/Analysis/Pri

[PATCH] D27039: [CodeCompletion] Autocomplete NS_DESIGNATED_INITIALIZER in initializers with arguments

2017-01-03 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290879: [CodeCompletion] Autocomplete NS_DESIGNATED_INITIALIZER in initializers (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D27039?vs=79049&id=82863#toc Repository: rL L

[PATCH] D26964: Handle more declarations in DeclContextPrinter to fix -print-decl-contexts crashes

2017-01-03 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290880: Handle FriendDecl in DeclContextPrinter (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D26964?vs=78848&id=82864#toc Repository: rL LLVM https://reviews.llvm.org/D2

[PATCH] D26034: [CodeCompletion] Block property setters: Use dynamic priority heuristic

2017-01-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a reviewer: manmanren. arphaman updated this revision to Diff 82866. arphaman added a comment. I've rebased the patch Repository: rL LLVM https://reviews.llvm.org/D26034 Files: lib/Sema/SemaCodeComplete.cpp test/Index/complete-block-property-assignment.m Index: test/Inde

[PATCH] D28231: -Wunreachable-code: Avoid multiple diagnostics that are triggered by the same source range and fix the unary operator fixit source range

2017-01-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: rsmith, bruno, ahatanak. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch fixes an issue with -Wunreachable-code diagnostic that happens with the following code sample: struc

[PATCH] D28286: [CodeCompletion] Code complete the missing C++11 keywords

2017-01-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: manmanren, akyrtzi. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch adds context sensitive code completion support for the C++11 keywords that currently don't have completion r

[PATCH] D28231: -Wunreachable-code: Avoid multiple diagnostics that are triggered by the same source range and fix the unary operator fixit source range

2017-01-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 83032. arphaman added a comment. You're right, the fixit for `if (!s->p || 1)` is wrong, but that was another existing bug. The updated patch fixes this issue. Repository: rL LLVM https://reviews.llvm.org/D28231 Files: lib/Analysis/ReachableCode.cpp

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2017-01-04 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked 5 inline comments as done. Closed by commit rL290960: Add -f[no-]strict-return flag that can be used to avoid undefined behaviour (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D27478: Make ASTContext::getDeclAlign return the correct alignment for FunctionDecls

2017-01-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a reviewer: arphaman. arphaman added a comment. This revision is now accepted and ready to land. Thanks. LGTM, I think the patch makes sense. https://reviews.llvm.org/D27478 ___ cfe-commits mailing lis

[PATCH] D28296: [ObjC] The declarator for a block literal should be a definition

2017-01-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: bruno, ahatanak. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This avoids the -Wstrict-prototypes warning for block literals with an empty or without argument lists. Repository: rL

[PATCH] D28349: [Frontend] The macro that describes the Objective-C bool type should be defined in C as well

2017-01-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: doug.gregor, t.p.northover. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch defines __OBJC_BOOL_IS_BOOL for C code as well, since Objective-C's BOOL can be also used by C code.

[PATCH] D28350: [Sema] Avoid -Wshadow warning when a "redefinition of " error is presented

2017-01-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: rsmith, rnk, bruno. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch ensures that clang avoids the redundant -Wshadow warning for variables that already get a "redefinition of "

[PATCH] D28349: [Frontend] The macro that describes the Objective-C bool type should be defined in C as well

2017-01-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 83354. arphaman added a comment. Set the macro unconditionally. Repository: rL LLVM https://reviews.llvm.org/D28349 Files: lib/Frontend/InitPreprocessor.cpp test/Frontend/objc-bool-is-bool.m Index: test/Frontend/objc-bool-is-bool.m ===

[PATCH] D28349: [Frontend] The macro that describes the Objective-C bool type should be defined in C as well

2017-01-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D28349#636968, @doug.gregor wrote: > The "!LangOpts.CPlusPlus" doesn't make sense to me. You're presumably > defining this macro in C because the Objective-C runtime is usable from C, > but that same logic applies to C++ code. It seems like

[PATCH] D28296: [ObjC] The declarator for a block literal should be a definition

2017-01-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291231: [ObjC] The declarator for a block literal should be a definition (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D28296?vs=83061&id=83355#toc Repository: rL LLVM ht

[PATCH] D26034: [CodeCompletion] Block property setters: Use dynamic priority heuristic

2017-01-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291232: [CodeCompletion] Block property setters: Use dynamic priority heuristic (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D26034?vs=82866&id=83356#toc Repository: rL L

[PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/SemaCXX/uninitialized.cpp:1437 } else { -[fname]{}; +[fname] { (void)fname; }; // expected-warning {{lambda capture 'fname' is not used}} } I think that expected-warning shouldn't be used here as you

[PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I think that the patch would be neater if you add "-Wno-unused-lambda-capture" to the options for all of the tests that are modified by this patch in the CXX/ directory. This would avoid redundant `(void)` uses and ensure that the `(void)` uses won't interfere with the

[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: manmanren, ahatanak, akyrtzi. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch fixes an issue where cached global code completion results for a `using` declaration included the

[PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Sema/ScopeInfo.h:457 +/// lambda. +bool Used = false; + malcolm.parsons wrote: > Should this be moved into one of the `PointerIntPair`s? I'm not sure.. If we needed other capturing information in t

[PATCH] D28350: [Sema] Avoid -Wshadow warning when a "redefinition of " error is presented

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291564: [Sema] Avoid -Wshadow warning when a "redefinition of " error is presented (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D28350?vs=83214&id=83806#toc Repository: r

[PATCH] D28231: -Wunreachable-code: Avoid multiple diagnostics that are triggered by the same source range and fix the unary operator fixit source range

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 83819. arphaman added a comment. Fix more issues with FIXIT for unary operators. Repository: rL LLVM https://reviews.llvm.org/D28231 Files: lib/Analysis/ReachableCode.cpp lib/Sema/AnalysisBasedWarnings.cpp test/Sema/warn-unreachable.c Index: test

[PATCH] D28231: -Wunreachable-code: Avoid multiple diagnostics that are triggered by the same source range and fix the unary operator fixit source range

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Analysis/ReachableCode.cpp:229 + if (SilenceableCondValNotSet && SilenceableCondVal->getBegin().isValid()) +*SilenceableCondVal = UO->getSourceRange(); + return UO->getOpcode() == UO_LNot && IsSubExprConfigValue; -

[PATCH] D25213: Fix PR28181: Prevent operator overloading related assertion failure crash that happens in C only

2017-01-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 83822. arphaman added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D25213 Files: lib/Sema/SemaExpr.cpp test/Sema/PR28181.c Index: test/Sema/PR28181.c === --- /dev/null

[PATCH] D27257: [CodeCompletion] Ensure that ObjC root class completes instance methods from protocols and categories as well

2017-01-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D27257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    6   7   8   9   10   11   12   13   14   15   >