Page MenuHomePhabricator
Feed Advanced Search

Nov 9 2016

manmanren added a comment to D26438: [Verifier] Add verification for TBAA metadata.

There is one place where there is an ambiguity in the specification:
given a base type !{!"whatever", !N, i64 1} there is no way to tell if
this is a struct containing !N at offset i64 1 or a scalar immutable
TBAA node with !N as the parent. Right now I interpret this as the
former (as the implementation has been doing for 3 years). I will fix
the specification in a forthcoming documentation patch.

Nov 9 2016, 11:14 AM

Nov 8 2016

manmanren accepted D26071: [CodeCompletion] Show block invocation result for block property setters.

LGTM.

Nov 8 2016, 4:38 PM
manmanren added a comment to D26229: [TBAA] Drop support for "old style" scalar TBAA.

Nice clean up!

Nov 8 2016, 7:47 AM

Oct 26 2016

manmanren accepted D25993: [Objective-C] Add objc_subclassing_restricted attribute.

LGTM.

Oct 26 2016, 10:27 AM

Oct 24 2016

manmanren added a comment to D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free..

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 differences in diagnostic options. When building module Z in the child thread, since Z is not a system module, we will spot the diagnostic differences and invalidate module Y. But the parent thread will continue accessing the deleted FileEntry for module Y.

Oct 24 2016, 11:40 AM
manmanren retitled D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free. from to Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free..
Oct 24 2016, 11:31 AM

Oct 20 2016

manmanren updated the diff for D25806: Module: correctly set the module file kind when emitting diagnostics for file_modified.

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.

Oct 20 2016, 11:33 AM

Oct 19 2016

manmanren retitled D25806: Module: correctly set the module file kind when emitting diagnostics for file_modified from to Module: correctly set the module file kind when emitting diagnostics for file_modified.
Oct 19 2016, 5:05 PM
manmanren added a comment to D25777: [Sema][TreeTransform] Re-create DesignatedInitExpr when it has a field designator with a valid FieldDecl.

It makes sense to rebuild the expression when a field designator stores a FieldDecl.

Oct 19 2016, 2:52 PM

Oct 18 2016

manmanren added a comment to D22638: Module: add debug_type to dump debugging messages related to modules being out of date.

Thanks a lot for the pointers!

Oct 18 2016, 2:00 PM

Oct 17 2016

manmanren added inline comments to 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..
Oct 17 2016, 3:41 PM
manmanren updated D22638: Module: add debug_type to dump debugging messages related to modules being out of date.
Oct 17 2016, 3:39 PM
manmanren accepted D25284: AvailabilityAttrs: Delay partial availability diagnostics.

This is better than what I asked for :]

Oct 17 2016, 3:34 PM

Oct 14 2016

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

LGTM.

Oct 14 2016, 2:48 PM

Oct 12 2016

manmanren added a comment to D25519: [CodeCompletion] Refactor: Extract two Objective-C block formatting related functions from FormatFunctionParameter.

Cheers,
Manman

Oct 12 2016, 10:43 AM

Oct 11 2016

manmanren accepted D25436: [CodeCompletion] Improve completion for properties declared in Objective-C protocols.

LGTM.

Oct 11 2016, 9:33 AM

Oct 10 2016

manmanren added a comment to D25284: AvailabilityAttrs: Delay partial availability diagnostics.

Nice cleanup! Thanks for working on this,

Oct 10 2016, 4:56 PM
manmanren added a comment to D25283: AvailabilityAttrs: Refactor context checking when diagnosing an availability violation.

This is a nice cleanup!

Oct 10 2016, 12:45 PM
manmanren added a comment to D25436: [CodeCompletion] Improve completion for properties declared in Objective-C protocols.

Thanks for working on this!
Manman

Oct 10 2016, 11:22 AM

Sep 15 2016

manmanren accepted D24620: Fix autoupgrade logic for Objective-C class properties module flag.

LGTM. Please update the comment.

Sep 15 2016, 3:16 PM
manmanren added a comment to D24620: Fix autoupgrade logic for Objective-C class properties module flag.

Thanks for working on this!

Sep 15 2016, 1:50 PM

Sep 9 2016

manmanren added a comment to D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3).

Hi Doug,

Sep 9 2016, 12:25 PM

Aug 30 2016

manmanren retitled D24059: NFC: refactor applyObjCProtocolQualifiers from SemaType.cpp to ASTContext so it can be shared. from to NFC: refactor applyObjCProtocolQualifiers from SemaType.cpp to ASTContext so it can be shared..
Aug 30 2016, 3:19 PM
manmanren updated the diff for D23080: ObjC: Use a new type for ObjC type parameter (patch 3 out of 3).

This patch is now much simpler with the updated version of D23079.

Aug 30 2016, 3:15 PM
manmanren updated the diff for D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3).

Address Doug's comment. ObjCTypeParamType is a non-canonical type now, it is canonicalized to the underlying type with protocol qualifiers.

Aug 30 2016, 3:13 PM

Aug 25 2016

manmanren added a comment to D23858: Don't diagnose non-modular includes when we are not compiling a module.

It seems to me like this is papering over an issue rather than fixing it.

Aug 25 2016, 3:04 PM

Aug 24 2016

manmanren retitled D23858: Don't diagnose non-modular includes when we are not compiling a module from to Don't diagnose non-modular includes when we are not compiling a module.
Aug 24 2016, 4:33 PM

Aug 19 2016

manmanren added a comment to D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3).

Thanks for reviewing!

Aug 19 2016, 5:24 PM
manmanren added a comment to D23080: ObjC: Use a new type for ObjC type parameter (patch 3 out of 3).

I will update this patch once the 2nd patch is done.

Aug 19 2016, 5:23 PM

Aug 17 2016

manmanren added inline comments to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 17 2016, 5:18 PM
manmanren added a comment to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Cheers,

Aug 17 2016, 4:56 PM
manmanren updated the diff for D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 17 2016, 4:53 PM
manmanren added a comment to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Thanks,

Aug 17 2016, 4:07 PM
manmanren updated the diff for D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 17 2016, 3:57 PM

Aug 16 2016

manmanren added a comment to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Are you okay with the patch now?

Aug 16 2016, 7:34 PM
manmanren accepted D22929: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl.

LGTM.

Aug 16 2016, 4:48 PM

Aug 15 2016

manmanren added inline comments to D22794: [Sema] Propagate nullability when deducing type of auto.
Aug 15 2016, 5:27 PM
manmanren added a comment to D22929: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl.

The fix looks reasonable to me.

Aug 15 2016, 4:54 PM
manmanren accepted D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration.

This is done so containers, such as vector<partially_available> can be used safely provided partially_available is safe at the point of instantiation. I think the way to improve this is in Sema::getVersionForDecl(). There we could look at function and template parameters to determine the best base version, then diagnose against it.

Aug 15 2016, 3:25 PM

Aug 11 2016

manmanren updated the diff for D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Addressing Richard's comments.

Aug 11 2016, 12:15 PM
manmanren added inline comments to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 11 2016, 11:41 AM

Aug 10 2016

manmanren added a comment to D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration.

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?

Aug 10 2016, 5:22 PM
manmanren added a comment to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Thanks,
Manman

Aug 10 2016, 5:21 PM
manmanren updated the diff for D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Addressing Richard's comments.

Aug 10 2016, 3:40 PM
manmanren requested review of D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 10 2016, 11:15 AM
manmanren added a comment to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

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 seems like what we want to provide is zero or more paths to directories containing prebuilt .pcm files whose file names are the same as their top-level module names, completely separate from the module cache.

Specifically, rather than spelling this as -fmodules-use-prebuilt-modules -fmodules-cache-path=X, I'd suggest spelling it as -fprebuilt-module-path=X or similar (which can be repeated to provide multiple search paths). That would then combine orthogonally with -fno-implicit-modules and -fno-implicit-module-maps, where implicit modules would still use the module cache. Does that make sense for your use case?

Aug 10 2016, 11:14 AM

Aug 9 2016

manmanren added a comment to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

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 cache.

Aug 9 2016, 4:18 PM
manmanren updated the diff for D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.

Add comments for setting IsSystem to true.

Aug 9 2016, 4:07 PM

Aug 5 2016

manmanren accepted D23221: [NFC][ObjC Availability] Split up DiagnoseAvailabilityOfDecl, remove redundant enumeration.

Thanks,
Manman

Aug 5 2016, 3:31 PM

Aug 4 2016

manmanren added a comment to D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration.

Hi Erik,

Aug 4 2016, 12:03 PM

Aug 3 2016

manmanren added inline comments to D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 3 2016, 11:12 AM
manmanren retitled D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map from to Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map.
Aug 3 2016, 10:43 AM

Aug 2 2016

manmanren retitled D23080: ObjC: Use a new type for ObjC type parameter (patch 3 out of 3) from to ObjC: Use a new type for ObjC type parameter (patch 3 out of 3).
Aug 2 2016, 12:49 PM
manmanren retitled D23079: ObjC: Use a new type for ObjC type parameter (patch 2 out of 3) from to ObjC: Use a new type for ObjC type parameter (patch 2 out of 3).
Aug 2 2016, 12:47 PM
manmanren retitled D23078: ObjC: Use a new type for ObjC type parameter (Patch 1 out of 3) from to ObjC: Use a new type for ObjC type parameter (Patch 1 out of 3).
Aug 2 2016, 12:44 PM

Jul 28 2016

manmanren added a comment to D22697: [ObjC Availability] Consider lexical context of use of declaration when emitting availability diagnostics.

Yes, this still looks good to me. Please commit.

Jul 28 2016, 2:48 PM

Jul 27 2016

manmanren abandoned D22636: Module: retry building modules that were just compiled by the same instance and are are out of date.

Abandon this change for now.

Jul 27 2016, 3:31 PM

Jul 25 2016

manmanren updated the diff for D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module.

Addressing Ben's comments

Jul 25 2016, 5:19 PM
manmanren added a comment to D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module.

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 compilation that doesn't use a PCH", is that a different project? And we have two projects building in parallel? Just to make sure I understand.

Two different projects (or targets, or whatever), but they don't even have to build at the same time. They just have to share a cache. Suppose you have a project A with a PCH and -fmodules-disable-diagnostic-validation. Suppose you have another project B that does not use this flag, and does not have a PCH. With this patch, A and B can share a module cache.

A builds a PCH that depends on some module X -- OK
B builds with -Werror. Rebuilds X.pcm -- OK

Now suppose we build A again because of some change: it can't build because X.pcm changed, but we haven't rebuilt the PCH.

Jul 25 2016, 4:44 PM
manmanren added a comment to D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module.

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, and then it would be out of date because of the timestamp instead of the diagnostic options.

Jul 25 2016, 3:12 PM
manmanren accepted D22697: [ObjC Availability] Consider lexical context of use of declaration when emitting availability diagnostics.

LGTM except one nit.

Jul 25 2016, 2:45 PM
manmanren retitled D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module from to Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module.
Jul 25 2016, 1:01 PM

Jul 22 2016

manmanren added a comment to D22636: Module: retry building modules that were just compiled by the same instance and are are out of date.

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 {{CompilerInstance::createOutputFile}} and {{clearOutputFiles}}. When we are performing the GenerateModuleAction, the .pcm file will be the output file.

Jul 22 2016, 11:32 AM

Jul 21 2016

manmanren accepted D22542: [CodeGen] Fix a crash on valid when constant folding 'default:' statement in switch.

LGTM.

Jul 21 2016, 1:57 PM
manmanren added a comment to D22636: Module: retry building modules that were just compiled by the same instance and are are out of date.

B.pcm becomes out of date when we try to load module "A", because another instance overwrites "B.pcm"

How can this happen? We intentionally keep the file descriptors of modules open. If you just built A, then you will have B.pcm still open. When you read A, you will use the same B that you used when you built A even if the file on disk has been replaced (and we use rename to replace the file, so the existing one is never modified).

Jul 21 2016, 11:58 AM
manmanren retitled D22638: Module: add debug_type to dump debugging messages related to modules being out of date from to Module: add debug_type to dump debugging messages related to modules being out of date.
Jul 21 2016, 11:34 AM
manmanren retitled D22636: Module: retry building modules that were just compiled by the same instance and are are out of date from to Module: retry building modules that were just compiled by the same instance and are are out of date.
Jul 21 2016, 11:15 AM

Jul 18 2016

manmanren accepted D22183: [SemObjC] Fix TypoExpr handling in TransformObjCDictionaryLiteral.

LGTM.

Jul 18 2016, 5:12 PM

Jul 15 2016

manmanren accepted D22171: [ObjC Availability] Implement parser support for Objective-C's @available.

LGTM.

Jul 15 2016, 11:46 AM

Jul 14 2016

manmanren accepted D22270: [ASTImporter] Properly report the locations of anonymous structs declared as part of named fields.

LGTM.

Jul 14 2016, 9:43 AM

Jul 13 2016

manmanren added a comment to D22270: [ASTImporter] Properly report the locations of anonymous structs declared as part of named fields.

Thank you very much for your review, Manman! I can implement all your individual fixes, those look fine. In answer to two of your bigger questions, though:

  • I see what you mean about the definition of an anonymous structure. It looks like our structure is an untagged structure, not an anonymous one. That said, this change is safe for all the places that use this function, so it may be appropriate to change the name to findAnonymousStructOrUnionIndex. What do you think?

Sounds good!

  • The test case is unfortunately only an approximation to the more complicated behavior that occurs in lldb. The difference is that the testing infrastructure inside Clang does not implement an ExternalASTSource, which LLDB does. As a result, I've used the test case to verify that we don't break parsing by making this change.

Ok, thanks for the explanation!

Jul 13 2016, 4:26 PM

Jul 12 2016

manmanren added a comment to D22270: [ASTImporter] Properly report the locations of anonymous structs declared as part of named fields.

I am not sure if we should handle this inside findAnonymousStructOrUnionIndex. Here is the definition of anonymous structure I found: An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure.

Jul 12 2016, 1:44 PM
manmanren added a comment to D22183: [SemObjC] Fix TypoExpr handling in TransformObjCDictionaryLiteral.

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!

Jul 12 2016, 11:20 AM

Jul 11 2016

manmanren closed D19679: Method pool in modules: sync up out of date selectors before writing the module.

In r268091.

Jul 11 2016, 11:55 AM
manmanren accepted D19934: [NFC] Reorder fields of VersionTuple to reduce size.

LGTM.

Jul 11 2016, 11:53 AM
manmanren added a comment to D22171: [ObjC Availability] Implement parser support for Objective-C's @available.

Thanks for working on this, Erik.

Jul 11 2016, 11:45 AM

Jul 5 2016

manmanren added a comment to D21295: Add a negative TBAA test.

LGTM!

Has this test case been missing from the original commit? If yes, could you point to it please! Thanks!

Jul 5 2016, 4:20 PM

Jun 20 2016

manmanren accepted D20923: [Sema] Fix a crash on invalid where invalid defaulted function is called.

LGTM.

Jun 20 2016, 11:14 AM

Jun 1 2016

manmanren updated the diff for D20844: FixIt: use getLocForEndOfToken to insert fix-it after a type name..

Use getLocForEndOfToken to insert fix-it after a type name instead of setting DeclSpec's range end.

Jun 1 2016, 3:54 PM
manmanren added a comment to D20844: FixIt: use getLocForEndOfToken to insert fix-it after a type name..

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.

Jun 1 2016, 12:42 PM
manmanren added a comment to D20843: ObjC lifetime: pull sugar off when the qualifiers conflict..

Oh sure, because we don't strip the original type if there isn't a conflict. LGTM.

Jun 1 2016, 8:44 AM

May 31 2016

manmanren retitled D20844: FixIt: use getLocForEndOfToken to insert fix-it after a type name. from to FixIt: correctly set DeclSpec's range end for a type name annotation..
May 31 2016, 4:44 PM
manmanren retitled D20843: ObjC lifetime: pull sugar off when the qualifiers conflict. from to ObjC lifetime: pull sugar off when the qualifiers conflict..
May 31 2016, 4:39 PM
manmanren added a comment to D20383: PCH + Module: make sure we write out macros associated with builtin identifiers.

Yeah, this looks like the right approach. PCH follows the same rules as modules when it comes to newer information shadowing imported information.

May 31 2016, 10:54 AM

May 25 2016

manmanren added a comment to D20383: PCH + Module: make sure we write out macros associated with builtin identifiers.

Doug and Richard,

May 25 2016, 5:19 PM
manmanren added a reviewer for D20383: PCH + Module: make sure we write out macros associated with builtin identifiers: doug.gregor.
May 25 2016, 5:18 PM

May 19 2016

manmanren added a comment to D20383: PCH + Module: make sure we write out macros associated with builtin identifiers.

Thanks Bruno

May 19 2016, 10:14 AM

May 18 2016

manmanren retitled D20383: PCH + Module: make sure we write out macros associated with builtin identifiers from to PCH + Module: make sure we write out macros associated with builtin identifiers.
May 18 2016, 2:00 PM

May 10 2016

manmanren added a comment to D20045: [ObjC][CodeGen] Remove an assert that is no longer correct..

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.

May 10 2016, 9:13 AM

Apr 29 2016

manmanren added inline comments to D19679: Method pool in modules: sync up out of date selectors before writing the module.
Apr 29 2016, 11:44 AM
manmanren updated the diff for D19679: Method pool in modules: sync up out of date selectors before writing the module.

Addressing review comments from Doug and Adrian.

Apr 29 2016, 11:42 AM
manmanren added a comment to D19679: Method pool in modules: sync up out of date selectors before writing the module.

Thanks for reviewing the patch!

Apr 29 2016, 8:30 AM

Apr 28 2016

manmanren retitled D19679: Method pool in modules: sync up out of date selectors before writing the module from to Method pool in modules: sync up out of date selectors before writing the module.
Apr 28 2016, 12:35 PM

Apr 22 2016

manmanren added a comment to D19005: CodeGen, AArch64, ARM, X86: Simplify SplitCSR.

Some general comments:

Apr 22 2016, 12:23 PM

Apr 13 2016

manmanren accepted D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes.
Apr 13 2016, 2:02 PM

Apr 12 2016

manmanren added a comment to D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes.

LGTM.

Apr 12 2016, 4:00 PM
manmanren added a comment to D19005: CodeGen, AArch64, ARM, X86: Simplify SplitCSR.

Some general comments:
Is this NFC (no functionality change)? I noticed a small testing case change.

Apr 12 2016, 12:21 PM
manmanren added inline comments to D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes.
Apr 12 2016, 11:37 AM

Apr 11 2016

manmanren added a reviewer for D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.: rsmith.
Apr 11 2016, 8:37 PM
manmanren added a comment to D18716: Swift Calling Convention: target-specific changes.

Cheers,
Manman

Apr 11 2016, 12:08 PM