[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-10 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310576: [Lexer] Finding beginning of token with escaped new line (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D30748?vs=110029&id=110544#toc Repository: rL LLVM https://re

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-07 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. I don't have commit rights yet so I would be grateful for help in this matter :) Comment at: lib/Lex/Lexer.cpp:469-477 +if (!isVerticalWhitespace(LexStart[0])) + continue; - const char *LexStart = StrData; - while (LexStart != BufStart) {

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-07 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 110029. idlecode added a comment. Redability fix in `findBeginningOfLine` https://reviews.llvm.org/D30748 Files: include/clang/Lex/Lexer.h lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp =

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with one nit. Do you need someone to commit the patch for you after you address the comment? Comment at: lib/Lex/Lexer.cpp:469-477 +if (!isVerticalWhitespace(

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 109748. idlecode added a comment. Applied clang-format https://reviews.llvm.org/D30748 Files: include/clang/Lex/Lexer.h lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 109740. idlecode marked an inline comment as done. https://reviews.llvm.org/D30748 Files: include/clang/Lex/Lexer.h lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp ==

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-08-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode marked 3 inline comments as done. idlecode added inline comments. Comment at: lib/Lex/Lexer.cpp:460 +/// \brief Check if new line pointed by Str is escaped. +bool isNewLineEscaped(const char *BufferStart, const char *Str) { + assert(isVerticalWhitespace(Str[0])); --

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-06-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry for the delay, I was on vacation. This looks much better now, thanks! A few more comments though. Comment at: lib/Lex/Lexer.cpp:460 +/// \brief Check if new line pointed by Str is escaped. +bool isNewLineEscaped(const char *BufferStart, const char

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-06-10 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 102110. idlecode added a comment. Added tests for `isNewLineEscaped` - this fixed some corner cases https://reviews.llvm.org/D30748 Files: lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp ===

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-05-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D30748#750626, @idlecode wrote: > Oh, sorry about this - I forgot. I will send patch during this weekend No worries, I just stumbled upon the bug and recalled that there had been a patch to fix it. https://reviews.llvm.org/D30748 ___

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-05-09 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. Oh, sorry about this - I forgot. I will send patch during this weekend https://reviews.llvm.org/D30748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-05-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Paweł, are you planning to finish this patch? https://reviews.llvm.org/D30748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-03-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: lib/Lex/Lexer.cpp:457 +static bool isNewLineEscaped(const char *BufferStart, const char *Str) { + while (Str > BufferStart && isWhitespace(*Str)) +

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-03-11 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 91466. idlecode added a comment. Addressed Alexander's comments https://reviews.llvm.org/D30748 Files: lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp ===

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-03-11 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode marked 3 inline comments as done. idlecode added inline comments. Comment at: lib/Lex/Lexer.cpp:457 +static bool isNewLineEscaped(const char *BufferStart, const char *Str) { + while (Str > BufferStart && isWhitespace(*Str)) +--Str; alexfh wrote: > W

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-03-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: lib/Lex/Lexer.cpp:457 +static bool isNewLineEscaped(const char *BufferStart, const char *Str) { + while (Str > BufferStart && isWhitespace(*Str)) +

[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

2017-03-08 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode created this revision. Lexer::GetBeginningOfToken produced invalid location when backtracking across escaped new lines. This fixes PR26228 https://reviews.llvm.org/D30748 Files: lib/Lex/Lexer.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp