djasper created this revision.
djasper added a reviewer: mprobst.
djasper added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
The attempt to fix requoting behavior in r280487 after changes to
tooling::Replacements are incomplete. We essentially need to add to
replacements at the
djasper added inline comments.
Comment at: lib/Format/Format.cpp:1707
@@ +1706,3 @@
+ if (NewCode) {
+auto NewEnv = Environment::CreateVirtualEnvironment(
+*NewCode, FileName,
mprobst wrote:
> I guess we don't worry about the performance c
Author: djasper
Date: Wed Sep 7 17:48:53 2016
New Revision: 280874
URL: http://llvm.org/viewvc/llvm-project?rev=280874&view=rev
Log:
clang-format: [JavaScript] Do requoting in a separate pass
The attempt to fix requoting behavior in r280487 after changes to
tooling::Replacements are incomplete.
djasper closed this revision.
djasper added a comment.
Submitted as r280874.
https://reviews.llvm.org/D24322
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: djasper
Date: Wed Sep 7 18:01:13 2016
New Revision: 280878
URL: http://llvm.org/viewvc/llvm-project?rev=280878&view=rev
Log:
clang-format: [JavaScript] Change default AllowShortFunctionsOnASingleLine
for Google style to "empty".
Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk
djasper added inline comments.
Comment at: lib/Format/Format.cpp:1141
@@ -1134,1 +1140,3 @@
deleteToken(DeleteLeft ? Left : Right);
+// Delete all comments between `Left` and `Right`.
+for (auto *Comment : Comments)
Couldn't you just do:
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
One remark, otherwise looks good.
Comment at: lib/Format/Format.cpp:1136
@@ +1135,3 @@
+for (auto *Tok = Left->Next; Tok && Tok != Right; Tok = Tok->Next)
+
djasper added a comment.
This seems like a pretty weird function to have in the interface. Could you
explain what use case(s) you are envisioning?
https://reviews.llvm.org/D24383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.
djasper closed this revision.
djasper marked 6 inline comments as done.
djasper added a comment.
Submitted as r263943.
Comment at: include/clang/Format/Format.h:415
@@ +414,3 @@
+ /// as the "main" include in both a.cc and a_test.cc.
+ std::string IncludeMainRegex;
+
-
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Repository:
rL LLVM
https://reviews.llvm.org/D24401
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.or
djasper added a comment.
Does this still work with the new Replacements?
Comment at: lib/Format/Format.cpp:1572
@@ +1571,3 @@
+// When inserting headers at end of the code, also insert a '\n' at the end
+// of the code if it does not ends with '\n'.
+// The way of in
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:47
@@ +46,3 @@
+
+int WhitespaceManager::Change::ScopeLevel() const {
+ // NestingLevel is raised on the opening paren/square, and remains raised
What I don't understand is why you have t
djasper added a comment.
I think this will also be solved by https://reviews.llvm.org/D21279.
https://reviews.llvm.org/D24395
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
There are several things I find particularly confusing about this.
Fundamentally, Replacements refer to a specific version of the code. Say
you have a Replacements object R and a Replacement r that you want to
integrate into it. Further assume, that C0 is the initial version of the
code whereas C1
Author: djasper
Date: Mon Sep 12 05:02:46 2016
New Revision: 281203
URL: http://llvm.org/viewvc/llvm-project?rev=281203&view=rev
Log:
clang-format: Make emacs integration work with narrowed buffers.
Use (call-process region nil ...) instead of (point-min) so that the
call works in narrowed buffer
djasper added a comment.
Ok.. Thought some more and discussed with Manuel.
I think we should do a partial solution for now. I still think addOrMerge is
harmful and it is always never the right thing to use. The codepaths that
currently implement some version of it, should likely reconsider.
Wh
djasper added a comment.
The problem is that it is implicit behavior, that's not easy to understand.
What's worse is that the behavior of add and merge would fundamentally be
reverse. If you add two inserts at the same location, the first one would come
first. If you merge them, the second one
djasper added inline comments.
Comment at: unittests/Format/CleanupTest.cpp:147
@@ +146,3 @@
+ // Trailing comma in braces is not removed.
+ std::string Code = "void f() { std::vector v = {1,2,,,3,{4,5,}}; }";
+ std::string Expected = "void f() { std::vector v = {1,2,3,{4,5,}};
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Some remarks, but looks good.
Comment at: unittests/Format/CleanupTest.cpp:38
@@ +37,3 @@
+ // Returns code after cleanup around \p Offsets.
+ std::string cleanupAroundOff
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Generally looks good.
Comment at: unittests/Format/FormatTestJS.cpp:1433
@@ +1432,3 @@
+TEST_F(FormatTestJS, ImportComments) {
+ verifyFormat("import {x} from 'x'; // from
djasper added inline comments.
Comment at: include/clang/Tooling/Core/Replacement.h:172
@@ +171,3 @@
+ /// - They do not overlap.
+ /// - One replacement is insertion, and the other is a replacement with
+ /// length > 0, and the insertion is adjecent to but not contain
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
Comment at: include/clang/Tooling/Core/Replacement.h:172
@@ -169,1 +171,3 @@
+ /// - aren't both inserts at the same code location.
+ /// Note: two insertion
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Interesting.. Would have expected true/false to be literals as well, but ok :).
https://reviews.llvm.org/D24574
___
cfe-commits mailing list
cf
Author: djasper
Date: Sat Sep 17 02:20:36 2016
New Revision: 281816
URL: http://llvm.org/viewvc/llvm-project?rev=281816&view=rev
Log:
clang-format: [JS] Fix a crash in handledTemplateStrings.
Modified:
cfe/trunk/lib/Format/FormatTokenLexer.cpp
cfe/trunk/unittests/Format/FormatTestJS.cpp
Author: djasper
Date: Thu Mar 16 02:54:11 2017
New Revision: 297931
URL: http://llvm.org/viewvc/llvm-project?rev=297931&view=rev
Log:
clang-format: Fix bug in wrapping behavior of operators.
Before (even violating the column limit):
auto Diag =
diag()
<< (aaa
Hi Richard,
this seems to have an unwanted side-effect on -Wunused-value (test case
attached). Could you take a look?
Cheers,
Daniel
On Fri, Mar 24, 2017 at 2:14 AM, Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> Author: rsmith
> Date: Thu Mar 23 20:14:25 2017
> New Revisi
-Wunused-value is always triggered if a constructor of an object with a
non-trivial destructor has an initializer list as first parameter. So in
the test, even "Used({});" triggers -Wunused-value. That seems inconsistent
(replacing the init list with something else silences the warning) and also
th
Author: djasper
Date: Mon Mar 27 11:29:41 2017
New Revision: 298853
URL: http://llvm.org/viewvc/llvm-project?rev=298853&view=rev
Log:
Look through CXXBindTemporaryExprs when checking CXXFunctionCastExprs
for unused values.
This fixes a regression caused by r298676, where constructor calls to
clas
Author: djasper
Date: Fri Mar 31 07:04:37 2017
New Revision: 299204
URL: http://llvm.org/viewvc/llvm-project?rev=299204&view=rev
Log:
clang-format: [JavaScript] Ignore QT keywords.
Modified:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/unittests/Format/FormatTestJS.cpp
Modified
Author: djasper
Date: Fri Mar 31 08:30:24 2017
New Revision: 299214
URL: http://llvm.org/viewvc/llvm-project?rev=299214&view=rev
Log:
clang-format: Fix post-commit review comment of r299204, use Style.isCpp().
Also, while at it, s/IsCpp/isCpp/ so that it follows LLVM style.
Modified:
cfe/tru
Author: djasper
Date: Wed Apr 19 01:06:38 2017
New Revision: 300661
URL: http://llvm.org/viewvc/llvm-project?rev=300661&view=rev
Log:
clang-format: Properly match parens of macro parameter lists.
No tests yet, but this will be tested by the upcoming:
https://reviews.llvm.org/D28462
Modified:
Author: djasper
Date: Thu Jan 12 13:35:26 2017
New Revision: 291801
URL: http://llvm.org/viewvc/llvm-project?rev=291801&view=rev
Log:
clang-format: Treat braced lists like other complex parameters.
Specifically, wrap before them if they are multi-line so that we don't
create long hanging indents.
Author: djasper
Date: Thu Jan 12 14:06:28 2017
New Revision: 291807
URL: http://llvm.org/viewvc/llvm-project?rev=291807&view=rev
Log:
clang-format: Fix regression introduced by r291801.
Uncovered by polly tests.
Before:
aa(aaa,
Author: djasper
Date: Fri Jan 13 17:18:16 2017
New Revision: 291974
URL: http://llvm.org/viewvc/llvm-project?rev=291974&view=rev
Log:
clang-format: Fix bug in making line break decisions.
Here, the optimization to not line wrap when it would not lead to a
reduction in columns was overwriting and
This patch seems to break on some of our code. Reproducer:
$ cat /tmp/ctor.cc
template
struct A {
A() {}
};
template
class B : T {
using T::T;
};
struct C {
B> d;
C(A b) : d(b) {}
};
djasper@dj:~/llvm/release$ bin/clang -cc1 -std=c++11 /tmp/ctor.cc
/tmp/ctor.cc:13:17: error: no matchi
Sorry, for the noise.
This is probably not the revision that caused this.
On Mon, Jan 16, 2017 at 1:08 AM, Daniel Jasper wrote:
> This patch seems to break on some of our code. Reproducer:
>
> $ cat /tmp/ctor.cc
> template
> struct A {
> A() {}
> };
>
> template
> class B : T {
> using T::
Author: djasper
Date: Mon Jan 16 07:13:15 2017
New Revision: 292110
URL: http://llvm.org/viewvc/llvm-project?rev=292110&view=rev
Log:
clang-format: Always wrap before multi-line parameters/operands.
Before:
aa(, aaa::
Author: djasper
Date: Mon Jan 16 07:43:46 2017
New Revision: 292116
URL: http://llvm.org/viewvc/llvm-project?rev=292116&view=rev
Log:
Fix test failures after recent clang-format format change.
Modified:
cfe/trunk/test/Index/overriding-ftemplate-comments.cpp
Modified: cfe/trunk/test/Index/ove
Author: djasper
Date: Mon Jan 30 01:08:40 2017
New Revision: 293465
URL: http://llvm.org/viewvc/llvm-project?rev=293465&view=rev
Log:
clang-format: [JavaScript] Undo r291974 for JavaScript.
This had significant negative consequences and I don't have a good
solution for it yet.
Before:
var stri
Author: djasper
Date: Tue Jan 31 05:25:01 2017
New Revision: 293616
URL: http://llvm.org/viewvc/llvm-project?rev=293616&view=rev
Log:
[clang-format] Refactor WhitespaceManager and friends
The main motivation behind this is to cleanup the WhitespaceManager and
make it more extensible for future al
Author: djasper
Date: Tue Jan 31 06:07:35 2017
New Revision: 293618
URL: http://llvm.org/viewvc/llvm-project?rev=293618&view=rev
Log:
clang-format: [JS] Fix incorrect line break in template strings.
Before:
var f = ` ${a ? 'a' : 'b'
}`;
After:
var f = ` ${
Author: djasper
Date: Tue Jan 31 07:03:07 2017
New Revision: 293622
URL: http://llvm.org/viewvc/llvm-project?rev=293622&view=rev
Log:
clang-format: [JS] Properly set scopes inside template strings.
Before:
var f = `a:${aaa
.a}
a:
Author: djasper
Date: Tue Jan 31 08:39:33 2017
New Revision: 293636
URL: http://llvm.org/viewvc/llvm-project?rev=293636&view=rev
Log:
clang-format: [JS] Indent expressions in ${} relative to their surrounding
This only affects expressions inside ${} scopes of template strings.
Here, we want to in
Author: djasper
Date: Wed Feb 1 03:23:39 2017
New Revision: 293752
URL: http://llvm.org/viewvc/llvm-project?rev=293752&view=rev
Log:
clang-format: Don't force-wrap multiline RHSs for 2-operand experssions.
This rows back on r288120, r291801 and r292110. I apologize in advance
for the churn. All
Author: djasper
Date: Wed Feb 1 04:00:10 2017
New Revision: 293754
URL: http://llvm.org/viewvc/llvm-project?rev=293754&view=rev
Log:
Fix Index test after recent clang-format change.
Modified:
cfe/trunk/test/Index/overriding-ftemplate-comments.cpp
Modified: cfe/trunk/test/Index/overriding-ft
Author: djasper
Date: Wed Feb 1 17:27:37 2017
New Revision: 293839
URL: http://llvm.org/viewvc/llvm-project?rev=293839&view=rev
Log:
clang-format: Fix incorrect line breaks after forced operator wraps.
Before:
bool x = a //
||
b
//
|| ;
Author: djasper
Date: Thu Feb 2 02:30:21 2017
New Revision: 293875
URL: http://llvm.org/viewvc/llvm-project?rev=293875&view=rev
Log:
clang-format: Do not use two-argument/operand special case with no alignment
Without alignment, there is no clean separation between the arguments, even if
there a
Author: djasper
Date: Fri Feb 3 02:29:02 2017
New Revision: 293995
URL: http://llvm.org/viewvc/llvm-project?rev=293995&view=rev
Log:
clang-format: [Proto] Also supports implicit string literal concatenation
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/Form
Author: djasper
Date: Fri Feb 3 08:32:38 2017
New Revision: 294009
URL: http://llvm.org/viewvc/llvm-project?rev=294009&view=rev
Log:
clang-format: [JS] Fix bugs in parsing and aligning template strings.
Modified:
cfe/trunk/lib/Format/ContinuationIndenter.cpp
cfe/trunk/lib/Format/TokenAnn
Author: djasper
Date: Mon Feb 6 04:55:49 2017
New Revision: 294179
URL: http://llvm.org/viewvc/llvm-project?rev=294179&view=rev
Log:
clang-format: Fix bug with conflicting BreakBeforeBinaryOperations and
AlignAfterOpenBracket
Fix for the formatting options combination of
BreakBeforeBinaryOperat
Author: djasper
Date: Tue Feb 7 15:38:16 2017
New Revision: 294358
URL: http://llvm.org/viewvc/llvm-project?rev=294358&view=rev
Log:
clang-format: Fix bad variable declaration detection.
Before:
LongType
variable(nullptr, [](A *a) {});
After:
LongType
Author: djasper
Date: Fri Jun 30 01:02:37 2017
New Revision: 306804
URL: http://llvm.org/viewvc/llvm-project?rev=306804&view=rev
Log:
Fix heap use after free introduced by r306769.
Modified:
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL:
h
Author: djasper
Date: Fri Feb 17 04:44:07 2017
New Revision: 295437
URL: http://llvm.org/viewvc/llvm-project?rev=295437&view=rev
Log:
clang-format: Don't remove existing spaces between identifier and ::.
This can lead to bad behavior with macros that are used to annotate
functions (e.g. ALWAYS_IN
Author: djasper
Date: Mon Feb 20 06:43:41 2017
New Revision: 295658
URL: http://llvm.org/viewvc/llvm-project?rev=295658&view=rev
Log:
clang-format: [JS/TS] Improve detection for array subscripts in types.
Before:
var someValue = (v as [
]).someFunction(
Author: djasper
Date: Mon Feb 20 06:43:48 2017
New Revision: 295659
URL: http://llvm.org/viewvc/llvm-project?rev=295659&view=rev
Log:
clang-format: Prevent weird line-wraps in complex lambda introducers
Before:
a.(
[a
Author: djasper
Date: Mon Feb 20 08:51:16 2017
New Revision: 295663
URL: http://llvm.org/viewvc/llvm-project?rev=295663&view=rev
Log:
clang-format: [JS] Improve line-wrapping behavior of template strings.
Specifically, similar to other blocks, clang-format now wraps both
after "${" and before the
Author: djasper
Date: Tue Feb 28 12:28:15 2017
New Revision: 296499
URL: http://llvm.org/viewvc/llvm-project?rev=296499&view=rev
Log:
clang-format: [Java] Fix bug in enum formatting.
Before:
public enum VeryLongEnum {
ENUM_WITH_MANY_PARAMETERS("aa",
Author: djasper
Date: Wed Mar 1 04:47:52 2017
New Revision: 296605
URL: http://llvm.org/viewvc/llvm-project?rev=296605&view=rev
Log:
clang-format: Ignore contents of #ifdef SWIG .. #endif blocks.
Those blocks are used if C++ code is SWIG-wrapped (see swig.org) and
usually do not contain C++ code
Author: djasper
Date: Wed Mar 1 05:10:11 2017
New Revision: 296608
URL: http://llvm.org/viewvc/llvm-project?rev=296608&view=rev
Log:
Fix r296605 so that stuff in #ifndef SWIG blocks is still formatted.
Modified:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/unittests/Format/Form
Author: djasper
Date: Wed Mar 1 13:26:12 2017
New Revision: 296659
URL: http://llvm.org/viewvc/llvm-project?rev=296659&view=rev
Log:
clang-format: [JS/TS] Properly understand cast expressions.
Many things were wrong:
- We didn't always allow wrapping after "as", which can be necessary.
- We used
Author: djasper
Date: Wed Mar 1 13:47:28 2017
New Revision: 296664
URL: http://llvm.org/viewvc/llvm-project?rev=296664&view=rev
Log:
clang-format: [JS] Properly format object literals with shorthands.
Before:
return {
a,
b: 'b', c,
};
After:
return {
a,
b: 'b',
c,
};
On Mon, Mar 6, 2017 at 6:29 PM, Krasimir Georgiev via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> Author: krasimir
> Date: Mon Mar 6 11:29:25 2017
> New Revision: 297034
>
> URL: http://llvm.org/viewvc/llvm-project?rev=297034&view=rev
> Log:
> [clang-format] Add tests for ambiguous namespa
Author: djasper
Date: Wed Mar 8 03:49:12 2017
New Revision: 297268
URL: http://llvm.org/viewvc/llvm-project?rev=297268&view=rev
Log:
clang-format: Get slightly better at understanding */&.
Before:
void f() { MACRO(A * const a); }
After:
void f() { MACRO(A *const a); }
Modified:
cfe/tru
Author: djasper
Date: Mon Mar 13 19:40:32 2017
New Revision: 297696
URL: http://llvm.org/viewvc/llvm-project?rev=297696&view=rev
Log:
clang-format: Make it very slighly more expensive to wrap between "= {".
This prevents unwanted fallout from r296664. Specifically in proto formatting,
this change
Author: djasper
Date: Tue Nov 29 03:40:01 2016
New Revision: 288119
URL: http://llvm.org/viewvc/llvm-project?rev=288119&view=rev
Log:
clang-format: Fix unnnecessary line break.
Before:
aa((,
), //
,
a);
After:
aa
Author: djasper
Date: Tue Nov 29 03:40:36 2016
New Revision: 288121
URL: http://llvm.org/viewvc/llvm-project?rev=288121&view=rev
Log:
clang-format: [JS] Properly format dict literals that skip labels.
Modified:
cfe/trunk/lib/Format/TokenAnnotator.cpp
cfe/trunk/unittests/Format/FormatTestJ
Author: djasper
Date: Tue Nov 29 03:40:32 2016
New Revision: 288120
URL: http://llvm.org/viewvc/llvm-project?rev=288120&view=rev
Log:
clang-format: Wrap complex binary expressions on the RHS of a comma.
Specifically, if the RHS of a comma is a complex binary expression and
spans multiple lines, i
Author: djasper
Date: Sun Dec 4 16:34:37 2016
New Revision: 288626
URL: http://llvm.org/viewvc/llvm-project?rev=288626&view=rev
Log:
Revert "Recover better from an incompatible .pcm file being provided by
-fmodule-file=. We try to include the headers of the module textually in this
case, still
This is unfortunately causing problems as is, as it can change the
diagnostic that's created when the include of a module with config-mismatch
is inside a namespace. I have tried to fix this for a bit, but I am not
sure what the right solution is. For now, I have reverted this in r288626
and left t
Author: djasper
Date: Mon Dec 12 06:42:29 2016
New Revision: 289428
URL: http://llvm.org/viewvc/llvm-project?rev=289428&view=rev
Log:
clang-format: Separate out a language kind for ObjC.
While C(++) and ObjC are generally formatted the same way and can be
mixed, people might want to choose differ
Author: djasper
Date: Tue Dec 13 04:05:03 2016
New Revision: 289525
URL: http://llvm.org/viewvc/llvm-project?rev=289525&view=rev
Log:
clang-format: Improve braced-list detection.
Before:
vector v { 12 }
GUARDED_BY(mutex);
After:
vector v{12} GUARDED_BY(mutex);
Modified:
cfe/trunk/
Author: djasper
Date: Tue Dec 13 05:16:42 2016
New Revision: 289531
URL: http://llvm.org/viewvc/llvm-project?rev=289531&view=rev
Log:
clang-format: Keep string-literal-label + value pairs on a line.
We have previously done that for <<-operators. This patch also adds
this logic for "," and "+".
B
Author: djasper
Date: Mon Apr 24 09:28:49 2017
New Revision: 301182
URL: http://llvm.org/viewvc/llvm-project?rev=301182&view=rev
Log:
clang-format: Fix bad corner case in formatting of function types.
Before:
std::function<
LngTemplatedType*(
Long
I'll revert this as it makes the following snippet makes clang crash:
class SomeClass {
public:
void foo() {
auto l = [this] { auto l = [] EXCLUSIVE_LOCKS_REQUIRED(mu_) {}; };
}
Mutex mu_;
};
(e.g. this can be added to test/SemaCXX/warn-thread-safety-parsing.cpp)
>From a brief look at
Author: djasper
Date: Tue May 2 07:38:27 2017
New Revision: 301916
URL: http://llvm.org/viewvc/llvm-project?rev=301916&view=rev
Log:
Revert r301735 (and subsequent r301786).
It leads to clang crashing, e.g. on this short code fragment (added to
test/SemaCXX/warn-thread-safety-parsing.cpp):
cl
I forgot the () in the lambda definition, this should be:
..
auto l = [this] { auto l = []() EXCLUSIVE_LOCKS_REQUIRED(mu_) {}; };
..
Doesn't change the fact that clang segfaults without this revert, though.
On Tue, May 2, 2017 at 2:38 PM, Daniel Jasper via cfe-commits <
cfe
Author: djasper
Date: Tue May 2 14:21:42 2017
New Revision: 301963
URL: http://llvm.org/viewvc/llvm-project?rev=301963&view=rev
Log:
Revert r301822 (and dependent r301825), which tried to improve the
handling of constexprs with unknown bounds.
This triggers a corner case of the language where it
Author: djasper
Date: Wed May 3 02:48:27 2017
New Revision: 302003
URL: http://llvm.org/viewvc/llvm-project?rev=302003&view=rev
Log:
Silences gcc's -Wnarrowing.
I think this is a false positive in GCC's warning, but nonetheless, we
should try to be warning-free. Smaller reproducer (reproduces wi
Author: djasper
Date: Wed May 3 06:27:34 2017
New Revision: 302012
URL: http://llvm.org/viewvc/llvm-project?rev=302012&view=rev
Log:
Undo turning ExtBehavior into a bitfield.
This produces warnings that I can't explain in a GCC build:
In file included from ../tools/clang/include/clang/Lex/LexDi
Author: djasper
Date: Mon May 8 10:08:00 2017
New Revision: 302428
URL: http://llvm.org/viewvc/llvm-project?rev=302428&view=rev
Log:
[clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding
DontAlign
This converts the clang-format option AlignEscapedNewlinesLeft from a
boolean to an en
Author: djasper
Date: Mon May 15 02:51:10 2017
New Revision: 303037
URL: http://llvm.org/viewvc/llvm-project?rev=303037&view=rev
Log:
Revert r302965 - [modules] When creating a declaration, cache its owning
module immediately
Also revert dependent r302969. This is leading to crashes.
Will provide
This was leading to many crashers. Reverted in r303037.
On Sat, May 13, 2017 at 1:27 AM, Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> Author: rsmith
> Date: Fri May 12 18:27:00 2017
> New Revision: 302965
>
> URL: http://llvm.org/viewvc/llvm-project?rev=302965&view=rev
> L
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D25768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
djasper accepted this revision.
djasper added a reviewer: djasper.
djasper added a comment.
I don't know whether it is an intentional choice to remove this comment. I'd be
fine either way (I think there are arguments for and against it). So, this
looks good to me. But maybe Eric has something to
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: unittests/Format/FormatTestJS.cpp:1280
+TEST_F(FormatTestJS, TemplateStringASI) {
+ verifyFormat("var x = `hello${world}`;", "var x = `hello${\n"
+
djasper added a comment.
Generally, always upload diffs with the full file as context to phabricator.
That way, it is easier to see how the diff fits into the rest of the file.
Thanks for fixing this!!
Comment at: lib/Format/FormatTokenLexer.cpp:528
FormatTok->TokenText
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good. Thank you!
https://reviews.llvm.org/D25439
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/ma
djasper added inline comments.
Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:28
stmt(forEach(
- ifStmt(hasThen(stmt(
+ ifStmt(unless(hasParent(ifStmt())),
+ hasThen(stmt(
I think this now effectively does:
djasper added inline comments.
Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:28
stmt(forEach(
- ifStmt(hasThen(stmt(
+ ifStmt(unless(hasParent(ifStmt())),
+ hasThen(stmt(
idlecode wrote:
> djasper wrote:
> >
djasper added inline comments.
Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:28
stmt(forEach(
- ifStmt(hasThen(stmt(
+ ifStmt(unless(hasParent(ifStmt())),
+ hasThen(stmt(
idlecode wrote:
> djasper wrote:
> >
djasper added inline comments.
Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:28
stmt(forEach(
- ifStmt(hasThen(stmt(
+ ifStmt(unless(hasParent(ifStmt())),
+ hasThen(stmt(
idlecode wrote:
> djasper wrote:
> >
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
https://reviews.llvm.org/D26132
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
Author: djasper
Date: Mon Oct 31 08:18:25 2016
New Revision: 285569
URL: http://llvm.org/viewvc/llvm-project?rev=285569&view=rev
Log:
clang-format: [JS] Fix missing space after 'yield'.
Before:
class X {
delete(val) {
return null;
}
* gen() {
yield[1, 2];
}
* gen
Author: djasper
Date: Mon Oct 31 08:23:00 2016
New Revision: 285570
URL: http://llvm.org/viewvc/llvm-project?rev=285570&view=rev
Log:
Skip over AnnotatedLines with >50 levels of nesting; don't format them.
Reasoning:
- ExpressionParser uses a lot of stack for these, bad in some environments.
- Ou
djasper closed this revision.
djasper added a comment.
Committed as r285570.
https://reviews.llvm.org/D26132
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: djasper
Date: Tue Nov 1 01:23:19 2016
New Revision: 285674
URL: http://llvm.org/viewvc/llvm-project?rev=285674&view=rev
Log:
clang-format: Fix bug in function reference qualifier detection.
Before:
template
void F(T) &&
= delete;
After:
template
void F(T) && = delete
Author: djasper
Date: Tue Nov 1 01:22:59 2016
New Revision: 285670
URL: http://llvm.org/viewvc/llvm-project?rev=285670&view=rev
Log:
clang-format: [JS] Fix formatting of generator functions.
Before:
var x = {
a: function*
() {
//
}
}
After:
var x = {
a: f
Author: djasper
Date: Tue Nov 1 01:23:05 2016
New Revision: 285671
URL: http://llvm.org/viewvc/llvm-project?rev=285671&view=rev
Log:
clang-format: Fix incorrect binary operator detection.
Before:
int x = f(* + [] {});
After:
int x = f(*+[] {});
Modified:
cfe/trunk/lib/Format/TokenAnnot
Author: djasper
Date: Tue Nov 1 01:23:10 2016
New Revision: 285672
URL: http://llvm.org/viewvc/llvm-project?rev=285672&view=rev
Log:
clang-format: [JS] Fix incorrect space when "as" is used as identifier.
Before:
a.as ();
After:
a.as();
Modified:
cfe/trunk/lib/Format/TokenAnnot
Author: djasper
Date: Tue Nov 1 01:22:54 2016
New Revision: 285669
URL: http://llvm.org/viewvc/llvm-project?rev=285669&view=rev
Log:
clang-format: [JS] Fix space when for is used as regular identifier.
Before:
x.for () = 1;
After:
x.for() = 1;
Modified:
cfe/trunk/lib/Format/TokenAnnota
101 - 200 of 731 matches
Mail list logo