[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/unittests/Lex/LexerTest.cpp:673 + EXPECT_EQ(FindBeginningOfLineOffset("int func1();\nint func2();", 13), 13); + EXPECT_EQ(FindBeginningOfLineOffset("int func1();\nint func2();", 12), 13); +

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added inline comments. Comment at: clang/unittests/Lex/LexerTest.cpp:673 + EXPECT_EQ(FindBeginningOfLineOffset("int func1();\nint func2();", 13), 13); + EXPECT_EQ(FindBeginningOfLineOffset("int func1();\nint func2();", 12), 13); +

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. Sorry for the delayed response. I managed to miss seeing this review request. Comment at: clang/include/clang/Lex/Lexer.h:598-599 + /// Returns the pointer that points to the beginning of line that contains + /// the given offset, or null if

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In D143099#4233651 , @cor3ntin wrote: > Sure. Let me know what name and email address you would like used for the > patch attribution! Thanks Kyle Edwards Is there some way I can set this in my profile settings so

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D143099#4233633 , @KyleFromKitware wrote: > In D143099#4233623 , @cor3ntin > wrote: > >> @KyleFromKitware oups, this fell under the cracks. I think I'm happy with is >> as-is, do

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In D143099#4233623 , @cor3ntin wrote: > @KyleFromKitware oups, this fell under the cracks. I think I'm happy with is > as-is, do you need help landing it? Yes, please. CHANGES SINCE LAST ACTION

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @KyleFromKitware oups, this fell under the cracks. I think I'm happy with is as-is, do you need help landing it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143099/new/ https://reviews.llvm.org/D143099 ___

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-02-02 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:493-494 /// Returns the pointer that points to the beginning of line that contains /// the given offset, or null if the offset if invalid. +const char *Lexer::findBeginningOfLine(StringRef Buffer,

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-02-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM except the duplicated comment Comment at: clang/lib/Lex/Lexer.cpp:493-494 /// Returns the pointer that points to the beginning of line that contains /// the

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-02-01 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 494036. KyleFromKitware added a comment. Fixed formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143099/new/ https://reviews.llvm.org/D143099 Files: clang/include/clang/Lex/Lexer.h clang/lib/Lex/Lexer.cpp

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-02-01 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware created this revision. KyleFromKitware added a reviewer: clang. KyleFromKitware added a project: clang. Herald added a project: All. KyleFromKitware requested review of this revision. Herald added a subscriber: cfe-commits. And fix a few corner cases in which it returns the wrong