[clang] Support MemProf on darwin (PR #69640)

2023-10-24 Thread Manman Ren via cfe-commits
https://github.com/manman-ren edited https://github.com/llvm/llvm-project/pull/69640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support VFE in thinLTO (PR #69735)

2023-10-20 Thread Manman Ren via cfe-commits
https://github.com/manman-ren updated https://github.com/llvm/llvm-project/pull/69735 >From 1adce63e663203f858de86cfa231527ee2284505 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Thu, 5 Oct 2023 10:56:53 -0700 Subject: [PATCH] Support VFE in thinLTO We add a run of GlobalDCEPass with

[clang] Support VFE in thinLTO (PR #69735)

2023-10-20 Thread Manman Ren via cfe-commits
https://github.com/manman-ren created https://github.com/llvm/llvm-project/pull/69735 We add a run of GlobalDCEPass with ImportSummary. When ImportSummary is true, we remove virtual functions in vtables with VCallVisibility not Public. In this run, the regular

[clang] Support MemProf on darwin (PR #69640)

2023-10-19 Thread Manman Ren via cfe-commits
https://github.com/manman-ren created https://github.com/llvm/llvm-project/pull/69640 None >From 86dc0db55bf6aa629639b1beac5c2cf5f39177ec Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Tue, 10 Oct 2023 20:54:07 -0700 Subject: [PATCH 1/2] memprof support on Darwin ---

[clang-tools-extra] Port Swift's merge function pass to llvm: merging functions that differ in constants (PR #68235)

2023-10-17 Thread Manman Ren via cfe-commits
https://github.com/manman-ren updated https://github.com/llvm/llvm-project/pull/68235 >From 7e422cecbd5fc28fb0ec699b702d6bccf321f93f Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 2 Oct 2023 11:16:58 -0700 Subject: [PATCH] Preliminary patch for merging functions that differ in constants

r292639 - Revert r292508 given that we intend to remove driver options for cxx modules.

2017-01-20 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Jan 20 14:03:00 2017 New Revision: 292639 URL: http://llvm.org/viewvc/llvm-project?rev=292639=rev Log: Revert r292508 given that we intend to remove driver options for cxx modules. Removed: cfe/trunk/test/Modules/check-syntax.mm Modified:

Re: r292508 - Module: Improve diagnostic message when cxx modules are disabled and @import is used in Objective CXX.

2017-01-20 Thread Manman Ren via cfe-commits
On Thu, Jan 19, 2017 at 1:27 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On 19 Jan 2017 11:16 am, "Manman Ren via cfe-commits" < > cfe-commits@lists.llvm.org> wrote: > > Author: mren > Date: Thu Jan 19 13:05:55 2017 > New Revision: 292508 > >

r292508 - Module: Improve diagnostic message when cxx modules are disabled and @import is used in Objective CXX.

2017-01-19 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Jan 19 13:05:55 2017 New Revision: 292508 URL: http://llvm.org/viewvc/llvm-project?rev=292508=rev Log: Module: Improve diagnostic message when cxx modules are disabled and @import is used in Objective CXX. rdar://problem/19399671 Added:

r291689 - Module: Do not add any link flags when an implementation TU of a module imports

2017-01-11 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Jan 11 12:47:38 2017 New Revision: 291689 URL: http://llvm.org/viewvc/llvm-project?rev=291689=rev Log: Module: Do not add any link flags when an implementation TU of a module imports a header of that same module. This fixes a regression caused by r280409.

r291688 - This reverts r291628. As suggested by Richard, we can simply

2017-01-11 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Jan 11 12:32:30 2017 New Revision: 291688 URL: http://llvm.org/viewvc/llvm-project?rev=291688=rev Log: This reverts r291628. As suggested by Richard, we can simply filter out the implicilty imported modules at CodeGen instead of removing the implicit ImportDecl when an

Re: r291628 - Module: Do not create Implicit ImportDecl for module X if we

2017-01-10 Thread Manman Ren via cfe-commits
On Tue, Jan 10, 2017 at 5:59 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On 10 January 2017 at 17:57, Richard Smith <rich...@metafoo.co.uk> wrote: > >> On 10 January 2017 at 16:48, Manman Ren via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >

r291628 - Module: Do not create Implicit ImportDecl for module X if we

2017-01-10 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Jan 10 18:48:19 2017 New Revision: 291628 URL: http://llvm.org/viewvc/llvm-project?rev=291628=rev Log: Module: Do not create Implicit ImportDecl for module X if we are building an implemenation of module X. This fixes a regression caused by r280409.

r291465 - PCH: fix a regression that reports a module is defined in both pch and pcm.

2017-01-09 Thread Manman Ren via cfe-commits
Author: mren Date: Mon Jan 9 13:20:18 2017 New Revision: 291465 URL: http://llvm.org/viewvc/llvm-project?rev=291465=rev Log: PCH: fix a regression that reports a module is defined in both pch and pcm. In r276159, we started to say that a module X is defined in a pch if we specify -fmodule-name

r287244 - ObjC Module: try to make objc module deterministic.

2016-11-17 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Nov 17 12:41:18 2016 New Revision: 287244 URL: http://llvm.org/viewvc/llvm-project?rev=287244=rev Log: ObjC Module: try to make objc module deterministic. Make sure that comparing selectors in DeclarationName does its job. rdar://problem/28988750 Added:

[PATCH] D26503: [Parser][ObjC] Improve diagnostics and recovery when C++ keywords are used as identifiers in Objective-C++

2016-11-15 Thread Manman Ren via cfe-commits
manmanren added a comment. Cheers, Manman Comment at: include/clang/Basic/DiagnosticParseKinds.td:442 +/// Objective-C++ parser diagnostics +def err_expected_objcxx_keyword : Error< + "expected %0; %1 is a keyword in Objective-C++">; This name is a little

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-11-14 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D25916#594844, @benlangmuir wrote: > > Does it mean that a system module should only import system modules? If a > > system module is allowed to import non-system modules, for a non-system > > module, we will validate diagnostic options

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-11-14 Thread Manman Ren via cfe-commits
manmanren added a comment. @ Ben, We are hitting this issue when building large projects, but the reproducibility is quite low. This proposed patch is currently a little too complicated. I am thinking about just fixing the testing case for now, and adding the check later when we start to

[PATCH] D26071: [CodeCompletion] Show block invocation result for block property setters

2016-11-08 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman Repository: rL LLVM https://reviews.llvm.org/D26071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25993: [Objective-C] Add objc_subclassing_restricted attribute

2016-10-26 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a reviewer: manmanren. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman Repository: rL LLVM https://reviews.llvm.org/D25993 ___ cfe-commits mailing list

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-10-24 Thread Manman Ren via cfe-commits
manmanren added a comment. In this testing case, the first clang invocation builds a system module X and a non-system module Y (X imports Y). At the second clang invocation, the parent thread validates the existing module X and module Y. Because X is a system module, we don't diagnose the

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-10-24 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: benlangmuir, rsmith. manmanren added a subscriber: cfe-commits. With implicit modules, it is hard to debug issues that depend on state of the module cache before the clang invocation. The state of the module cache can be changed by

r284899 - Module: correctly set the module file kind when emitting file_modified.

2016-10-21 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Oct 21 18:35:03 2016 New Revision: 284899 URL: http://llvm.org/viewvc/llvm-project?rev=284899=rev Log: Module: correctly set the module file kind when emitting file_modified. rdar://28503343 Differential Revision: http://reviews.llvm.org/D25806 Added:

r284897 - Module: improve the diagnostic message for include of non-modular header.

2016-10-21 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Oct 21 18:27:37 2016 New Revision: 284897 URL: http://llvm.org/viewvc/llvm-project?rev=284897=rev Log: Module: improve the diagnostic message for include of non-modular header. Emit the actual path to the non-modular include. rdar://28897010 Modified:

[PATCH] D25806: Module: correctly set the module file kind when emitting diagnostics for file_modified

2016-10-20 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 75326. manmanren added a comment. Thanks Richard for the testing case. It is also obvious from the testing case that we can have another diagnostic in flight when emitting err_fe_pch_file_modified. https://reviews.llvm.org/D25806 Files:

[PATCH] D25806: Module: correctly set the module file kind when emitting diagnostics for file_modified

2016-10-19 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: bruno, rsmith, benlangmuir. manmanren added a subscriber: cfe-commits. I don't quite like the if statement in the patch, but given that ASTReader::Error and DelayedDiagnostic only take strings, it is hard to just change

[PATCH] D25777: [Sema][TreeTransform] Re-create DesignatedInitExpr when it has a field designator with a valid FieldDecl

2016-10-19 Thread Manman Ren via cfe-commits
manmanren added a comment. It makes sense to rebuild the expression when a field designator stores a FieldDecl. Thanks for working on this! Manman Comment at: lib/Sema/TreeTransform.h:8926 D.getFieldLoc())); + if

[PATCH] D22638: Module: add debug_type to dump debugging messages related to modules being out of date

2016-10-18 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks a lot for the pointers! I will definitely try them. What I proposed here is something similar to what llvm does that dumps logging messages, it should be complementary to your debugging aids. Manman In https://reviews.llvm.org/D22638#572753, @v.g.vassilev

[PATCH] D25678: [modules] Do not report missing definitions of demoted constexpr variable templates.This is a followup to regression introduced in r284284.This should fix our libstdc++ modules builds.

2016-10-17 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10129 +!Var->isThisDeclarationADemotedDefinition()) { + assert(Var->isThisDeclarationADemotedDefinition() && getLangOpts().Modules + && "Demoting decls is only in the contest of

[PATCH] D25284: AvailabilityAttrs: Delay partial availability diagnostics

2016-10-17 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. This is better than what I asked for :] Manman https://reviews.llvm.org/D25284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25519: [CodeCompletion] Refactor: Extract two Objective-C block formatting related functions from FormatFunctionParameter

2016-10-14 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman Repository: rL LLVM https://reviews.llvm.org/D25519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r284263 - Module: emit initializers in submodules when importing the parent module.

2016-10-14 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Oct 14 13:55:44 2016 New Revision: 284263 URL: http://llvm.org/viewvc/llvm-project?rev=284263=rev Log: Module: emit initializers in submodules when importing the parent module. When importing the parent module, module initializers in submodules should be emitted.

r284142 - Module: emit initializers for C/ObjC after r276159.

2016-10-13 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Oct 13 13:42:14 2016 New Revision: 284142 URL: http://llvm.org/viewvc/llvm-project?rev=284142=rev Log: Module: emit initializers for C/ObjC after r276159. In r276159, we started to defer emitting initializers for VarDecls, but forgot to add the initializers for non-C++

[PATCH] D25519: [CodeCompletion] Refactor: Extract two Objective-C block formatting related functions from FormatFunctionParameter

2016-10-12 Thread Manman Ren via cfe-commits
manmanren added a comment. Cheers, Manman Comment at: lib/Sema/SemaCodeComplete.cpp:2165 +static void findTypeLocationForBlockDecl(const TypeSourceInfo *TSInfo, + FunctionTypeLoc , Please add comments for the helper

r283943 - Module: for ObjectiveC, be consistent when checking hidden decls.

2016-10-11 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Oct 11 16:18:20 2016 New Revision: 283943 URL: http://llvm.org/viewvc/llvm-project?rev=283943=rev Log: Module: for ObjectiveC, be consistent when checking hidden decls. In MatchAllMethodDeclarations, when checking a hidden decl, be sure to allow hidden when searching for

[PATCH] D25436: [CodeCompletion] Improve completion for properties declared in Objective-C protocols

2016-10-11 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman Repository: rL LLVM https://reviews.llvm.org/D25436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25284: AvailabilityAttrs: Delay partial availability diagnostics

2016-10-10 Thread Manman Ren via cfe-commits
manmanren added a comment. Nice cleanup! Thanks for working on this, Manman Comment at: include/clang/Sema/DelayedDiagnostic.h:232 union { /// Deprecation struct DD DeprecationData; Can you update this comment now we have generalized this to

[PATCH] D25283: AvailabilityAttrs: Refactor context checking when diagnosing an availability violation

2016-10-10 Thread Manman Ren via cfe-commits
manmanren added a comment. This is a nice cleanup! Manman Comment at: lib/Sema/SemaDeclAttr.cpp:6348 + + auto IsContextGreater = [&](const Decl *C) { +if (K == AR_NotYetIntroduced) { Can you add a comment for the lambda? Comment at:

[PATCH] D25436: [CodeCompletion] Improve completion for properties declared in Objective-C protocols

2016-10-10 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks for working on this! Manman Comment at: lib/Sema/SemaCodeComplete.cpp:3723 } } else if (!IsArrow && BaseType->getAsObjCInterfacePointerType()) { // Objective-C property reference. I feel like the added logic

r283145 - ObjectiveC: fix a seg fault when deserialing redeclaration of ObjCMethodDecl.

2016-10-03 Thread Manman Ren via cfe-commits
Author: mren Date: Mon Oct 3 16:26:46 2016 New Revision: 283145 URL: http://llvm.org/viewvc/llvm-project?rev=283145=rev Log: ObjectiveC: fix a seg fault when deserialing redeclaration of ObjCMethodDecl. The deserialization of redeclartion can cause seg fault since getCanonicalDecl of the

r281404 - ObjectiveC Generics: follow-up commit to r281355.

2016-09-13 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Sep 13 16:57:28 2016 New Revision: 281404 URL: http://llvm.org/viewvc/llvm-project?rev=281404=rev Log: ObjectiveC Generics: follow-up commit to r281355. Correct getExtraLocalDataSize for ObjCTypeParamTypeLoc. rdar://24619481 rdar://25060179 Modified:

r281358 - ObjectiveC Generics: Start using ObjCTypeParamType.

2016-09-13 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Sep 13 12:41:05 2016 New Revision: 281358 URL: http://llvm.org/viewvc/llvm-project?rev=281358=rev Log: ObjectiveC Generics: Start using ObjCTypeParamType. For ObjC type parameter, we used to have TypedefType that is canonicalized to id or the bound type. We can't represent

r281355 - ObjectiveC generics: Add ObjCTypeParamType in the type system.

2016-09-13 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Sep 13 12:25:08 2016 New Revision: 281355 URL: http://llvm.org/viewvc/llvm-project?rev=281355=rev Log: ObjectiveC generics: Add ObjCTypeParamType in the type system. We also need to add ObjCTypeParamTypeLoc. ObjCTypeParamType supports the representation of "T " where T is

r281353 - ObjectiveC: Refactor applyObjCProtocolQualifiers.

2016-09-13 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Sep 13 12:03:12 2016 New Revision: 281353 URL: http://llvm.org/viewvc/llvm-project?rev=281353=rev Log: ObjectiveC: Refactor applyObjCProtocolQualifiers. To construct the canonical type of ObjCTypeParamType, we need to apply qualifiers on ObjCObjectPointerType. The updated

r281351 - Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.

2016-09-13 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Sep 13 11:45:29 2016 New Revision: 281351 URL: http://llvm.org/viewvc/llvm-project?rev=281351=rev Log: Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list. Now ObjCObjectType extends from ObjCProtocolQualifiers. We save number of protocols in

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-09 Thread Manman Ren via cfe-commits
Committed r281119. Let me know if you see any problem. Cheers, Manman On Fri, Sep 9, 2016 at 12:07 PM, Manman Ren <manman@gmail.com> wrote: > > > On Fri, Sep 9, 2016 at 11:33 AM, Richard Smith <rich...@metafoo.co.uk> > wrote: > >> On Fri, Sep 9, 2016 at 11:

r281119 - Modules: for ObjectiveC try to keep the definition invariant.

2016-09-09 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Sep 9 18:48:27 2016 New Revision: 281119 URL: http://llvm.org/viewvc/llvm-project?rev=281119=rev Log: Modules: for ObjectiveC try to keep the definition invariant. When deserializing ObjCInterfaceDecl with definition data, if we already have a definition, try to keep the

Re: [PATCH] D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3)

2016-09-09 Thread Manman Ren via cfe-commits
manmanren added a comment. Hi Doug, Can you take a look at the updated version? Thanks, Manman https://reviews.llvm.org/D23079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r281078 - Modules: revert r280728.

2016-09-09 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Sep 9 14:03:07 2016 New Revision: 281078 URL: http://llvm.org/viewvc/llvm-project?rev=281078=rev Log: Modules: revert r280728. In post-commit review, Richard suggested a better way to fix this. rdar://27926200 Removed: cfe/trunk/test/Modules/Inputs/lookup-assert/

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-09 Thread Manman Ren via cfe-commits
On Fri, Sep 9, 2016 at 11:33 AM, Richard Smith <rich...@metafoo.co.uk> wrote: > On Fri, Sep 9, 2016 at 11:29 AM, Manman Ren via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Wed, Sep 7, 2016 at 4:44 PM, Richard Smith <rich...@metafoo.co.uk> >>

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-09 Thread Manman Ren via cfe-commits
On Wed, Sep 7, 2016 at 4:44 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On Wed, Sep 7, 2016 at 12:45 PM, Manman Ren <manman@gmail.com> wrote: > >> On Tue, Sep 6, 2016 at 6:54 PM, Richard Smith <rich...@metafoo.co.uk> >> wrote: >> >>>

Re: r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-07 Thread Manman Ren via cfe-commits
On Tue, Sep 6, 2016 at 6:54 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On Tue, Sep 6, 2016 at 11:16 AM, Manman Ren via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: mren >> Date: Tue Sep 6 13:16:54 2016 >> New Revision: 280728

r280728 - Modules: Fix an assertion in DeclContext::buildLookup.

2016-09-06 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Sep 6 13:16:54 2016 New Revision: 280728 URL: http://llvm.org/viewvc/llvm-project?rev=280728=rev Log: Modules: Fix an assertion in DeclContext::buildLookup. When calling getMostRecentDecl, we can pull in more definitions from a module. We call getPrimaryContext afterwards

[PATCH] D24059: NFC: refactor applyObjCProtocolQualifiers from SemaType.cpp to ASTContext so it can be shared.

2016-08-30 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: doug.gregor. manmanren added a subscriber: cfe-commits. To construct the canonical type of ObjCTypeParamType, we need to apply qualifiers on ObjCObjectPointerType. The updated applyObjCProtocolQualifiers handles this case by merging

Re: [PATCH] D23080: ObjC: Use a new type for ObjC type parameter (patch 3 out of 3)

2016-08-30 Thread Manman Ren via cfe-commits
manmanren updated the summary for this revision. manmanren updated this revision to Diff 69765. manmanren added a comment. This patch is now much simpler with the updated version of https://reviews.llvm.org/D23079. https://reviews.llvm.org/D23080 Files: lib/AST/ASTContext.cpp

Re: [PATCH] D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3)

2016-08-30 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 69764. manmanren added a comment. Address Doug's comment. ObjCTypeParamType is a non-canonical type now, it is canonicalized to the underlying type with protocol qualifiers. https://reviews.llvm.org/D23079 Files: include/clang/AST/ASTContext.h

r279838 - Don't diagnose non-modular includes when we are not compiling a module.

2016-08-26 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Aug 26 12:16:46 2016 New Revision: 279838 URL: http://llvm.org/viewvc/llvm-project?rev=279838=rev Log: Don't diagnose non-modular includes when we are not compiling a module. This is triggered when we are compiling an implementation of a module, it has relative includes to

Re: [PATCH] D23858: Don't diagnose non-modular includes when we are not compiling a module

2016-08-25 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D23858#525647, @rsmith wrote: > It seems to me like this is papering over an issue rather than fixing it. I guess that is why we introduced fmodule-implementation-of, to work around issues like "relative includes to a VFS-mapped module".

[PATCH] D23858: Don't diagnose non-modular includes when we are not compiling a module

2016-08-24 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: rsmith, benlangmuir. manmanren added a subscriber: cfe-commits. We used to have -fmodule-implementation-of and it was merged with -fmodule-name. But this causes some regression on our internal projects. We are now seeing non-modular

r279358 - Revert r279351 and r279357 due to bot failures

2016-08-19 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Aug 19 22:00:54 2016 New Revision: 279358 URL: http://llvm.org/viewvc/llvm-project?rev=279358=rev Log: Revert r279351 and r279357 due to bot failures Modified: cfe/trunk/include/clang/AST/Type.h cfe/trunk/lib/AST/Type.cpp Modified:

r279357 - Fix windows bot

2016-08-19 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Aug 19 21:28:15 2016 New Revision: 279357 URL: http://llvm.org/viewvc/llvm-project?rev=279357=rev Log: Fix windows bot Modified: cfe/trunk/include/clang/AST/Type.h Modified: cfe/trunk/include/clang/AST/Type.h URL:

Re: [PATCH] D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3)

2016-08-19 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks for reviewing! Manman Comment at: include/clang/AST/RecursiveASTVisitor.h:1037 @@ -1036,1 +1036,3 @@ +DEF_TRAVERSE_TYPE(ObjCTypeParamType, {}) + doug.gregor wrote: > I'm sorta shocked that we don't visit the protocol

Re: [PATCH] D23080: ObjC: Use a new type for ObjC type parameter (patch 3 out of 3)

2016-08-19 Thread Manman Ren via cfe-commits
manmanren added a comment. I will update this patch once the 2nd patch is done. Thanks for reviewing, Manman Comment at: lib/AST/Type.cpp:1095 @@ +1094,3 @@ +return ctx.getQualifiedType(argType, splitType.Quals); + // Apply protocol lists if exists. Should

r279351 - [NFC] Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.

2016-08-19 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Aug 19 19:04:21 2016 New Revision: 279351 URL: http://llvm.org/viewvc/llvm-project?rev=279351=rev Log: [NFC] Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list. This is in preparation of adding a new type class ObjCTypeParamType that can take protocol

r279096 - Module: add -fprebuilt-module-path to support loading prebuilt modules.

2016-08-18 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Aug 18 12:42:15 2016 New Revision: 279096 URL: http://llvm.org/viewvc/llvm-project?rev=279096=rev Log: Module: add -fprebuilt-module-path to support loading prebuilt modules. In this mode, there is no need to load any module map and the programmer can simply use "@import"

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:1503 @@ +1502,3 @@ +if (!Module || !Module->getASTFile() || +std::string(Module->getASTFile()->getName()) != ModuleFileName) { + // Error out if Module does not refer to

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Manman Ren via cfe-commits
manmanren added a comment. Cheers, Manman Comment at: lib/Frontend/CompilerInstance.cpp:1502 @@ +1501,3 @@ +Module = PP->getHeaderSearchInfo().lookupModule(ModuleName); +if (!Module || !Module->getASTFile() || +

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 68456. https://reviews.llvm.org/D23125 Files: docs/Modules.rst include/clang/Basic/DiagnosticCommonKinds.td include/clang/Driver/Options.td include/clang/Lex/HeaderSearch.h include/clang/Lex/HeaderSearchOptions.h

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks, Manman Comment at: lib/Frontend/CompilerInstance.cpp:1502 @@ +1501,3 @@ +Module = PP->getHeaderSearchInfo().lookupModule(ModuleName); +if (!Module) { + getDiagnostics().Report(ModuleNameLoc, diag::err_module_prebuilt)

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-17 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 68442. https://reviews.llvm.org/D23125 Files: docs/Modules.rst include/clang/Basic/DiagnosticCommonKinds.td include/clang/Driver/Options.td include/clang/Lex/HeaderSearch.h include/clang/Lex/HeaderSearchOptions.h

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-16 Thread Manman Ren via cfe-commits
manmanren added a comment. Richard, Are you okay with the patch now? Thanks, Manman https://reviews.llvm.org/D23125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22929: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl

2016-08-16 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a reviewer: manmanren. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman https://reviews.llvm.org/D22929 ___ cfe-commits mailing list

Re: [PATCH] D22794: [Sema] Propagate nullability when deducing type of auto

2016-08-15 Thread Manman Ren via cfe-commits
manmanren added a subscriber: manmanren. Comment at: lib/Sema/SemaDecl.cpp:9739 @@ +9738,3 @@ + DeducedType = DeducedType.setNullability( + Init->getType()->getNullability(Context), Context); + Do we propagate other attributes for deduced types?

Re: [PATCH] D22929: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl

2016-08-15 Thread Manman Ren via cfe-commits
manmanren added a subscriber: manmanren. manmanren added a comment. The fix looks reasonable to me. Cheers, Manman Comment at: test/CodeGenObjCXX/encode.mm:231 @@ +230,3 @@ +struct S { + typedef T Ty; + Ty *t; I wonder if we can further reduce the testing

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-15 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. > This is done so containers, such as `vector` can be used > safely provided `partially_available` is safe at the point of instantiation. > I think the way to improve this is in

r278742 - Objective-C diagnostics: isObjCNSObjectType should check through AttributedType.

2016-08-15 Thread Manman Ren via cfe-commits
Author: mren Date: Mon Aug 15 16:05:00 2016 New Revision: 278742 URL: http://llvm.org/viewvc/llvm-project?rev=278742=rev Log: Objective-C diagnostics: isObjCNSObjectType should check through AttributedType. For the following example: typedef __attribute__((NSObject)) CGColorRef ColorAttrRef;

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-11 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:1438-1450 @@ -1437,3 +1437,15 @@ // Search for a module with the given name. Module = PP->getHeaderSearchInfo().lookupModule(ModuleName); -if (!Module) { +HeaderSearchOptions = +

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks, Manman Comment at: include/clang/Lex/HeaderSearchOptions.h:96-97 @@ -95,1 +95,4 @@ + /// \brief The directory used to load prebuilt module files. + std::string PrebuiltModulePath; + rsmith wrote: > It would seem preferable

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-10 Thread Manman Ren via cfe-commits
manmanren added a comment. This looks pretty good. Can you add a few more testing cases for templates such as @available inside the template function, @available enclosing the template instantiation? Cheers, Manman Comment at: lib/Sema/SemaDeclAttr.cpp:6634 @@ +6633,3 @@ +

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 67621. manmanren added a comment. Addressing Richard's comments. https://reviews.llvm.org/D23125 Files: docs/Modules.rst include/clang/Driver/Options.td include/clang/Lex/HeaderSearch.h include/clang/Lex/HeaderSearchOptions.h

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D23125#510632, @rsmith wrote: > This doesn't seem like quite the right user interface for this feature. The > module cache is volatile, and it's not really reasonable for people to assume > they know what is and isn't within it. Instead,

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-09 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D23125#504942, @benlangmuir wrote: > How about -fmodules-use-prebuilt-**module-cache** for the flag name? Saying > "prebuilt-modules" is confusing to me, since -fmodule-file can also be used > to load a prebuilt module, but doesn't use

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-09 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 67431. manmanren added a comment. Add comments for setting IsSystem to true. https://reviews.llvm.org/D23125 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td include/clang/Lex/HeaderSearchOptions.h

Re: [PATCH] D23221: [NFC][ObjC Availability] Split up DiagnoseAvailabilityOfDecl, remove redundant enumeration

2016-08-05 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. Thanks, Manman https://reviews.llvm.org/D23221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-04 Thread Manman Ren via cfe-commits
manmanren added a comment. Hi Erik, Thanks for working on this! It is great to see these patches coming. Manman Comment at: include/clang/Sema/Sema.h:9608 @@ -9604,1 +9607,3 @@ + /// \brief Whether we should emit an availability diagnostic for \c D. + bool

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-03 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Driver/Tools.cpp:5416 @@ -5408,1 +5415,3 @@ + if (Args.getLastArg(options::OPT_fmodules_use_prebuilt_modules)) { +// When using prebuilt modules, we disable module hash. benlangmuir wrote: > ``` > if

[PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-03 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: benlangmuir. manmanren added a subscriber: cfe-commits. We add -fmodules-use-prebuilt-modules to support using prebuilt modules. In this mode, there is no need to load any module map and the programmer can simply use "@import" syntax

[PATCH] D23080: ObjC: Use a new type for ObjC type parameter (patch 3 out of 3)

2016-08-02 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: doug.gregor. manmanren added a subscriber: cfe-commits. Depends on https://reviews.llvm.org/D23078 and https://reviews.llvm.org/D23079 We say ObjCTypeParamType is ObjCObjectPointerType, but we assert fail when trying to call

[PATCH] D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3)

2016-08-02 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: doug.gregor. manmanren added a subscriber: cfe-commits. This depends on https://reviews.llvm.org/D23078 ObjC generics: Add ObjCTypeParamType in the type system. We also need to add ObjCTypeParamTypeLoc. ObjCTypeParamType supports the

[PATCH] D23078: ObjC: Use a new type for ObjC type parameter (Patch 1 out of 3)

2016-08-02 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: dexonsmith, doug.gregor. manmanren added a subscriber: cfe-commits. For ObjC type parameter, we used to have TypedefType that is canonicalized to id or the bound type. We can't represent "T " and thus will lose the type information in

Re: [PATCH] D22697: [ObjC Availability] Consider lexical context of use of declaration when emitting availability diagnostics

2016-07-28 Thread Manman Ren via cfe-commits
manmanren added a comment. Yes, this still looks good to me. Please commit. Manman https://reviews.llvm.org/D22697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22636: Module: retry building modules that were just compiled by the same instance and are are out of date

2016-07-27 Thread Manman Ren via cfe-commits
manmanren abandoned this revision. manmanren added a comment. Abandon this change for now. https://reviews.llvm.org/D22636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r276797 - Modules: follow up to r276769.

2016-07-26 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Jul 26 14:56:12 2016 New Revision: 276797 URL: http://llvm.org/viewvc/llvm-project?rev=276797=rev Log: Modules: follow up to r276769. In r276769, I forgot to forward the driver option, add that here. rdar://26675801 Modified: cfe/trunk/lib/Driver/Tools.cpp Modified:

r276769 - Modules: add command line option fmodules-disable-diagnostic-validation

2016-07-26 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Jul 26 12:12:17 2016 New Revision: 276769 URL: http://llvm.org/viewvc/llvm-project?rev=276769=rev Log: Modules: add command line option fmodules-disable-diagnostic-validation With PCH+Module, sometimes compiler gives a hard error: Module file ‘.pcm' is out of date and

Re: [PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-25 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 65449. manmanren added a comment. Addressing Ben's comments https://reviews.llvm.org/D22773 Files: include/clang/Driver/Options.td include/clang/Lex/HeaderSearchOptions.h include/clang/Serialization/ASTReader.h lib/Frontend/CompilerInvocation.cpp

Re: [PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-25 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D22773#495524, @benlangmuir wrote: > > the pcm could still be rewritten by a compilation that doesn't use a PCH, > > and then it would be out of date because of the timestamp instead of the > > diagnostic options > > > > > > "a

Re: [PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-25 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D22773#495403, @benlangmuir wrote: > We need to add this option to the module hash (see getModuleHash - we already > add a bunch of other HSOpts there). Otherwise the pcm could still be > rewritten by a compilation that doesn't use a PCH,

Re: [PATCH] D22697: [ObjC Availability] Consider lexical context of use of declaration when emitting availability diagnostics

2016-07-25 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. LGTM except one nit. Manman Comment at: include/clang/Sema/Sema.h:9595 @@ -9594,1 +9594,3 @@ + + VersionTuple getCurContextVersion() const; Can

[PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-25 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: benlangmuir. manmanren added a subscriber: cfe-commits. With PCH+Module, sometimes compiler gives a hard error: "Module file ‘.pcm' is out of date and needs to be rebuilt" This happens when we have a PCH importing a module and the

Re: [PATCH] D22636: Module: retry building modules that were just compiled by the same instance and are are out of date

2016-07-22 Thread Manman Ren via cfe-commits
manmanren added a comment. In https://reviews.llvm.org/D22636#493072, @benlangmuir wrote: > > Can you point me to the source codes where we use rename to replace the > > file? I am curious on how this all works out. > > > This is the same as clang's handling of other output files. See >

Re: [PATCH] D22542: [CodeGen] Fix a crash on valid when constant folding 'default:' statement in switch

2016-07-21 Thread Manman Ren via cfe-commits
manmanren accepted this revision. manmanren added a comment. This revision is now accepted and ready to land. LGTM. Manman https://reviews.llvm.org/D22542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

  1   2   3   >