[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-12 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added a comment. @ahatanak I don't have commit access, any chance you could commit this for me? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113455/new/ https://reviews.llvm.org/D113455 ___ cf

[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-12 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 386949. guitard0g marked 5 inline comments as done. guitard0g added a comment. Nit: deleted empty line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113455/new/ https://reviews.llvm.org/D113455 Files: cla

[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-12 Thread Josh Learn via Phabricator via cfe-commits
guitard0g marked 6 inline comments as done. guitard0g added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:6683 + values.add(classMethodList); + isEmptyCategory &= + instanceMethodList->isNullValue() && classMethodList->isNullValue(); zoecarv

[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-12 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 386947. guitard0g added a comment. Abandon builder earlier before creating global variable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113455/new/ https://reviews.llvm.org/D113455 Files: clang/lib/CodeG

[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-12 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 386943. guitard0g added a comment. Address comments and fix fragile test to use -O0 and -disable-llvm-passes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113455/new/ https://reviews.llvm.org/D113455 Files:

[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-09 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 385870. guitard0g added a comment. Fixed code formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113455/new/ https://reviews.llvm.org/D113455 Files: clang/lib/CodeGen/CGObjCMac.cpp clang/test/Code

[PATCH] D113455: [clang][objc][codegen] Skip emitting ObjC category metadata when the category is empty

2021-11-08 Thread Josh Learn via Phabricator via cfe-commits
guitard0g created this revision. guitard0g requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D113455 Files: clang/lib/CodeGen/CGObjCMac.cpp clang/test/CodeGenObjC/category-c

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-22 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added a comment. @MyDeveloperDay @HazardyKnusperkeks I don't have commit access, could one of you commit this for me? Thanks so much for your review! Name: Josh Learn Email: joshua_le...@apple.com (The test failures seem to be unrelated, but I'm fine waiting until they start passing

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-21 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 373977. guitard0g added a comment. Add test case for space between directives. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109951/new/ https://reviews.llvm.org/D109951 Files: clang/lib/Format/UnwrappedLi

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 373366. guitard0g added a comment. Fix failing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109951/new/ https://reviews.llvm.org/D109951 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unit

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added a comment. When looking at test case suggestions, I happened upon another problem that occurs when handling preprocessor directives. The following code is properly formatted (following llvm style, with ColumnLimit=0): SomeClass::SomeClass() : a{a}, b{b} {} However t

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 373351. guitard0g added a comment. Add test case suggestions from reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109951/new/ https://reviews.llvm.org/D109951 Files: clang/lib/Format/UnwrappedLine

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 373167. guitard0g added a comment. Fix failing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109951/new/ https://reviews.llvm.org/D109951 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unit

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 373158. guitard0g added a comment. Removing useless line from test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109951/new/ https://reviews.llvm.org/D109951 Files: clang/lib/Format/UnwrappedLineParser.cp

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added a comment. @MyDeveloperDay This is an issue a coworker pointed out to me. Previously this code: Foo::Foo(int x) : _x { x } #if DEBUG , _y { 0 } #endif { } would format into the following: Foo::Foo(int x) : _x { x } #if DEBUG , _y {

[PATCH] D109951: [clang-format] Constructor initializer lists format with pp directives

2021-09-17 Thread Josh Learn via Phabricator via cfe-commits
guitard0g created this revision. guitard0g requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently constructor initializer lists sometimes format incorrectly when there is a preprocessor directive in the middle of the list. This patch fix

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-29 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added a comment. @vsavchenko > I see that the "applies to pointer arguments only" warning is not tested for > `noescape`, but I still find it to be a good practice to write a test with a > bunch of cases with attributes applied in wrong places. Updated with some tests for this! > Ad

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-29 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 362849. guitard0g marked an inline comment as done. guitard0g added a comment. Add tests for diagnostics of incorrect usage. Diagnose when escape and noescape are used on the same parameter. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g marked an inline comment as done. guitard0g added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1952 +def Escape : Attr { + let Spellings = [Clang<"escape">]; NoQ wrote: > Shouldn't both this attribute and the one above be `Inheritab

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g updated this revision to Diff 362643. guitard0g added a comment. Herald added a subscriber: jdoerfert. Change Escape/NoEscape to use InheritableAttr and update an attribute test to fix test failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:260 +``escape`` placed on a function parameter of a pointer type is used to indicate +that the pointer can escape the function. This means that a reference to the object +the pointer points to tha

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-28 Thread Josh Learn via Phabricator via cfe-commits
guitard0g created this revision. guitard0g added reviewers: aaron.ballman, NoQ, vsavchenko. guitard0g requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The 'escape' attribute indicates that the annotated pointer parameter may escape the scope