[clang] Allow tag-based API notes on anonymous tag decls with typedef names (PR #110768)

2024-10-01 Thread Doug Gregor via cfe-commits
https://github.com/DougGregor created https://github.com/llvm/llvm-project/pull/110768 It is common practice in C to declare anonymous tags that are immediately given a typedef name, e.g., typedef enum { ... } MyType; At present, one can only express API notes on the typedef. However, tha

[PATCH] D26227: Don't require nullability on 'va_list'.

2016-11-09 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. I don't see a better way to do this. Nice meta programming hack. Repository: rL LLVM https://reviews.llvm.org/D26227 ___ cfe-commits

[PATCH] D26109: Warn when 'assume_nonnull' infers nullability within an array.

2016-11-09 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM! Repository: rL LLVM https://reviews.llvm.org/D26109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-09 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. Looks good! I appreciate the refactoring of recordNullabilitySeen Repository: rL LLVM https://reviews.llvm.org/D26108 ___ cfe-commit

[PATCH] D25850: Accept nullability annotations (_Nullable) on array parameters

2016-11-09 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. This is looking great, Jordan. Repository: rL LLVM https://reviews.llvm.org/D25850 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D26226: Don't require nullability on template parameters in typedefs.

2016-11-01 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. Seem fine; I'd rename the "FIXME" to a "Note" unless you're going to pass a flag to Type::canHaveNullability to say how to classify dependent types. Repository: rL LLVM https://r

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

2016-09-12 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. Yep, this refactor looks good! https://reviews.llvm.org/D24059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

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

2016-09-12 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. Ahhh, much cleaner. Thanks! https://reviews.llvm.org/D23080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

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

2016-09-12 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. This looks great, thank you! https://reviews.llvm.org/D23079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

Re: [PATCH] D23852: [SemaObjC] Fix crash while parsing type arguments and protocols

2016-09-12 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. I don't love the fact that it makes callers fragile, but having to do tentative parsing for these otherwise-unambiguous cases is expensive (in compile time). We should only use tenta

Re: [PATCH] D23852: [SemaObjC] Fix crash while parsing type arguments and protocols

2016-08-25 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. This will work, but it's *really* unfortunate to put tentative parsing into this code path because tentative parsing is far from free, and specialized Objective-C types are getting pretty common in Objective-C headers. Why can't the callers be taught to handle EOF a

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

2016-08-23 Thread Doug Gregor via cfe-commits
doug.gregor added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:1037 @@ -1036,1 +1036,3 @@ +DEF_TRAVERSE_TYPE(ObjCTypeParamType, {}) + manmanren wrote: > doug.gregor wrote: > > I'm sorta shocked that we don't visit the protocol qualifiers

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

2016-08-19 Thread Doug Gregor via cfe-commits
doug.gregor requested changes to this revision. doug.gregor added a comment. This revision now requires changes to proceed. I think most of the complexity here will fold away when ObjCTypeParamType becomes sugar for the underlying ObjCObjectPointerType. Comment at: lib/AST/Type

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

2016-08-19 Thread Doug Gregor via cfe-commits
doug.gregor requested changes to this revision. doug.gregor added a comment. This revision now requires changes to proceed. A couple of comments above, but this is looking very good. Comment at: include/clang/AST/RecursiveASTVisitor.h:1037 @@ -1036,1 +1036,3 @@ +DEF_TRAVERSE_T

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

2016-08-19 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. This refactor LGTM. https://reviews.llvm.org/D23078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-19 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D22392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D22248: [Sema] Create a separate group for incompatible function pointer warning

2016-07-14 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D22248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-14 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. A bunch of comments above. This needs much more extensive testing, because there are numerous paths through the ternary operator code and the results need to be symmetric. Comment at: lib/Sema/SemaExpr.cpp:7007 @@ +7006,3 @@ +/// expression. +stati

Re: [PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2016-07-14 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. I think this check should go into SemaChecking.cpp https://reviews.llvm.org/D22391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-05-31 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. Yes, that's a LGTM, sorry for being unclear. http://reviews.llvm.org/D20383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2016-05-30 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. Yeah, this looks like the right approach. PCH follows the same rules as modules when it comes to newer information shadowing imported information. http://reviews.llvm.org/D20383 ___ cfe-commits mailing list cfe-commits@

Re: [PATCH] D20451: [Parser] Fix look ahead after EOF while parsing objc message and lambdas

2016-05-27 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM, sorry for the delay! http://reviews.llvm.org/D20451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

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

2016-04-29 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM! http://reviews.llvm.org/D19679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

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

2016-04-29 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. Mostly looks good, but see my comment about MapVector invalidation. Comment at: lib/Serialization/ASTWriter.cpp:4394 @@ +4393,3 @@ + // date, so we need to pull in the new content here. + for (auto &SelectorAndID : SelectorIDs) +SemaRef.updateO

Re: [PATCH] D19443: Module Debugging: Fix the condition for determining whether a template instantiation is in a module.

2016-04-25 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. Yeah, this LGTM. Repository: rL LLVM http://reviews.llvm.org/D19443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

Re: [PATCH] D18823: Implementation of VlA of GNU C++ extension

2016-04-11 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. I think it's completely reasonable to implement support for VLAs as a GNU C++ extension. We did go through a phase where we tried to avoid implementing VLAs in C++ because we considered them to be a poor feature in C++. However, their use was wide-spread enough that

Re: [PATCH] D18709: Add copyright notice to modulemap files

2016-04-02 Thread Doug Gregor via cfe-commits
doug.gregor added a subscriber: doug.gregor. doug.gregor accepted this revision. doug.gregor added a reviewer: doug.gregor. doug.gregor added a comment. This revision is now accepted and ready to land. Yes, this is acceptable. Please go ahead and commit. http://reviews.llvm.org/D18709 ___

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

2016-03-09 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D15314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-24 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM, sorry for the delay. http://reviews.llvm.org/D17355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

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

2016-02-16 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. The approach and patch look okay to me, but can we give "UnavailableCheck" a less ambiguous name? For example, "TreatUnavailableAsInvalid"? http://reviews.llvm.org/D15314 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D16906: [Parser] Perform CachedTokens update dependent on token consume request

2016-02-04 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This revision is now accepted and ready to land. LGTM! http://reviews.llvm.org/D16906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2016-01-28 Thread Doug Gregor via cfe-commits
doug.gregor accepted this revision. doug.gregor added a comment. This approach looks great to me. http://reviews.llvm.org/D15173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15729: Load compiler plugins in ASTUnit, too

2015-12-24 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. It looks good. Are you able to include a test for this? http://reviews.llvm.org/D15729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15490: [libclang] Add a flag to create the precompiled preamble on the first parse.

2015-12-14 Thread Doug Gregor via cfe-commits
doug.gregor added a comment. For reference, you can test this by setting the environment variable LIBCLANG_TIMING in your test, and checking that the string "Precompiling preamble" shows up on first parse. http://reviews.llvm.org/D15490 ___ cfe-co