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

[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 the

[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 r

[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 Type::getP

[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 t

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 (IsPrebu

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 ShouldDiagnoseAv

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 http://lists.llvm.org/cgi-bin/mailma

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 lib/Driver/Too

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 a

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, it

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 include/clang/Seria

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 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] 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 &HSOpts =

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 updated this revision to Diff 67727. 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 include/clang/Seria

r259591 - ObjCXX: fix a crash during typo correction.

2016-02-02 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Feb 2 16:23:03 2016 New Revision: 259591 URL: http://llvm.org/viewvc/llvm-project?rev=259591&view=rev Log: ObjCXX: fix a crash during typo correction. For ObjCXX, we can create a CastExpr with Kind being CK_UserDefinedConversion and SubExpr being BlockExpr. Specifically on

r259728 - Bump DiagnosticSemaKinds count; we're close to hitting it.

2016-02-03 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Feb 3 17:35:29 2016 New Revision: 259728 URL: http://llvm.org/viewvc/llvm-project?rev=259728&view=rev Log: Bump DiagnosticSemaKinds count; we're close to hitting it. $ grep '= DIAG_START_SEMA' include/clang/Basic/DiagnosticIDs.h DIAG_START_ANALYSIS = DIAG_STAR

r259820 - Fix a crash when there is a typo in the return statement.

2016-02-04 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Feb 4 14:05:40 2016 New Revision: 259820 URL: http://llvm.org/viewvc/llvm-project?rev=259820&view=rev Log: Fix a crash when there is a typo in the return statement. If the typo happens after a successful deduction for an earlier return statement, we should check if the ded

r260567 - [PR26550] Use a different TBAA root for C++ vs C.

2016-02-11 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Feb 11 13:19:18 2016 New Revision: 260567 URL: http://llvm.org/viewvc/llvm-project?rev=260567&view=rev Log: [PR26550] Use a different TBAA root for C++ vs C. This commit changes the root from "Simple C/C++ TBAA" to "Simple C++ TBAA" for C++. The problem is that the type na

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-15 Thread Manman Ren via cfe-commits
manmanren added a subscriber: manmanren. manmanren added a comment. Hi Akira, Can you give a high-level explanation of how this patch fixes the problem? This patch enforces that the capacity is 8-byte aligned, is it required to solve the alignment issue here? Thanks, Manman http://reviews.ll

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-15 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks for working on this! Manman Comment at: lib/Sema/TypeLocBuilder.cpp:99 @@ +98,3 @@ +// element was pushed. +RemoveOrInsertPadding = NumBytesAtAlign4 != 0; + } This patch seems to do two things: 1> simplify the logic of

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-15 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Sema/TypeLocBuilder.cpp:130 @@ +129,3 @@ + else if (CurrentlyHasPadding) { +// Remove 4-byte padding. +memmove(&Buffer[Index + 4], &Buffer[Index], NumBytesAtAlign4); Expand this comment a little

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Manman Ren via cfe-commits
manmanren added a comment. LGTM otherwise. Cheers, Manman Comment at: lib/CodeGen/CGCall.cpp:2468 @@ +2467,3 @@ + QualType RT; + + if (auto *FD = dyn_cast(CurCodeDecl)) Maybe add comments here on the if else block? http://reviews.llvm.org/D16914

Re: [PATCH] D15314: Fix a bug in unavailable checking

2016-02-17 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 48228. http://reviews.llvm.org/D15314 Files: include/clang/Sema/Initialization.h include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp test/SemaObjC/Inputs/arc-system-header.h test/SemaObjC/arc-system-head

Re: [PATCH] D15314: Fix a bug in unavailable checking

2016-02-17 Thread Manman Ren via cfe-commits
manmanren added a comment. Doug, Thanks for reviewing! I updated the patch to use TreatUnavailableAsInvalid. Cheers, Manman http://reviews.llvm.org/D15314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

r261163 - Add 'nopartial' qualifier for availability attributes.

2016-02-17 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Feb 17 16:05:48 2016 New Revision: 261163 URL: http://llvm.org/viewvc/llvm-project?rev=261163&view=rev Log: Add 'nopartial' qualifier for availability attributes. An optional nopartial can be placed after the platform name. int bar() __attribute__((availability(macosx,nopar

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-17 Thread Manman Ren via cfe-commits
manmanren added a comment. Hi Akira, How about the following? else if (LocalAlignment == 8) { if (NumBytesAtAlign8 == 0) { // We have not seen any 8-byte aligned element yet. There is no padding and we are either 4-byte // aligned or 8-byte aligned depending on NumBytesAtAlign

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Manman Ren via cfe-commits
On Wed, Feb 17, 2016 at 10:33 PM, Akira Hatanaka wrote: > ahatanak added a comment. > > OK, I now understand what you meant. > > > How about the following? > > > > > > else if (LocalAlignment == 8) { > > > if (NumBytesAtAlign8 == 0) { > > > // We have not seen any 8-byte aligned eleme

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Manman Ren via cfe-commits
manmanren added a comment. > If Capacity is not a multiple of 8, (LocalSize + NumBytesAtAlign4) % 8 > doesn't tell you whether the new element will be 8-byte aligned. For example, > if Capacity==36, NumBytesAtAlign4==4, and LocalSize==8, (LocalSize + > NumBytesAtAlign4) equals 12 but padding

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks Akira, LGTM. Manman http://reviews.llvm.org/D16843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261466 - Class Property: Fix a crash with old ABI when generating metadata in classes.

2016-02-20 Thread Manman Ren via cfe-commits
Author: mren Date: Sat Feb 20 23:31:05 2016 New Revision: 261466 URL: http://llvm.org/viewvc/llvm-project?rev=261466&view=rev Log: Class Property: Fix a crash with old ABI when generating metadata in classes. rdar://23891898 Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp cfe/trunk/test/Co

r261512 - Addressing review comments for r261163.

2016-02-21 Thread Manman Ren via cfe-commits
Author: mren Date: Sun Feb 21 22:47:24 2016 New Revision: 261512 URL: http://llvm.org/viewvc/llvm-project?rev=261512&view=rev Log: Addressing review comments for r261163. Use "strict" instead of "nopartial". Also make strictly not-introduced share the same diagnostics as Obsolete and Unavailable.

r261548 - Add has_feature attribute_availability_with_strict.

2016-02-22 Thread Manman Ren via cfe-commits
Author: mren Date: Mon Feb 22 12:24:30 2016 New Revision: 261548 URL: http://llvm.org/viewvc/llvm-project?rev=261548&view=rev Log: Add has_feature attribute_availability_with_strict. rdar://23791325 Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp cfe/trunk/test/Sema/attr-availability-ma

Re: r261548 - Add has_feature attribute_availability_with_strict.

2016-02-22 Thread Manman Ren via cfe-commits
> On Feb 22, 2016, at 10:37 AM, Aaron Ballman via cfe-commits > wrote: > > On Mon, Feb 22, 2016 at 1:24 PM, Manman Ren via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: >> Author: mren >> Date: Mon Feb 22 12:24:30 2016 >> New Revision: 261548

Re: [PATCH] SemaCXX: Support templates in availability attributes

2016-02-22 Thread Manman Ren via cfe-commits
> On Feb 8, 2016, at 8:17 PM, Duncan P. N. Exon Smith > wrote: > > This patch adds support for templates in availability attributes. > - If the context for an availability diagnostic is a >`FunctionTemplateDecl`, look through it to the `FunctionDecl`. > AvailabilityResult Decl::getAvail

Re: [PATCH] SemaCXX: Support templates in availability attributes

2016-02-23 Thread Manman Ren via cfe-commits
This patch looks good to me. But I am not sure if Aaron has any comment. > On Feb 22, 2016, at 6:19 PM, Duncan P. N. Exon Smith > wrote: > >> >> On 2016-Feb-22, at 17:24, Manman Ren wrote: >> >> >> >>> On Feb 8, 2016, at 8:17 PM, Duncan P. N. Exon Smith >>> wrote: >>> >>> This patch add

r261756 - Objective-C: Add a size field to non-fragile category metadata.

2016-02-24 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Feb 24 11:49:50 2016 New Revision: 261756 URL: http://llvm.org/viewvc/llvm-project?rev=261756&view=rev Log: Objective-C: Add a size field to non-fragile category metadata. This is mainly for extensibility. Note that fragile category metadata, metadata for classes and protoc

[PATCH] D17576: Fix assertion failure on MaybeODRUseExprs.

2016-02-24 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: rsmith, EricWF, faisalv. manmanren added a subscriber: cfe-commits. In VisitNonTypeTemplateParamDecl, before SubstExpr with the default argument, we should create a ConstantEvaluated ExpressionEvaluationContext. Without this, it is possib

r261803 - Fix assertion failure on MaybeODRUseExprs.

2016-02-24 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Feb 24 17:05:43 2016 New Revision: 261803 URL: http://llvm.org/viewvc/llvm-project?rev=261803&view=rev Log: Fix assertion failure on MaybeODRUseExprs. In VisitNonTypeTemplateParamDecl, before SubstExpr with the default argument, we should create a ConstantEvaluated Expressi

[PATCH] D19679: Method pool in modules: sync up out of date selectors before writing the module

2016-04-28 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: doug.gregor. manmanren added a subscriber: cfe-commits. Method Pool in modules: we make sure that if a module contains an entry for a selector, the entry should be complete, containing everything introduced by that module and all modul

Re: [PATCH] D19679: Method pool in modules: sync up out of date selectors before writing the module

2016-04-29 Thread Manman Ren via cfe-commits
manmanren added a comment. Adrian, Thanks for reviewing the patch! Manman Comment at: include/clang/Serialization/ASTReader.h:657 @@ +656,3 @@ + /// Whether a selector is out of date. We mark a selector as out of date + // if we load another module after the method pool entr

Re: [PATCH] D19679: Method pool in modules: sync up out of date selectors before writing the module

2016-04-29 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 55638. manmanren added a comment. Addressing review comments from Doug and Adrian. Manman http://reviews.llvm.org/D19679 Files: include/clang/Sema/ExternalSemaSource.h include/clang/Sema/MultiplexExternalSemaSource.h include/clang/Sema/Sema.h inc

Re: [PATCH] D19679: Method pool in modules: sync up out of date selectors before writing the module

2016-04-29 Thread Manman Ren via cfe-commits
manmanren marked 3 inline comments as done. Comment at: lib/Serialization/ASTWriter.cpp:4394 @@ +4393,3 @@ + // date, so we need to pull in the new content here. + + // It's possible that updateOutOfDateSelector can update SelectorIDs. To be Nice catch. Thanks,

r268091 - Method Pool in modules: we make sure that if a module contains an entry for

2016-04-29 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Apr 29 14:04:05 2016 New Revision: 268091 URL: http://llvm.org/viewvc/llvm-project?rev=268091&view=rev Log: Method Pool in modules: we make sure that if a module contains an entry for a selector, the entry should be complete, containing everything introduced by that module a

r268781 - ObjC kindof: set the type of a conditional expression when involving kindof.

2016-05-06 Thread Manman Ren via cfe-commits
Author: mren Date: Fri May 6 14:35:02 2016 New Revision: 268781 URL: http://llvm.org/viewvc/llvm-project?rev=268781&view=rev Log: ObjC kindof: set the type of a conditional expression when involving kindof. When either LHS or RHS is a kindof type, we return a kindof type. rdar://problem/2051378

r268786 - Availability: attach the note to the declaration with the attributes.

2016-05-06 Thread Manman Ren via cfe-commits
Author: mren Date: Fri May 6 14:57:16 2016 New Revision: 268786 URL: http://llvm.org/viewvc/llvm-project?rev=268786&view=rev Log: Availability: attach the note to the declaration with the attributes. Sometimes, the declaration we found has inherited availability attributes, attaching the note to

r268793 - Availability: set location when creating attribute for tvos, watchos.

2016-05-06 Thread Manman Ren via cfe-commits
Author: mren Date: Fri May 6 16:04:01 2016 New Revision: 268793 URL: http://llvm.org/viewvc/llvm-project?rev=268793&view=rev Log: Availability: set location when creating attribute for tvos, watchos. When inferring availability attributes for tvos, watchos from ios, we use the same source locati

Re: [PATCH] D20045: [ObjC][CodeGen] Remove an assert that is no longer correct.

2016-05-10 Thread Manman Ren via cfe-commits
manmanren added a comment. After r231508 made changes to promote constant temporaries to globals, the assert fires when a std::initializer_list is constructed using Objective-C string literals. --> Can you explain the code path after r231508 for your example? Will r231508 change the code path

r269730 - Modules: set SystemHeader to true if we are building a system module.

2016-05-16 Thread Manman Ren via cfe-commits
Author: mren Date: Mon May 16 21:15:12 2016 New Revision: 269730 URL: http://llvm.org/viewvc/llvm-project?rev=269730&view=rev Log: Modules: set SystemHeader to true if we are building a system module. If we are processing a #include from a module build, we should treat it as a system header if we

r269794 - NFC: simplify logic.

2016-05-17 Thread Manman Ren via cfe-commits
Author: mren Date: Tue May 17 13:04:38 2016 New Revision: 269794 URL: http://llvm.org/viewvc/llvm-project?rev=269794&view=rev Log: NFC: simplify logic. Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trun

r269968 - ObjectiveC Class Properties: warn if a class property accessor is mistakenly an

2016-05-18 Thread Manman Ren via cfe-commits
Author: mren Date: Wed May 18 13:12:34 2016 New Revision: 269968 URL: http://llvm.org/viewvc/llvm-project?rev=269968&view=rev Log: ObjectiveC Class Properties: warn if a class property accessor is mistakenly an instance method. When diagnosing unimplemented class property, make sure we emit a war

[PATCH] D20383: PCH + Module: make sure we write out macros associated with builtin identifiers

2016-05-18 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: benlangmuir, rsmith. manmanren added a subscriber: cfe-commits. When we import a module that defines a builtin identifier from prefix header and precompile the prefix header, the macro information related to the identifier is lost. If w

Re: [PATCH] D20383: PCH + Module: make sure we write out macros associated with builtin identifiers

2016-05-19 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks Bruno Comment at: lib/Serialization/ASTWriter.cpp:2191 @@ -2191,1 +2190,3 @@ +// We write out exported module macros for PCH as well. +if (true) { auto Leafs = PP.getLeafModuleMacros(Name); bruno wrote: > Is this

r270241 - ObjectiveC: canonicalize "kindof id" to "id".

2016-05-20 Thread Manman Ren via cfe-commits
Author: mren Date: Fri May 20 12:29:43 2016 New Revision: 270241 URL: http://llvm.org/viewvc/llvm-project?rev=270241&view=rev Log: ObjectiveC: canonicalize "kindof id" to "id". There is no need to apply kindof on an unqualified id type. rdar://24753825 Modified: cfe/trunk/lib/Sema/SemaType.

[PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-29 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: rjmccall, Anastasia. manmanren added a subscriber: cfe-commits. A simple example will crash at IRGen: void (^simpleBlock)() = ^ _Nonnull { return; }; The Return type for the block will be AttributedType of a DependentTy and it will no

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-29 Thread Manman Ren via cfe-commits
manmanren added a comment. Cheers, Manman Comment at: lib/Sema/SemaType.cpp:1569 @@ +1568,3 @@ +// Mark them as invalid. +attr.setInvalid(); + } rjmccall wrote: > It's not generally a good idea to set things as invalid if you're just > emit

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-31 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks for reviewing! I will update the patch addressing the comments soon! Manman Comment at: lib/Sema/SemaType.cpp:1569 @@ +1568,3 @@ +// Mark them as invalid. +attr.setInvalid(); + } rsmith wrote: > rjmccall w

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-31 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 52316. manmanren added a comment. Addressing review comments. http://reviews.llvm.org/D18567 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaType.cpp test/SemaObjC/block-omitted-return-type.m test/SemaOpenCL/invalid-block.cl Index:

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-31 Thread Manman Ren via cfe-commits
manmanren marked 3 inline comments as done. Comment at: lib/Sema/SemaType.cpp:1253-1254 @@ -1252,4 +1253,4 @@ break; } else if (declarator.getContext() == Declarator::LambdaExprContext || isOmittedBlockReturnType(declarator)) { Result = Context.D

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-04-01 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 52398. manmanren added a comment. Addressing review comments. http://reviews.llvm.org/D18567 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaType.cpp test/SemaObjC/block-omitted-return-type.m test/SemaOpenCL/invalid-block.cl Index:

r265488 - Update testing cases after backend changes.

2016-04-05 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Apr 5 18:27:51 2016 New Revision: 265488 URL: http://llvm.org/viewvc/llvm-project?rev=265488&view=rev Log: Update testing cases after backend changes. Modified: cfe/trunk/test/CodeGen/arm-swiftcall.c cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp Modified: cfe/trunk/

r265616 - Keep -fmodule-implementation-of as an alias of -fmodule-name.

2016-04-06 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Apr 6 18:28:26 2016 New Revision: 265616 URL: http://llvm.org/viewvc/llvm-project?rev=265616&view=rev Log: Keep -fmodule-implementation-of as an alias of -fmodule-name. This helps us transitioning to -fmodule-name. Once the transitioning is done, we can remove this alias.

r265711 - NFC: simplify code in BuildInstanceMessage.

2016-04-07 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Apr 7 14:30:20 2016 New Revision: 265711 URL: http://llvm.org/viewvc/llvm-project?rev=265711&view=rev Log: NFC: simplify code in BuildInstanceMessage. Instead of searching the global pool multiple times: in LookupFactoryMethodInGlobalPool, LookupInstanceMethodInGlobalPool,

r265712 - [ObjC kindof] Use type bound to filter out the candidate methods.

2016-04-07 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Apr 7 14:32:24 2016 New Revision: 265712 URL: http://llvm.org/viewvc/llvm-project?rev=265712&view=rev Log: [ObjC kindof] Use type bound to filter out the candidate methods. rdar://21306753 Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaDeclOb

r265877 - ObjC kindof: check the context when inserting methods to global pool.

2016-04-09 Thread Manman Ren via cfe-commits
Author: mren Date: Sat Apr 9 13:59:48 2016 New Revision: 265877 URL: http://llvm.org/viewvc/llvm-project?rev=265877&view=rev Log: ObjC kindof: check the context when inserting methods to global pool. To make kindof lookup work, we need to insert methods with different context into the global poo

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-04-11 Thread Manman Ren via cfe-commits
manmanren added a comment. Ping :] http://reviews.llvm.org/D18567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes

2016-04-12 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Parse/ParseObjc.cpp:1697 @@ -1696,3 +1696,3 @@ // We syntactically matched a type argument, so commit to parsing - // type arguments. + // type arguments. Finding protocol arguments after here is an error. I

Re: [PATCH] D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes

2016-04-12 Thread Manman Ren via cfe-commits
manmanren added a comment. LGTM. Manman http://reviews.llvm.org/D18997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r266146 - ObjC class properties: add diagnostics for unimplemented class properties.

2016-04-12 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Apr 12 18:01:55 2016 New Revision: 266146 URL: http://llvm.org/viewvc/llvm-project?rev=266146&view=rev Log: ObjC class properties: add diagnostics for unimplemented class properties. rdar://24711047 Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe

r266264 - ObjC kindof: order the methods in global pool relative to availability.

2016-04-13 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Apr 13 18:43:56 2016 New Revision: 266264 URL: http://llvm.org/viewvc/llvm-project?rev=266264&view=rev Log: ObjC kindof: order the methods in global pool relative to availability. r265877 tries to put methods that are deprecated or unavailable to the front of the global poo

r266648 - Block: Fix a crash when we have type attributes or qualifiers with omitted

2016-04-18 Thread Manman Ren via cfe-commits
Author: mren Date: Mon Apr 18 13:40:51 2016 New Revision: 266648 URL: http://llvm.org/viewvc/llvm-project?rev=266648&view=rev Log: Block: Fix a crash when we have type attributes or qualifiers with omitted return type. Emit a warning instead of crashing in IR generation. rdar://22762981 Differe

r266800 - ObjC Class Property: don't emit class properties on old deployment targets.

2016-04-19 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Apr 19 14:05:03 2016 New Revision: 266800 URL: http://llvm.org/viewvc/llvm-project?rev=266800&view=rev Log: ObjC Class Property: don't emit class properties on old deployment targets. For old deployment targets, emit nil for all class property lists. rdar://25616128 Modif

Re: [PATCH] arc-repeated-use-of-weak should not warn about IBOutlet properties

2016-05-24 Thread Manman Ren via cfe-commits
> On May 24, 2016, at 11:42 AM, Bob Wilson wrote: > >> >> On May 24, 2016, at 11:21 AM, Manman wrote: >> >> >>> On May 23, 2016, at 8:15 PM, Bob Wilson wrote: >>> >>> Revision r211132 was supposed to disable -Warc-repeated-use-of-weak for >>> Objective-C properties marked with the IBOutle

Re: [PATCH] D20383: PCH + Module: make sure we write out macros associated with builtin identifiers

2016-05-25 Thread Manman Ren via cfe-commits
manmanren added a comment. Doug and Richard, Can you take a look at this when you have time? Thanks, Manman http://reviews.llvm.org/D20383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D20383: PCH + Module: make sure we write out macros associated with builtin identifiers

2016-05-31 Thread Manman Ren via cfe-commits
manmanren added a comment. In http://reviews.llvm.org/D20383#443613, @doug.gregor wrote: > Yeah, this looks like the right approach. PCH follows the same rules as > modules when it comes to newer information shadowing imported information. Hi Doug, Thanks for reviewing the patch! Can I take t

r271310 - PCH + module: make sure we write out macros associated with builtin identifiers.

2016-05-31 Thread Manman Ren via cfe-commits
Author: mren Date: Tue May 31 13:19:32 2016 New Revision: 271310 URL: http://llvm.org/viewvc/llvm-project?rev=271310&view=rev Log: PCH + module: make sure we write out macros associated with builtin identifiers. When we import a module that defines a builtin identifier from prefix header and prec

r271351 - Indexer: add CXObjCPropertyAttr_class for class properties.

2016-05-31 Thread Manman Ren via cfe-commits
Author: mren Date: Tue May 31 18:22:04 2016 New Revision: 271351 URL: http://llvm.org/viewvc/llvm-project?rev=271351&view=rev Log: Indexer: add CXObjCPropertyAttr_class for class properties. rdar://25963227 Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/test/Index/c-index-api-load

[PATCH] D20843: ObjC lifetime: pull sugar off when the qualifiers conflict.

2016-05-31 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: rjmccall. manmanren added a subscriber: cfe-commits. It's possible to have multiple local ObjCLifetime qualifiers. When there is a conflict, we can't stop after we reach a type that is directly qualified. We need to keep pulling sugar of

[PATCH] D20844: FixIt: correctly set DeclSpec's range end for a type name annotation.

2016-05-31 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added a reviewer: rjmccall. manmanren added a subscriber: cfe-commits. Before this fix, both the start and the end point to the same location, and we will add the FixIt before the type name: ^(NSView view) to ^(*NSView view) After this commit, fixit wil

Re: [PATCH] D20843: ObjC lifetime: pull sugar off when the qualifiers conflict.

2016-06-01 Thread Manman Ren via cfe-commits
manmanren added a comment. In http://reviews.llvm.org/D20843#445756, @rjmccall wrote: > Oh sure, because we don't strip the original type if there isn't a conflict. > LGTM. Exactly, thanks for reviewing! Manman http://reviews.llvm.org/D20843 _

r271409 - ObjC lifetime: pull sugar off when the qualifiers conflict.

2016-06-01 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Jun 1 12:14:19 2016 New Revision: 271409 URL: http://llvm.org/viewvc/llvm-project?rev=271409&view=rev Log: ObjC lifetime: pull sugar off when the qualifiers conflict. It's possible to have multiple local ObjCLifetime qualifiers. When there is a conflict, we can't stop afte

Re: [PATCH] D20844: FixIt: correctly set DeclSpec's range end for a type name annotation.

2016-06-01 Thread Manman Ren via cfe-commits
manmanren added a comment. In http://reviews.llvm.org/D20844#445762, @rjmccall wrote: > Hmm. No, I think the original code is correct here — RangeEnd is a token > range, and those are generally inclusive rather than exclusive. The fix-it > needs to be inserting at the end of the token. We c

Re: [PATCH] D20844: FixIt: correctly set DeclSpec's range end for a type name annotation.

2016-06-01 Thread Manman Ren via cfe-commits
> On Jun 1, 2016, at 1:18 PM, Richard Smith via cfe-commits > wrote: > > On Wed, Jun 1, 2016 at 12:42 PM, Manman Ren via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > manmanren added a comment. > > In http://reviews.llvm.org/D20844#445762 >

Re: [PATCH] D20844: FixIt: use getLocForEndOfToken to insert fix-it after a type name.

2016-06-01 Thread Manman Ren via cfe-commits
manmanren retitled this revision from "FixIt: correctly set DeclSpec's range end for a type name annotation." to "FixIt: use getLocForEndOfToken to insert fix-it after a type name.". manmanren updated the summary for this revision. manmanren updated this revision to Diff 59296. manmanren added a

r271448 - FixIt: use getLocForEndOfToken to insert fix-it after a type name.

2016-06-01 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Jun 1 19:11:03 2016 New Revision: 271448 URL: http://llvm.org/viewvc/llvm-project?rev=271448&view=rev Log: 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 getLo

r271747 - Bump libclang API minor version after r271351.

2016-06-03 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Jun 3 18:11:41 2016 New Revision: 271747 URL: http://llvm.org/viewvc/llvm-project?rev=271747&view=rev Log: Bump libclang API minor version after r271351. Also use the next enum value for CXObjCPropertyAttr_class. Modified: cfe/trunk/include/clang-c/Index.h Modified:

Re: [PATCH] D20923: [Sema] Fix a crash on invalid where invalid defaulted function is called

2016-06-20 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 http://reviews.llvm.org/D20923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

r274064 - AvailabilityAttr: we accept "macos" as the platform name.

2016-06-28 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Jun 28 15:55:30 2016 New Revision: 274064 URL: http://llvm.org/viewvc/llvm-project?rev=274064&view=rev Log: AvailabilityAttr: we accept "macos" as the platform name. We continue accepting "macosx" but canonicalize it to "macos", When emitting diagnostics, we use "macOS" ins

r274076 - ObjC Class Property: diagnostics when accessing a class property using instance.

2016-06-28 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Jun 28 18:01:49 2016 New Revision: 274076 URL: http://llvm.org/viewvc/llvm-project?rev=274076&view=rev Log: ObjC Class Property: diagnostics when accessing a class property using instance. When a class property is accessed with an object instance, before this commit, we try

Re: r274064 - AvailabilityAttr: we accept "macos" as the platform name.

2016-06-29 Thread Manman Ren via cfe-commits
Good point! In r274133. Manman On Wed, Jun 29, 2016 at 7:30 AM, Aaron Ballman wrote: > On Tue, Jun 28, 2016 at 4:55 PM, Manman Ren via cfe-commits > wrote: > > Author: mren > > Date: Tue Jun 28 15:55:30 2016 > > New Revision: 274064 > > > > URL: http://llv

r274133 - AvailabilityAttr: update the document for macosx

2016-06-29 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Jun 29 10:50:08 2016 New Revision: 274133 URL: http://llvm.org/viewvc/llvm-project?rev=274133&view=rev Log: AvailabilityAttr: update the document for macosx Modified: cfe/trunk/include/clang/Basic/AttrDocs.td Modified: cfe/trunk/include/clang/Basic/AttrDocs.td URL: ht

r274392 - C++14 init-capture: error out instead of crashing.

2016-07-01 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Jul 1 17:27:16 2016 New Revision: 274392 URL: http://llvm.org/viewvc/llvm-project?rev=274392&view=rev Log: C++14 init-capture: error out instead of crashing. When we have template arguments, we have a function and a pattern, the variable in init-capture belongs to the patt

Re: [PATCH] D21295: Add a negative TBAA test

2016-07-05 Thread Manman Ren via cfe-commits
manmanren added a subscriber: manmanren. manmanren added a comment. In http://reviews.llvm.org/D21295#474241, @Anastasia wrote: > LGTM! > > Has this test case been missing from the original commit? If yes, could you > point to it please! Thanks! The original commit is the support for tbaa, whe

[libcxx] r274651 - Revert r274605 due to bot failure: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/244/

2016-07-06 Thread Manman Ren via cfe-commits
Author: mren Date: Wed Jul 6 13:24:53 2016 New Revision: 274651 URL: http://llvm.org/viewvc/llvm-project?rev=274651&view=rev Log: Revert r274605 due to bot failure: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/244/ Modified: libcxx/trunk/test/std/utilities/meta/meta.u

Re: [libcxx] r274605 - Fix typo in #ifdef, and re-enable tests now that the green-dragon bots are no more

2016-07-06 Thread Manman Ren via cfe-commits
Hi Marshall, I reverted this in r274651, since it broke a bot. Feel free to re-commit it later. Manman > On Jul 6, 2016, at 12:16 AM, Diana Picus via cfe-commits > wrote: > > Hi Marhsall, > > This seems to be breaking our libcxx bot: > http://lab.llvm.org:8011/builders/libcxx-libcxxabi-arm-

Re: [PATCH] D22171: [ObjC Availability] Implement parser support for Objective-C's @available

2016-07-11 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks for working on this, Erik. Manman Comment at: include/clang/AST/Availability.h:32 @@ +31,3 @@ +class AvailabilitySpec { + VersionTuple Version; + StringRef Platform; Can you put a description for "Version"? i.e if it represen

Re: [PATCH] D19934: [NFC] Reorder fields of VersionTuple to reduce size

2016-07-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 http://reviews.llvm.org/D19934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

Re: [PATCH] D19679: Method pool in modules: sync up out of date selectors before writing the module

2016-07-11 Thread Manman Ren via cfe-commits
manmanren closed this revision. manmanren marked an inline comment as done. manmanren added a comment. In r268091. http://reviews.llvm.org/D19679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: [PATCH] D22183: [SemObjC] Fix TypoExpr handling in TransformObjCDictionaryLiteral

2016-07-12 Thread Manman Ren via cfe-commits
manmanren added a comment. > Before this patch, the testcase added used to take > 5s to compile!!! A bit more elaborate NSDictionary literal with some > undeclared enums would make the compiler take 22min to run, followed by a > crash. --> this is a big improvement! A few notes from discu

<    1   2   3   >