[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 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-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-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-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-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

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-16 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode closed this revision. idlecode added a comment. Committed as r295113 https://reviews.llvm.org/D29724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30002: [clang-tidy] Fix handling of methods with try-statement as a body in modernize-use-override

2017-02-15 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode created this revision. idlecode added a project: clang-tools-extra. Herald added a subscriber: JDevlieghere. Fix generated by modernize-use-override caused syntax error when method used try-statement as a body. `override` keyword was inserted after last declaration token which happened to

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-11 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. Yes, please. Thanks for you time :) https://reviews.llvm.org/D29724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-11 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 88101. idlecode added a comment. Addressed Richard's inline comment. https://reviews.llvm.org/D29724 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Frontend/LangStandard.h include/clang/Frontend/LangStandards.def lib/Frontend/Com

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-11 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 88100. idlecode added a comment. Displayed standards will now match processed file kind https://reviews.llvm.org/D29724 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Frontend/LangStandard.h include/clang/Frontend/LangStandards.def

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-10 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. Indeed, thanks :) I ran `make check-all` and had no errors so I thought there are no tests. Comment at: lib/Frontend/CompilerInvocation.cpp:1709 +Diags.Report(diag::note_drv_supported_value_with_description) + << Std.getName() << Std.g

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-10 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode updated this revision to Diff 88029. idlecode added a comment. Added test, changed printout style a bit (but this still needs to be checked) https://reviews.llvm.org/D29724 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Frontend/CompilerInvocation.cpp test/Driver/unknown

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-08 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode created this revision. In case user did not provide valid standard name for `-std` option, available values (with short description) will be reported. To test: `clang -std=iso3103 -c source.c` https://reviews.llvm.org/D29724 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode accepted this revision. idlecode added a comment. This revision is now accepted and ready to land. Sure, but I don't have commit rights so someone else have to push it :) https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-comm

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. LGTM. HIC++ Standard seems worth implementing. https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28235: [clang-format cleanup] merge continuous deleted lines into one deletion.

2017-02-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode requested changes to this revision. idlecode added a comment. This revision now requires changes to proceed. Few other tests (from `ChangeNamespaceTest`) require update too. https://reviews.llvm.org/D28235 ___ cfe-commits mailing list cfe-c

[PATCH] D28235: [clang-format cleanup] merge continuous deleted lines into one deletion.

2017-02-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added inline comments. Comment at: lib/Format/Format.cpp:1182 + I != E; ++I) + LastToNextLineFirst[(*I)->Last] = (*std::next(I))->First; tooling::Replacements Fixes; Could you add brackets around loop body? Comment at

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:156 + safety-no-assembler + safety-no-vector-bool `safety-no-vector-bool` seems to belong to the other patch. Comment at: clang-tools-extra/test/c

[PATCH] D29393: [clang-tidy] Don't warn about call to unresolved operator*

2017-02-04 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added inline comments. Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:63 +cxxOperatorCallExpr(argumentCountIs(1), +callee(unresolvedLookupExpr()), +hasArgument(0, cxxThisExpr()

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-03 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. Standard you linked mentions portability as the reason inline assembler should be avoided. Should it really be named 'safety'? https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D29393: [clang-tidy] Don't warn about call to unresolved operator*

2017-02-03 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added inline comments. Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:63 +cxxOperatorCallExpr(argumentCountIs(1), +callee(unresolvedLookupExpr()), +hasArgument(0, cxxThisExpr()