[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400704. psigillito added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Removed old approach and started initial changes to add C language Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400706. psigillito added a comment. revert changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint Index: .arclint

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400708. psigillito added a comment. Hopefully this revision works Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Format/Fo

[PATCH] D117536: Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito created this revision. psigillito requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. revert old changes, breakout c into own language initial changes revert arclint changes revert bad arclint change Repository: rG LLVM Github

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400715. psigillito added a comment. Include multiple commits in review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Form

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400717. psigillito added a comment. - undo delete Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Format/Format.h clang/l

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 400718. psigillito added a comment. - annoying arc changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include/clang/Format/Format.h

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-17 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. These are just initial changes, there is still a lot of work and test cases to write. I figured I would put this out there to see if this is the direction we were thinking. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2504 nextToken();

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-18 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. Ok, as I was starting to add a new language, the scope of changes just continued to grow. If you think it is worthwhile, I think I can fix this edge case for accessSpecifiers by cleaning up my old approach and adding some tests. I dont like having to add a big set o

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-21 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402142. psigillito added a comment. - revert to corner case handling with private Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/include

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-21 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402149. psigillito added a comment. - revert bad changes and arclint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: clang/lib/Format/FormatToken.h clan

[PATCH] D118092: review revisions

2022-01-24 Thread psigillito via Phabricator via cfe-commits
psigillito created this revision. psigillito 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/D118092 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/lib/Format/Un

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-24 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402733. psigillito marked 6 inline comments as done. psigillito added a comment. Review Changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-24 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402735. psigillito added a comment. undo arclint change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint Index: .arclint ===

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-24 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402736. psigillito added a comment. Base diff on upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/lib/Format/FormatToken.h clan

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-24 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402737. psigillito added a comment. - revert bad arclint changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: .arclint clang/lib/Format/FormatToken.h

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-24 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 402742. psigillito added a comment. - revert of .arclint file delete Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: clang/lib/Format/FormatToken.h clan

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-26 Thread psigillito via Phabricator via cfe-commits
psigillito marked an inline comment as done. psigillito added inline comments. Comment at: clang/lib/Format/FormatToken.h:125 +/// Operators that can follow a C variable. +static const std::set C_OperatorsFollowingVar = { +tok::l_square, tok::r_square, cu

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-27 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 403861. psigillito marked 8 inline comments as done. psigillito added a comment. - Merge branch 'main' of https://github.com/llvm/llvm-project - code review syntax cleanup, sorted vector Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-27 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 403862. psigillito marked 2 inline comments as done. psigillito added a comment. - revert auto formatting comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-29 Thread psigillito via Phabricator via cfe-commits
psigillito marked 7 inline comments as done. psigillito added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2716-2718 + auto COperatorMatch = + std::lower_bound(COperatorsFollowingVar.begin(), + COperatorsFollowingVar.end(), For

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-29 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 404288. psigillito marked an inline comment as done. psigillito added a comment. - review changes, lower_bound to binary_search Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-29 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 404322. psigillito added a comment. - wrap vector in function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files: clang/lib/Format/FormatToken.h clang/lib/F

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-29 Thread psigillito via Phabricator via cfe-commits
psigillito updated this revision to Diff 404323. psigillito marked 2 inline comments as done. psigillito added a comment. - unnecessary whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 Files:

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-30 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. @HazardyKnusperkeks I do not have commit access. This is my first commit to the project. Do I just need to issue an 'arc land' command? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-30 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. @HazardyKnusperkeks Ok thanks, someone else can commit on my behalf while I wait for commit access. name: Philip Sigillito email: psigill...@gmail.com Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://r

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-30 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. Do I need to care about these pre-build checks failing? F21921747: image.png Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117416/new/ https://reviews.llvm.org/D117416 _

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-30 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. In D117416#3282937 , @HazardyKnusperkeks wrote: > In D117416#3282853 , @psigillito > wrote: > >> Do I need to care about these pre-build checks failing? F21921747: image.png >>

[PATCH] D117415: Handle C variables with name that matches c++ access specifier

2022-01-15 Thread psigillito via Phabricator via cfe-commits
psigillito created this revision. psigillito 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/D117415 Files: .arclint clang/lib/Format/FormatToken.h clang/lib/Format/Unwr

[PATCH] D117416: Handle C variables with name that matches c++ access specifier

2022-01-15 Thread psigillito via Phabricator via cfe-commits
psigillito created this revision. psigillito 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/D117416 Files: .arclint clang/lib/Format/FormatToken.h clang/lib/Format/Unwr

[PATCH] D117416: Handle C variables with name that matches c++ access specifier

2022-01-15 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. Sorry, this is my first time using Phabricator. I am not sure if it matters that .arclint is changed in this review, it is not part of my commit. This issue only appears to impact the accessSpecifier keywords. For example, a c variable declared with the name 'private

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-16 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. In D117416#3246838 , @curdeius wrote: > Thanks for having a try on this. > However, I don't like this approach too much. You add many changes and a > single test. That's not sufficient. > Also, handling C++ keywords in all cas