[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Just to be clear, this is just a syntactic change from what I originally posted. The old `#pragma clang attribute push NoReturn (...)` is semantically equivalent to the new `#pragma clang attribute NoReturn.push (...)` CHANGES SINCE LAST ACTION https://review

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3492 +def warn_ignored_objc_externally_retained : Warning< + "'objc_externally_retained' can only be applied to strong retainable " + "object pointer types with automatic storage

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 178928. erik.pilkington marked 10 inline comments as done. erik.pilkington added a comment. Address @aaron.ballman comments, rebase onto r349535. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55865/new/ https://reviews.llvm.org/D5586

[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 178952. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Add Aaron's testcase, improve the documentation a bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55628/new/ https://reviews.llvm.org/D55628 Files

[PATCH] D55628: Add support for "labels" on push/pop directives in #pragma clang attribute

2018-12-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:3161 + if (!Tok.is(tok::period)) { +PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_period) +<< II; aaron.ballman wrote: > Can you reuse `di

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 179137. erik.pilkington marked 8 inline comments as done. erik.pilkington added a comment. Address some review comments. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55865/new/ https://reviews.llvm.org/D55865 Files: clang/include

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3492 +def warn_ignored_objc_externally_retained : Warning< + "'objc_externally_retained' can only be applied to strong retainable " + "object pointer types with automatic storage

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/AST/Expr.cpp:2281-2286 + // If there is no FunctionDecl for the call, check the return type of the + // callee to see if it

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/test/SemaObjC/externally-retained.m:14 + + EXT_RET int (^d)() = ^{return 0;}; + EXT_RET ObjCTy *e = 0; aaron.ballman wrote: > Should this be useful for function pointer parameters as well? e.g., > ``` > t

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 179196. erik.pilkington marked 5 inline comments as done. erik.pilkington added a comment. Add some more Sema tests as per Aaron's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55865/new/ https://reviews.llvm.org/D55865 Files: c

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2019-01-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. Still LG, sorry for the delay! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55949/new/ https://reviews.llvm.org/D55949 __

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 179964. erik.pilkington marked 10 inline comments as done. erik.pilkington added a comment. Address review comments. Also, make the attribute apply to parameters via the function declaration instead to parameters directly. i.e.: __attribute__((objc

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3787 +variable goes out of scope. Parameters and variables annotated with this +attribute are implicitly ``const``. + rjmccall wrote: > You should add a paragraph contrasting

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 180131. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Address John's comments. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55865/new/ https://reviews.llvm.org/D55865 Files: clang/docs/Automat

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/docs/AutomaticReferenceCounting.rst:1779 +externally-retained, unless the variable was explicitly qualified with +``__strong``. For instance, ``first_param`` is externally-r

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 180154. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Remove support for parameter indices. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55865/new/ https://reviews.llvm.org/D55865 Files: clang/docs/Au

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2019-01-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 180196. erik.pilkington marked 3 inline comments as done. erik.pilkington added a comment. Mention `__has_attribute` and the ignored without -fobjc-arc thing. @aaron.ballman: Do you have any more thoughts here? CHANGES SINCE LAST ACTION https://re

[PATCH] D56405: Split -Wdelete-non-virtual-dtor into two groups

2019-01-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman. Herald added subscribers: dexonsmith, jkorous. `-Wdelete-non-virtual-dtor` controlled two diagnostics: 1) calling a non-virtual dtor from an abstract class, and 2) calling a non-virtual dtor from a pol

[PATCH] D56405: Split -Wdelete-non-virtual-dtor into two groups

2019-01-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington reopened this revision. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. This revision is now accepted and ready to land. I reverted my commit in r350639. Comment at: include/clang/Basic/DiagnosticGroups.td:108-109 def DeleteNo

[PATCH] D56405: Split -Wdelete-non-virtual-dtor into two groups

2019-01-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 180690. erik.pilkington added a comment. This revision is now accepted and ready to land. Split -Wdelete-non-virtual-dtor into -Wdelete-non-abstract-non-virtual-dtor and -Wdelete-abstract-non-virtual-dtor. CHANGES SINCE LAST ACTION https://reviews

[PATCH] D56469: [ObjC] Allow the use of implemented unavailable methods from within the @implementation context

2019-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:7290 + // when it's actually defined and is referenced from within the + // @implementation itself. + if (const auto *MD = dyn_cast(OffendingDecl)) { Maybe add a sentence:

[PATCH] D56469: [ObjC] Allow the use of implemented unavailable methods from within the @implementation context

2019-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56469/new/ https://reviews.llvm.org/D56469 ___

[PATCH] D56523: Improve a -Wunguarded-availability note

2019-01-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: arphaman. Herald added subscribers: dexonsmith, jkorous. Mention the deployment target, and don't say "partial" which doesn't really mean anything to users. rdar://problem/33601513 Repository: rC Clang https://reviews.

[PATCH] D56523: Improve a -Wunguarded-availability note

2019-01-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/test/Sema/availability-guard-format.mm:6 @interface foo -- (void) method_bar __attribute__((availability(macosx, introduced = 10_12))); // expected-note {{'method_bar' has

[PATCH] D56523: Improve a -Wunguarded-availability note

2019-01-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 181130. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Fix some triples in the tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56523/new/ https://reviews.llvm.org/D56523 Files: clang/include/clang/

[PATCH] D56523: Improve a -Wunguarded-availability note

2019-01-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/test/Sema/availability-guard-format.mm:6 @interface foo -- (void) method_bar __attribute__((availability(macosx, introduced = 10_12))); // expected-note {{'method_bar' has been explicitly marked partial here}} +- (void) m

[PATCH] D66856: [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

2019-09-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 219598. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66856/new/ https://reviews.llvm.org/D66856 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/AST/Expr.cpp

[PATCH] D66856: [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

2019-09-11 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D66856#116 , @aaron.ballman wrote: > The reflector discussion is still happening and there are issues with > ambiguities that we are pretty sure we want to correct. I've got a paper out > that touches on some of t

[PATCH] D66856: [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

2019-09-11 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 219815. erik.pilkington marked 6 inline comments as done. erik.pilkington added a comment. Update the diagnostic text. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66856/new/ https://reviews.llvm.org/D66856 Files: clang/include/clang/Bas

[PATCH] D67559: [Sema] Split of versions of -Wimplicit-{float,int}-conversion for Objective-C BOOL

2019-09-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, steven_wu, aaron.ballman. Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang. Also, add a diagnostic group, -Wobjc-signed-char-bool, to control all these related diagnostics. See

[PATCH] D67559: [Sema] Split of versions of -Wimplicit-{float,int}-conversion for Objective-C BOOL

2019-09-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3312 +def warn_impcast_float_to_objc_signed_char_bool : Warning< + "implicit conversion from floating-point type %0 to BOOL">, + InGroup; aaron.ballman wrote: >

[PATCH] D67559: [Sema] Split of versions of -Wimplicit-{float,int}-conversion for Objective-C BOOL

2019-09-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 220534. erik.pilkington marked 5 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67559/new/ https://reviews.llvm.org/D67559 Files: clang/include/clang/Basic/

[PATCH] D67559: [Sema] Split of versions of -Wimplicit-{float,int}-conversion for Objective-C BOOL

2019-09-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/test/Sema/objc-bool-constant-conversion-fixit.m:37 + + b = 1 ? 2 : 3; + // CHECK: b = 1 ? 2 ? YES : NO : 3 ? YES : NO; aaron.ballman wrote: > What about:

[PATCH] D66856: [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

2019-09-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66856/new/ https://reviews.llvm.org/D66856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D67775: [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

2019-09-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: aaron.ballman. Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang. The warnings now in -Wformat-type-confusion don't align with how we interpret 'pedantic' in clang, and don't belong in `-

[PATCH] D67935: Add `#pragma clang deprecated`, used to deprecate macros

2019-09-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman. Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang. This patch adds support for `#pragma clang deprecated`, which emits a deprecated warning whenever it is encountere

[PATCH] D67935: Add `#pragma clang deprecated`, used to deprecate macros

2019-09-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington planned changes to this revision. erik.pilkington added a comment. Marking as "planned changes" to get this out of review queues. Aaron Ballman wants to add "macro attributes", which would be a better way of solving this problem, and is going to ask the C and C++ committees if th

[PATCH] D66696: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2019-09-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. Okay, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66696/new/ https://reviews.llvm.org/D66696 ___ cfe-commits m

[PATCH] D67775: [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

2019-10-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67775/new/ https://reviews.llvm.org/D67775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D67775: [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

2019-10-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/test/Sema/format-strings-pedantic.c:1 -// RUN: %clang_cc1 -fsyntax-only -verify -Wformat -Wformat-pedantic -isystem %S/Inputs %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wformat -Wformat-type-confusion %s -

[PATCH] D67775: [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

2019-10-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 223136. erik.pilkington marked 6 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67775/new/ https://reviews.llvm.org/D67775 Files: clang/include/clang/AST/Fo

[PATCH] D45451: [ItaniumMangle] Undeduced auto type doesn't belong in the substitution table

2018-04-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 142402. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Add an ABI compatibility guard. Thanks! https://reviews.llvm.org/D45451 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/CodeGenCXX/lambda-expressions-in

[PATCH] D45699: [Availability] Improve availability to consider functions run at load time

2018-04-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Steven, thanks for working on this! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2916 + "ignoring availability attribute %select{on '+load' method|" + "with constructor attribute|with desctructor attribute}0">, + InGroup; ---

[PATCH] D45699: [Availability] Improve availability to consider functions run at load time

2018-04-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: lib/Sema/SemaDecl.cpp:9134-9151 + // Diagnose availability attributes. Availability cannot be used on functions + // that are ru

[PATCH] D45451: [ItaniumMangle] Undeduced auto type doesn't belong in the substitution table

2018-04-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 143469. erik.pilkington added a comment. Add a comment. https://reviews.llvm.org/D45451 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/CodeGenCXX/lambda-expressions-inside-auto-functions.cpp Index: clang/test/CodeGenCXX/lambda-expressions-i

[PATCH] D45451: [ItaniumMangle] Undeduced auto type doesn't belong in the substitution table

2018-04-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:2342 + if (isa(Ty)) +return false; return true; rjmccall wrote: > rjmccall wrote: > > rjmccall wrote: > > > I agree with your analysis that this shouldn't be a substitution

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-06-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! If it'd make this easier to review, I'd be happy to split this up a bit. https://reviews.llvm.org/D46845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-06-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Volodymyr, thanks for working on this! Comment at: libcxx/include/memory:1479 +struct __has_construct_missing +: false_type +{ Shouldn't this be true_type? Comment at: libcxx/include/memory:1673-1677 +

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-06-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: libcxx/include/memory:1479 +struct __has_construct_missing +: false_type +{ vsapsai wrote: > erik.pilkington wrote: > > Shouldn't this be true_type? > I see this is confusing and I'm still struggling how to e

[PATCH] D48322: [Sema] Discarded statment should be an evaluatable context

2018-06-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Herald added a subscriber: dexonsmith. Ping! Repository: rC Clang https://reviews.llvm.org/D48322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48322: [Sema] Discarded statment should be an evaluatable context

2018-07-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D48322#1148424, @rsmith wrote: > Hmm, so this will mean that we can have internal linkage declarations marked > `Used` for which there is no definition, and we need to not warn on that. > > I think it might be better to avoid marking t

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 153964. erik.pilkington added a comment. Herald added a subscriber: dexonsmith. Split this up. I'm moving the `merge` stuff to a follow-up, that makes this diff a lot easier to read. https://reviews.llvm.org/D46845 Files: libcxx/include/__hash_ta

[PATCH] D48896: [libcxx][c++17] P0083R5: Splicing Maps and Sets Part 2: merge

2018-07-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: EricWF, mclow.lists. Herald added subscribers: dexonsmith, ldionne, christof. This was originally part of https://reviews.llvm.org/D46845, but I decided to split it out to clean up the diff. From that patch's description: >

[PATCH] D49085: [Sema] Emit a diagnostic for an invalid dependent function template specialization

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, rsmith. Herald added a subscriber: dexonsmith. Previously, clang marked a decl as invalid without emitting a diagnostic. This lead to an assert in CodeGen for the attached test case. rdar://41806724 Thanks for tak

[PATCH] D48506: Fix for Crash in nested name specifier decltype

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Balaji, thanks for working on this! Comment at: lib/Sema/SemaCXXScopeSpec.cpp:849-850 QualType T = BuildDecltypeType(DS.getRepAsExpr(), DS.getTypeSpecTypeLoc()); + if (T.getTypePtrOrNull() == nullptr) + return true; if (!T->isDepe

[PATCH] D48506: Fix for Crash in nested name specifier decltype

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a subscriber: rtrieu. erik.pilkington added a comment. Looks like @rtrieu beat you to the punch in r336475! Presumably thats why the test case wasn't failing on TOT. Since this is already fixed, you should mark this revision as abandoned. Repository: rC Clang https://r

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman, arphaman. Herald added a subscriber: dexonsmith. This warning tries to catch programs that incorrectly call memset with the second and third arguments transposed, ie `memset(ary, sizeof(ary), 0)` instea

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 154833. erik.pilkington added a comment. Address @Quuxplusone comments. https://reviews.llvm.org/D49112 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaChecking.cpp cla

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:662 +def note_suspicious_sizeof_memset_silence : Note< + "%select{parenthesize the third argument|cast the second argument to 'int'}0 to silence">; + Quuxplusone

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-10 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: ldionne. erik.pilkington added a comment. Ping! https://reviews.llvm.org/D46845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: libcxx/include/__hash_table:2165 +#if _LIBCPP_STD_VER > 14 +template +template ldionne wrote: > When a function is declared with a visibility macro > (`_LIBCPP_INLINE_VISIBILITY` in this case), I think it is c

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington planned changes to this revision. erik.pilkington added a comment. In https://reviews.llvm.org/D49112#1158793, @thakis wrote: > lgtm assuming you ran this on some large code base to make sure it doesn't > have false positives. Sorry for the delay here, I was running this on som

[PATCH] D49439: [Sema] Fix a crash while converting constructors to deduction guides

2018-07-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: rsmith. Herald added a reviewer: javed.absar. Herald added subscribers: dexonsmith, kristof.beyls. The problem was with constructors that have parameters that refer to previous ones, such as `D` below: template struct A

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 156178. erik.pilkington marked 5 inline comments as done. erik.pilkington added a comment. This revision is now accepted and ready to land. In this new patch: - Add support for __builtin_bzero (-Wsuspicious-bzero), improve diagnostics for platforms t

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-18 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7984 + if (isa(ThirdArg) && + cast(ThirdArg)->getValue() == 0) { +WarningKind = 0; Quuxplusone wrote: > > Suppress the diagnostic in cases like `memset(ptr, 0xff, PADDING

[PATCH] D34096: [Sema][C++1z] Ensure structured binding's bindings in dependent foreach have non-null type

2019-10-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG21ff345d64b9: [Sema][C++1z] Ensure binding in dependent range for have non-null type (authored by erik.pilkington). Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang.

[PATCH] D76782: [CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a non-trivial C struct

2020-04-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 255385. erik.pilkington marked 3 inline comments as done. erik.pilkington added a comment. Don't bother including zero length bit-fields in the mangling of the copy/destroy helpers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76782/new/ h

[PATCH] D76782: [CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a non-trivial C struct

2020-04-06 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd33c7de8e11f: [CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D77586: Allow parameter names to be elided in a function definition in C

2020-04-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. > This also adds the same feature to ObjC blocks under the assumption that ObjC > wishes to follow the C standard in this regard. SGTM - thats generally been the idea for blo

[PATCH] D76323: [AST] Fix handling of long double and bool in __builtin_bit_cast

2020-04-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76323/new/ https://reviews.llvm.org/D76323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D74813: [RFC] Add hash of block contents to function block names

2020-04-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. What do you think about using the block type instead of a hash? That should be stable across compiler versions, changes to the block body, and changes to referenced declarations. You'd still have to number blocks of the same type within the same function, but th

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/AST/DeclObjCCommon.h:21 +/// Keep this list in sync with LLVM's Dwarf.h ApplePropertyAttributes. +enum ObjCPropertyAttributeKind { + OBJC_PR_noattr = 0x00, plotfi wrote: > plotfi wrote: > > c

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM (after fixing those tests). Thanks for cleaning this up! Comment at: clang/tools/c-index-test/c-index-test.c:1107 PRINT_PROP_ATTR(unsafe_unret

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington requested changes to this revision. erik.pilkington added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang-c/Index.h:4503 CXObjCPropertyAttr_unsafe_unretained = 0x800, - CXObjCPropertyAttr_class = 0x1000 + CXObjC

[PATCH] D78066: [SemaObjC] Forbid storing an unboxed integer literal in an NSNumber

2020-04-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, bendjones, arphaman. Herald added subscribers: ributzka, dexonsmith, jkorous. This fixes a common mistake (the 3 should be @3): `NSNumber *n = 3`. This extends an existing check for NSString. Also, this only errs if

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang-c/Index.h:4503 CXObjCPropertyAttr_unsafe_unretained = 0x800, - CXObjCPropertyAttr_class = 0x1000 + CXObjCPropertyAttr_classattr = 0x1000 } CXObjCPropertyAttrKind; plotfi wrote: > erik.pi

[PATCH] D76323: [AST] Fix handling of long double and bool in __builtin_bit_cast

2020-04-15 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76323/new/ https://reviews.llvm.org/D76323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D74417: [clang][ARC] Remove invalid assertion that can crash clangd

2020-06-08 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8b529e311a90: [ObjC] Fix AST serialization for pseudo-strong parameters (authored by dgoldman, committed by erik.pilkington). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D80360: [PCH] Support writing BuiltinBitCastExprs to PCHs

2020-06-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM (after a minor comment), thank you for fixing this! Comment at: clang/lib/Serialization/ASTReaderStmt.cpp:3598 + S = new (Context) BuiltinBitCastE

[PATCH] D80360: [PCH] Support writing BuiltinBitCastExprs to PCHs

2020-06-11 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG95d7ccb70b9c: [PCH] Support writing BuiltinBitCastExprs to PCHs (authored by hyd-dev, committed by erik.pilkington). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D81751: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator

2020-06-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: rjmccall. Herald added subscribers: ributzka, dexonsmith, jkorous. We were previously bypassing the conditional expression special case for binary conditional expressions. Also, dig through the OpaqueValueExpr on the left of

[PATCH] D77592: [clang] Frontend components for the relative vtables ABI

2020-06-15 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/ConstantInitBuilder.cpp:132 + return getRelativeOffsetToPosition(offsetType, target, + Builder.SelfReferences.size()); +} Shouldn't this be `Builder.Buffer.s

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D82611#2125868 , @MadCoder wrote: > So the risk with that one is that if someone had say the `-didSomething` > direct selector and that some UIKit/Apple SDK API now adds this as a thing > that you use with CFNotificati

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 275759. erik.pilkington marked 3 inline comments as done. erik.pilkington added a comment. Add an off-by-default variant of this warning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82611/new/ https://reviews.llvm.org/D82611 Files: clan

[PATCH] D81751: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator

2020-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: ahatanak. erik.pilkington added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81751/new/ https://reviews.llvm.org/D81751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7437a9496528: [SemaObjC] Add a warning for @selector expressions that potentially refer to… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D81751: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator

2020-07-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG2f71cf6d77c5: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional… (authored by erik.pilkingto

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. erik.pilkington marked an inline comment as done. Closed by commit rG7437a9496528: [SemaObjC] Add a warning for @selector expressions that po

[PATCH] D81751: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator

2020-07-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG2f71cf6d77c5: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional… (authored by erik.pilkingto

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-06-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, MadCoder. Herald added subscribers: ributzka, dexonsmith, jkorous. As a heuristic, only warn if the selector matches a method declared in the current interface. rdar://64621668 https://reviews.llvm.org/D82611 Fi

[PATCH] D76323: [AST] Fix handling of long double and bool in __builtin_bit_cast

2020-06-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping, @rsmith did you want to take another look at this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76323/new/ https://reviews.llvm.org/D76323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D82823: canonicalize macOS 10.16 availability to macOS 11 while preserving uses of if @available macOS 10.16

2020-06-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, after mine and Aaron's comments. Comment at: clang/lib/Sema/SemaExpr.cpp:19195-19211 +if (Spec == AvailSpecs.end()) + return None; +if (P

[PATCH] D78066: [SemaObjC] Forbid storing an unboxed integer literal in an NSNumber

2020-04-20 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG85cca945b4c9: [SemaObjC] Forbid storing an unboxed integer literal in an NSNumber (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D74813: [RFC] Add hash of block contents to function block names

2020-04-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. The demangler changes should also be made in `libcxxabi/src/demangle`, as there is a copy of the demangler there. This change also needs tests, there should be demangler tests (in libcxxabi/test/test_demangle.cpp), and IRGen tests (in clang/test/CodeGen) that ch

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, again :) Thanks for cleaning this up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77233/new/ https://reviews.llvm.org/

[PATCH] D78660: [SemaObjC] Add a warning for dictionary literals with duplicate keys

2020-04-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, bendjones. Herald added subscribers: ributzka, dexonsmith, jkorous. Duplicate keys in a literal break NSDictionary's invariants. Fixes rdar://50454461 Repository: rC Clang https://reviews.llvm.org/D78660 Files

[PATCH] D74813: [RFC] Add hash of block contents to function block names

2020-04-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/AST/Mangle.cpp:41 + for (ParmVarDecl *PVD : BD->parameters()) { +Context.mangleTypeName(PVD->getType(), Out); + } >>! In D74813#1996143, @alexbdv wrote: > @dexonsmith, @erik.pilkington - how about

[PATCH] D79012: [AST] Fix a crash on a dependent vector_size attribute

2020-04-28 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: erichkeane, aaron.ballman. Herald added subscribers: ributzka, dexonsmith, jkorous. Looks like this was just a copy & paste mistake from `getDependentSizedExtVectorType`. rdar://60092165 Repository: rC Clang https://rev

[PATCH] D79012: [AST] Fix a crash on a dependent vector_size attribute

2020-04-28 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2bb686b4b629: [AST] Fix a crash on a dependent vector_size attribute (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D79094: [SemaObjC] Warn on visibility attributes on an @implementation

2020-04-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, aaron.ballman. Herald added subscribers: ributzka, dexonsmith, jkorous. D60542 added support for attributes on `@implementation`s, but CodeGen always looks for visibility attributes

<    1   2   3   4   5   6   >