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

2020-04-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington edited reviewers, added: rjmccall; removed: libc++abi. erik.pilkington added a comment. In D74813#2010767 , @alexbdv wrote: > @erik.pilkington would the hash-based numbering be OK for now ? Feel free to drop the demangler changes for now,

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

2020-05-01 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/D78660/new/ https://reviews.llvm.org/D78660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

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

2020-05-05 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaExprObjC.cpp:948 +checkOneKey(IntegralKeys, Result.Val.getInt(), Loc); + } +} bendjones wrote: > rjmccall wrote: > > Does `Eva

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

2020-05-05 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG873e27909539: [SemaObjC] Add a warning for dictionary literals with duplicate keys (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

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

2020-05-06 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: Function block naming - add hash of parameter type to end of block name

2020-05-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D74813#2035051 , @alexbdv wrote: > Could I please get a review on this ? Thanks :) ! I still think it makes more sense to directly encode the type instead of hashing it. I'm happy to make the demangler changes for wha

[PATCH] D40372: [ExprConstant] Fix assert when initializing constexpr array

2017-11-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Previously, clang would assert on the following: struct S { constexpr S (const int& ir = 0) {} }; constexpr S foo[2]; The problem was that while initializing foo, CallStackFrame::createTemporary() was called twice for the MaterializeTemporaryExpr

[PATCH] D40284: [Sema] Improve diagnostics for template arg deduction

2017-11-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. This looks correct, but I definitely agree that RAII would make this a lot nicer. Have you considered adding a `CancelableSaveAndRestore` or something to SaveAndRestore.h? It seems useful and generic enough to make it worthwhile. Otherwise, you could just write

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi, thanks for working on this! Can you add tests to make sure that this also works with switch statements (which also have this bug), and not with while? Also, it makes it a lot easier to review these patches if you add context lines to the diff. Thanks, Erik

[PATCH] D40566: Check if MemberExpr arguments are type-dependent.

2017-11-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi, thanks for working on this! Why don't we just set the TypeDependent bit to false when building the underlying MemberExpr here? Based on the section of the standard you quoted that node shouldn't be considered type-dependent, but it is by clang. I think this

[PATCH] D40372: [ExprConstant] Fix assert when initializing constexpr array

2017-12-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D40372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D66622: [Bugfix] fix r369705 unit test

2019-08-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, thanks for fixing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66622/new/ https://reviews.llvm.org/D66622

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

2019-08-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, Nathan-Huckleberry. Herald added subscribers: ributzka, dexonsmith, jkorous. Herald added a project: clang. Instead, emit them under -Wformat-pedantic. This is particularly important for us because we have a lo

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

2019-08-28 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D66856#1648809 , @aaron.ballman wrote: > I'm wondering whether this should even warn pedantically. There are no format > specifiers that apply directly to a `_Bool` datatype, so the user is left > making a choice as t

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

2019-09-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. I'm a bit curious about clients that use `getCanonicalType()` to get a full desugaring, instead of doing a single step. It seems like they'd still get the out of date type parameter type. Has that ever worked? CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos

2017-08-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Previously, the presence of `__attribute__((availability(macos, ...)))` on a declaration caused clang to make the vis of that decl implicitly default. This is a hack that is incomparable with how we're treating availability attributes now, and should be re

[PATCH] D36200: [Sema] Improve some -Wunguarded-availability diagnostic messages

2017-08-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch improves the decl-level unguarded availability warnings to use the same messages as the function-level ones. This makes the diagnostic have different parameters than deprecated/unavailable, so I moved some things around in DoEmitAvailabilityWarn

[PATCH] D36200: [Sema] Improve some -Wunguarded-availability diagnostic messages

2017-08-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D36200#829104, @arphaman wrote: > This needs a test for the fixits as well, see test/FixIt/fixit-availability* Why? This patch doesn't change the behavior of the fixits, so there isn't any new behavior to test. https://reviews.llvm

[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

2017-08-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. This patch changes the demangler so that it represents substitutions/templates more linearly. Previously, substitions were represented by a `vector>` and template parameter substitutions by a `vector>>`! I wrote a comment in SubTable describing how this i

[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

2017-08-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: src/cxa_demangle.cpp:1575-1577 -sub_type names; -template_param_type subs; -Vector template_param; dexonsmith wrote: > - Why not rename `names` as well? > - Please rename these in a separate prep comm

[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

2017-08-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 110281. erik.pilkington marked 14 inline comments as done. erik.pilkington added a comment. Address review comments. Thanks! Erik https://reviews.llvm.org/D36427 Files: src/cxa_demangle.cpp test/unittest_demangle.pass.cpp Index: test/unittest_d

[PATCH] D36200: [Sema] Improve some -Wunguarded-availability diagnostic messages

2017-08-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D36200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36777: [Sema] Don't emit -Wunguarded-availability for switch cases

2017-08-15 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. Currently, this has pretty terrible ergonomics for the fairly common case of switching over an enum which has some entries that are partial. Thanks to Nico Weber for pointing this out! Thanks, Erik https://reviews.llvm.org/D36777 Files: lib/Sema/SemaD

[PATCH] D36492: [time-report] Add preprocessor timer

2017-08-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. This looks really usefull, thanks for working on this! Comment at: lib/Lex/Preprocessor.cpp:746 void Preprocessor::Lex(Token &Result) { + llvm::TimeRegion(PPOpts->getTimer()); + Doesn't this just start a timer and immediately

[PATCH] D36777: [Sema] Don't emit -Wunguarded-availability for switch cases

2017-08-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 111528. erik.pilkington added a comment. Ah, good point. This new patch does that. Thanks, Erik https://reviews.llvm.org/D36777 Files: lib/Sema/SemaDeclAttr.cpp test/SemaObjC/unguarded-availability.m Index: test/SemaObjC/unguarded-availability

[PATCH] D86854: [CodeGen] Make sure the EH cleanup for block captures is conditional when the block literal is in a conditional context

2020-08-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: ahatanak, rjmccall. Herald added subscribers: danielkiss, ributzka, dexonsmith, jkorous. erik.pilkington requested review of this revision. Previously, clang was crashing on the attached test because the EH cleanup for the bl

[PATCH] D86854: [CodeGen] Make sure the EH cleanup for block captures is conditional when the block literal is in a conditional context

2020-08-31 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa9a6e62ddff2: [CodeGen] Make sure the EH cleanup for block captures is conditional when the… (authored by erik.pilkington). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.o

[PATCH] D86881: Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin

2020-08-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: arphaman. Herald added subscribers: dang, ributzka, dexonsmith, jkorous. erik.pilkington requested review of this revision. This effectively disables https://reviews.llvm.org/D50968 on Darwin, and provides a command line fla

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

2020-09-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington requested review of this revision. erik.pilkington added a comment. @aaron.ballman: Did you happen to get any feedback on macro attributes? There are a growing number of macros that we'd like to be able to deprecate, and having a workable solution would be useful for us. Reposi

[PATCH] D86881: Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin

2020-09-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd46f2c51e4c8: Make -fvisibility-inlines-hidden apply to static local variables in inline… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2020-09-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9523cf02c22a: [AST] Fix handling of long double and bool in __builtin_bit_cast (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D87102: [Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once

2020-09-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, ahatanak, fhahn. Herald added subscribers: ributzka, dexonsmith, jkorous. erik.pilkington requested review of this revision. Previously, this code discarded the result of CheckPlaceholderExpr for non-matrix subexpre

[PATCH] D87102: [Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once

2020-09-03 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0f1be87e2947: [Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling… (authored by erik.pilkington). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D871

[PATCH] D93247: [Sema] Fix a miscompile by retaining array qualifiers when folding VLAs to constant arrays

2020-12-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, rjmccall, arphaman. Herald added subscribers: ributzka, jkorous. erik.pilkington requested review of this revision. Fixes rdar://72243125. https://reviews.llvm.org/D93247 Files: clang/lib/Sema/SemaDecl.cpp clang

[PATCH] D93247: [Sema] Fix a miscompile by retaining array qualifiers when folding VLAs to constant arrays

2020-12-16 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG95b2dab19910: [Sema] Fix a miscompile by retaining array qualifiers when folding VLAs to… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 302733. erik.pilkington marked 20 inline comments as done. erik.pilkington added a comment. Address review comments, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188/new/ https://reviews.llvm.org/D90188 Files: clang/include/cla

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-03 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:3801 +/// error. +class UnresolvedUsingIfExistsDecl final : public NamedDecl { + UnresolvedUsingIfExistsDecl(DeclContext *DC, SourceLocation Loc, aaron.ballman wrote: > Why is t

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked 3 inline comments as done. erik.pilkington added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:3801 +/// error. +class UnresolvedUsingIfExistsDecl final : public NamedDecl { + UnresolvedUsingIfExistsDecl(DeclContext *DC, SourceLocation Loc

[PATCH] D90871: [Sema] Fold VLAs to constant arrays in a few more contexts

2020-11-05 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, rjmccall, arphaman. Herald added subscribers: ributzka, jkorous. erik.pilkington requested review of this revision. D89523 removed support for promoting VLAs to constant arrays when t

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-13 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 305193. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Herald added a subscriber: jdoerfert. Add support for C++11-style attributes on using-declarations. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188

[PATCH] D90871: [Sema] Fold VLAs to constant arrays in a few more contexts

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

[PATCH] D90871: [Sema] Fold VLAs to constant arrays in a few more contexts

2020-11-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 305506. erik.pilkington added a comment. Use a bit on Declarator instead of an ad-hoc bool parameter. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90871/new/ https://reviews.llvm.org/D90871 Files: clang/include/clang/Sema/DeclSpec.h cl

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 305788. erik.pilkington marked 6 inline comments as done. erik.pilkington added a comment. Split off parsing support for C++ attributes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188/new/ https://reviews.llvm.org/D90188 Files: clang

[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations

2020-11-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, rsmith, ldionne, Mordante. Herald added subscribers: jdoerfert, ributzka, jkorous. erik.pilkington requested review of this revision. This is split off from D90188 . https://re

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D90188#2397441 , @aaron.ballman wrote: > FWIW, it'd be a bit easier if those changes were split off into their own > patch, as they're orthogonal to `using_if_exists`. Ok, I moved this part to: https://reviews.llvm.or

[PATCH] D89475: [SemaObjC] Fix composite pointer type calculation for `void*` and pointer to lifetime qualified ObjC pointer type

2020-10-15 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, rjmccall. Herald added subscribers: ributzka, dexonsmith, jkorous. erik.pilkington requested review of this revision. This fixes a regression introduced in 9a6f4d451ca7aa06b94a407015fbadb456bc09ef

[PATCH] D89475: [SemaObjC] Fix composite pointer type calculation for `void*` and pointer to lifetime qualified ObjC pointer type

2020-10-15 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG351317167e2b: [SemaObjC] Fix composite pointer type calculation for `void*` and pointer to… (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations

2020-11-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 307669. erik.pilkington marked 6 inline comments as done. erik.pilkington added a comment. Herald added a subscriber: dexonsmith. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91630/new/ https://reviews.llvm.org/D916

[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations

2020-11-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D91630#235 , @aaron.ballman wrote: > Can you mention this change in the release notes? Also, should we document it > explicitly in the Language Extensions documentation, or do you think this is > too tiny of a fea

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 307670. erik.pilkington marked 4 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90188/new/ https://reviews.llvm.org/D90188 Files: clang/include/clang/AST/De

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-11-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1704-1707 +void ASTDeclReader::VisitUnresolvedUsingIfExistsDecl( +UnresolvedUsingIfExistsDecl *D) { + VisitNamedDecl(D); +} aaron.ballman wrote: > I'm not super fami

[PATCH] D90871: [Sema] Fold VLAs to constant arrays in a few more contexts

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

[PATCH] D92354: [clang] add a new `swift_attr` attribute

2020-12-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Do we need to add APINotes support for this? Comment at: clang/include/clang/Basic/Attr.td:2155 + let Args = [StringArgument<"Attribute">]; + let Documentation = [SwiftAttrDocs]; +} Should we limit this to appear on certain su

[PATCH] D92355: [clang] add a `swift_async_name` attribute

2020-12-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. LGTM! Comment at: clang/include/clang/Basic/AttrDocs.td:3640 +The argument is a string literal that contains the Swift name of the function or +method. The

[PATCH] D92495: [clang] Add a new nullability annotation for swift async: _Nullable_result

2020-12-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: arphaman, doug.gregor, aaron.ballman. Herald added subscribers: dexonsmith, ributzka, jfb, jkorous. erik.pilkington requested review of this revision. You can read more about the clang attributes for swift async here: https://

[PATCH] D90871: [Sema] Fold VLAs to constant arrays in a few more contexts

2020-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. erik.pilkington marked 3 inline comments as done. Closed by commit rG090dd647d98d: [Sema] Fold VLAs to constant arrays in a few more contexts (authored by erik.pilkington). Herald added a project: clang. Changed prior to co

[PATCH] D92495: [clang] Add a new nullability annotation for swift async: _Nullable_result

2020-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 309537. erik.pilkington marked 5 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92495/new/ https://reviews.llvm.org/D92495 Files: clang/include/clang-c/Inde

[PATCH] D92495: [clang] Add a new nullability annotation for swift async: _Nullable_result

2020-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Basic/IdentifierTable.cpp:718-719 + case NullabilityKind::NullableResult: +assert(!isContextSensitive && + "_Nullable_result isn't supported as context-sensitive keyword"); +return "_Nullable_result";

[PATCH] D90871: [Sema] Fold VLAs to constant arrays in a few more contexts

2020-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D90871#2433766 , @thakis wrote: > Looks like this breaks tests on Windows: > http://45.33.8.238/win/29181/step_7.txt > > PTAL, and revert while you investigate if it takes a while to fix. Thanks for letting me know, sh

[PATCH] D92495: [clang] Add a new nullability annotation for swift async: _Nullable_result

2020-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 309569. erik.pilkington marked 3 inline comments as done. erik.pilkington added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92495/new/ https://reviews.llvm.org/D92495 Files: clang/include/clang-c/Inde

[PATCH] D92495: [clang] Add a new nullability annotation for swift async: _Nullable_result

2020-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/test/SemaObjC/nullable-result.m:6 +@class NSError; + +@interface SomeClass doug.gregor wrote: > Can you add a `__has_attribute` check for `_Nullable_result`? Hmm, it looks like __has_attribute doesn't suppo

[PATCH] D92602: [objc] diagnose protocol conformance in categories with direct members in their corresponding class interfaces

2020-12-04 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92602/new/ https://reviews.llvm.org/D92602 ___

[PATCH] D92742: [clang] Add support for attribute 'swift_async'

2020-12-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: arphaman, doug.gregor, aaron.ballman. Herald added subscribers: jdoerfert, ributzka, jkorous. erik.pilkington requested review of this revision. This attributes specifies how (or if) a given function or method will be importe

[PATCH] D92495: [clang] Add a new nullability annotation for swift async: _Nullable_result

2020-12-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9cd2413f1ca7: [clang] Add a new nullability annotation for swift async: _Nullable_result (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D92742: [clang] Add support for attribute 'swift_async'

2020-12-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. erik.pilkington marked 2 inline comments as done. Closed by commit rG5a28e1d9e50e: [clang] Add support for attribute 'swift_async' (authored by erik.pilkington). Herald added a project: clang. Changed prior to commit: htt

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-10-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman, ldionne. Herald added subscribers: dexonsmith, ributzka, arphaman, jkorous. erik.pilkington requested review of this revision. This attribute applies to a using declaration, and permits importing a decl

[PATCH] D90188: Add support for attribute 'using_if_exists'

2020-10-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/test/SemaCXX/using-if-exists-attr.cpp:16 +template +using template_alias UIE = NS::x; // expected-warning {{'using_if_exists' attribute only applies to named declarations, types, and value declarations}} + ---

[PATCH] D102459: [clang][ObjC] Allow different availability annotation on a method when implementing an optional protocol requirement

2021-05-14 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102459/new/ https://reviews.llvm.org/D102459 ___ cfe-commits mailing

[PATCH] D93248: Frontend: Fix layering between create{,Default}OutputFile, NFC

2021-01-26 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93248/new/ https://reviews.llvm.org/D93248 __

[PATCH] D93249: Frontend: Fix memory leak in CompilerInstance::setVerboseOutputStream

2021-01-26 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93249/new/ https://reviews.llvm.org/D93249 ___

[PATCH] D93260: Frontend: Simplify handling of non-seeking streams in CompilerInstance, NFC

2021-01-26 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93260/new/ https://reviews.llvm.org/D93260 ___

[PATCH] D95482: [PATCH] [clang] Fix bug 48848 by removing assertion related to recoverFromMSUnqualifiedLookup

2021-02-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Sorry, yeah, I'm OK with this change. Comment at: clang/test/SemaCXX/lambda-expressions.cpp:671 +#else +template +void Decider(const RT &sp, ET &ep) { I think it makes more sense for this test to be in its own file since entire

[PATCH] D95845: [ObjC] Add a command line flag that disables recognition of objc_direct for testability

2021-02-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: arphaman, MadCoder, rjmccall. Herald added subscribers: dexonsmith, dang, ributzka, jkorous. Herald added a reviewer: jansvoboda11. erik.pilkington requested review of this revision. Programmers would like to be able to test d

[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

2021-02-05 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: doug.gregor, aaron.ballman. Herald added subscribers: jdoerfert, jkorous. erik.pilkington requested review of this revision. This attribute specifies how an error is represented for a swift async method. rdar://71941280 htt

[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

2021-02-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 322152. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Get rid of a useless `return`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96175/new/ https://reviews.llvm.org/D96175 Files: clang/include/clang/

[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

2021-02-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5977 +checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); +} + aaron.ballman wrote: > Should there be a diagnostic to combine `swift_error` and `swift_async_error` > on the

[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

2021-02-10 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1e8afba6f176: [clang] Add support for attribute 'swift_async_error' (authored by erik.pilkington). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D96175?vs=322152&id=32

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

2020-03-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 252023. erik.pilkington marked 5 inline comments as done. erik.pilkington added a comment. Add tests for `bit_cast((char)1)`; CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76323/new/ https://reviews.llvm.org/D76323 Files: clang/include/cl

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

2020-03-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:6365 +const llvm::fltSemantics &Semantics = Info.Ctx.getFloatTypeSemantics(Ty); +unsigned NumBits = APFloat::semanticsSizeInBits(Semantics); +assert(NumBits % 8 == 0); l

[PATCH] D76643: [objc_direct] also go through implementations when looking for clashes

2020-03-23 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: clang/lib/Sema/SemaDeclObjC.cpp:4621 + // - when we do not find a match in a given @interface container, + // we need to attempt lookin

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

2020-03-25 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: ahatanak. Herald added subscribers: ributzka, dexonsmith, jkorous. Zero sized bit-fields aren't included in the CGRecordLayout, so we shouldn't be calling EmitLValueForField for them. rdar://60695105 https://reviews.llvm.

[PATCH] D77070: [SemaObjC] Add a warning for declarations of BOOL:1 when BOOL is a signed char

2020-03-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, steven_wu. Herald added subscribers: ributzka, dexonsmith, jkorous. Instead, recommend using a real boolean type. Its possible to get away with BOOL:1, if you only read from it in a context where its contextually co

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

2020-03-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:6364-6371 +const llvm::fltSemantics &Semantics = Info.Ctx.getFloatTypeSemantics(Ty); +unsigned NumBits = APFloat::semanticsSizeInBits(Semantics); +assert(NumBits % 8 == 0); +CharUnit

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

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

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

2020-04-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. LGTM, sorry for the delay in reviewing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72872/new/ https://reviews.llvm.org

[PATCH] D75387: [Sema] Look through OpaqueValueExpr when checking implicit conversions

2020-02-28 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. Specifically, this fixes a false-positive in -Wobjc-signed-char-bool. rdar://57372317 https://reviews.llvm.org/D75387 Files: clang/lib/Sema/SemaChecking

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

2020-02-28 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. In D74417#1876927 , @dgoldman wrote: > Okay, I've added this, it seems to fix the test but I'm not sure if it's > fully correct since

[PATCH] D75387: [Sema] Look through OpaqueValueExpr when checking implicit conversions

2020-03-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe392dcd5708b: [Sema] Look through OpaqueValueExpr when checking implicit conversions (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D75483: [Sema] Fix a crash when attaching comments to an implicit decl

2020-03-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: jkorous. Herald added subscribers: ributzka, dexonsmith. When an implicitly generated decl was the first entry in the group, we attempted to lookup comments with an empty FileID, leading to crashes. Avoid this by trying to

[PATCH] D75491: [CodeGenObjC] Privatize some ObjC metadata symbols

2020-03-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, ahatanak, vsk. Herald added subscribers: ributzka, dexonsmith, jkorous. Nobody needs these symbols, so there isn't any benefit in including them. This saves some code-size in Objective-C binaries. Partially reverts

[PATCH] D75483: [Sema] Fix a crash when attaching comments to an implicit decl

2020-03-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG29a4239d31c6: [Sema] Fix a crash when attaching comments to an implicit decl (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71566: New checks for fortified sprintf

2019-12-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Thanks for working on this! I think this would be a really useful diagnostic to have. Comment at: clang/lib/Sema/SemaChecking.cpp:311 } +class EstimateSizeFormatHandler +: public analyze_format_string::FormatStringHandler { ---

[PATCH] D75491: [CodeGenObjC] Privatize some ObjC metadata symbols

2020-03-09 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7fbf15a8f2df: [CodeGenObjC] Privatize some ObjC metadata symbols (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

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

2020-03-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, ldionne, jfb. Herald added subscribers: ributzka, dexonsmith, jkorous. On x86, `long double` has 6 unused trailing bytes. This patch changes the constant evaluator to treat them as though they were padding bytes, so r

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-05 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, thegameg, rsmith. Herald added subscribers: ributzka, dexonsmith, jkorous. These temporaries are only used in the callee, and their memory can be reused after the call is complete. rdar://58552124 https://reviews

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington planned changes to this revision. erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:3697 + + args.add(EmitAnyExpr(E, ArgSlot), type); } rjmccall wrote: > If the argu

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-02-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, scanon. Herald added subscribers: ributzka, dexonsmith, jkorous. Without this, LLVM will assume the pointer has the type's alignment, which is undefined if the value is actually underaligned. rdar://58316406 http

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 243243. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Disable the optimization for non-trivially destructible types. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74094/new/ https://reviews.llvm.org/D7409

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:3687 - args.add(EmitAnyExprToTemp(E), type); } thegameg wrote: > Is there any other use of `EmitAnyExprToTemp` that can benefit f

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-07 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfafc6e4fdf36: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINC

<    1   2   3   4   5   6   >