summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
Commit message (Collapse)AuthorAgeFilesLines
...
* Config file support for clang-format, part 2.Alexander Kornienko2013-05-101-8/+17
| | | | | | | | | | | | | | | | | | | | Summary: Adds actual config file reading to the clang-format utility. Configuration file name is .clang-format. It is looked up for each input file in its parent directories starting from immediate one. First found .clang-format file is used. When using standard input, .clang-format is searched starting from the current directory. Added -dump-config option to easily create configuration files. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits, jordan_rose, kimgr Differential Revision: http://llvm-reviews.chandlerc.com/D758 llvm-svn: 181589
* Fix bug when formatting overloaded operators.Daniel Jasper2013-05-102-1/+5
| | | | | | | | | | | Before, the actual operator of an overloaded operator declaration was handled as a binary operator an thus, clang-format could not find valid formattings for many examples, e.g.: template <typename AAAAAAA, typename BBBBBBB> AAAAAAA operator/(const AAAAAAA &a, BBBBBBB &b); llvm-svn: 181585
* Further fix to pointer to member formatting.Daniel Jasper2013-05-081-1/+2
| | | | | | | | With style where the *s go with the type: Before: typedef bool* (Class:: *Member)() const; After: typedef bool* (Class::*Member)() const; llvm-svn: 181439
* Fix formatting of pointers to members.Daniel Jasper2013-05-082-8/+10
| | | | | | Before: int(S::*func)(void *); After: int (S::*func)(void *); llvm-svn: 181438
* Improve line breaking in binary expressions.Daniel Jasper2013-05-082-29/+38
| | | | | | | | | | | | | | | | | | | | | | | If the LHS of a binary expression is broken, clang-format should also break after the operator as otherwise: - The RHS can be easy to miss - It can look as if clang-format doesn't understand operator precedence Before: bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd; After: bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd; As an additional note, clang-format would also be ok with the following formatting, it just has a higher penalty (IMO correctly so). bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd; llvm-svn: 181430
* Change indentation of multi-line nested name specifiers.Daniel Jasper2013-05-081-12/+3
| | | | | | | | | | | | | | | | | | | Before: aaaaaaaa:: aaaaaaaa:: aaaaaaaa(); After: aaaaaaaa:: aaaaaaaa:: aaaaaaaa(); The reason for the change is that: a) we are not sure which is better b) it is a really rare edge case c) it simplifies the code d) it currently causes problems with memoization llvm-svn: 181421
* Config file support for clang-format, part 1.Alexander Kornienko2013-05-071-0/+81
| | | | | | | | | | | | | | | | | Summary: Added parseConfiguration method, which reads FormatStyle from YAML string. This supports all FormatStyle fields and an additional BasedOnStyle field, which can be used to specify base style. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D754 llvm-svn: 181326
* Correctly recognize dereference after 'delete'.Daniel Jasper2013-05-071-3/+3
| | | | | | | | With certain styles: Before: delete* x; After: delete *x; llvm-svn: 181318
* Added Mozilla style, cleaned get*Style methods.Alexander Kornienko2013-05-061-20/+32
| | | | | | | | | | | | | | Summary: Patch based on a patch by Ehsan Akhgari. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D750 llvm-svn: 181196
* Don't break comments after includes.Daniel Jasper2013-05-061-1/+3
| | | | | | | | | | LLVM/Clang basically don't use such comments and for Google-style, include-lines are explicitly exempt from the column limit. Also, for most cases, where the column limit is violated, the "better" solution would be to move the comment to before the include, which clang-format cannot do (yet). llvm-svn: 181191
* Change indentation when breaking after a type.Daniel Jasper2013-05-063-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format did not indent any declarations/definitions when breaking after the type. With this change, it indents for all declarations but does not indent for function definitions, i.e.: Before: const SomeLongTypeName& some_long_variable_name; typedef SomeLongTypeName SomeLongTypeAlias; const SomeLongReturnType* SomeLongFunctionName(); const SomeLongReturnType* SomeLongFunctionName() { ... } After: const SomeLongTypeName& some_long_variable_name; typedef SomeLongTypeName SomeLongTypeAlias; const SomeLongReturnType* SomeLongFunctionName(); const SomeLongReturnType* SomeLongFunctionName() { ... } While it might seem inconsistent to indent function declarations, but not definitions, there are two reasons for that: - Function declarations are very similar to declarations of function type variables, so there is another side to consistency to consider. - There can be many function declarations on subsequent lines and not indenting can make them harder to identify. Function definitions are already separated by their body and not indenting makes the function name slighly easier to find. llvm-svn: 181187
* Break the class-inheritance ":" to the new line.Daniel Jasper2013-05-061-3/+1
| | | | | | | | | | | | | | | | | | This seems to be more common in LLVM, Google and Chromium. Before: class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC { }; After: class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC { }; llvm-svn: 181183
* Don't put a space before ellipsis.Daniel Jasper2013-05-061-0/+2
| | | | | | Before: template <class ... Ts> void Foo(Ts ... ts) { Foo(ts ...); } After: template <class... Ts> void Foo(Ts... ts) { Foo(ts...); } llvm-svn: 181182
* Add space between ; and (.Daniel Jasper2013-05-031-1/+1
| | | | | | Before: for (int i = 0;(i < 10); ++i) {} After: for (int i = 0; (i < 10); ++i) {} llvm-svn: 181020
* Fix expression recognition in for-loops.Daniel Jasper2013-05-031-0/+3
| | | | | | Before: for (; a&& b;) {} After: for (; a && b;) {} llvm-svn: 181017
* Improve clang-format's memoization behavior.Daniel Jasper2013-04-253-1/+25
| | | | | | | | | | | | | | | Deeply nested expressions basically break clang-format's memoization. This patch slightly improves the situations and makes expressions like aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa( aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa( aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa( aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa(aaaaa( aaaaa(aaaaa()))))))))))))))))))))))))))))))))))))))); work. llvm-svn: 180264
* Add option to align escaped newlines left.Daniel Jasper2013-04-253-48/+106
| | | | | | | | | | | | | | | This enables formattings like: #define A \ int aaaa; \ int b; \ int ccc; \ int dddddddddd; Enabling this for Google/Chromium styles only as I don't know whether it is desired for Clang/LLVM. llvm-svn: 180253
* Flip flag to merge short if-statements into one line for Google style.Daniel Jasper2013-04-241-1/+2
| | | | | | | This now allows clang-format to do: if (a) return; llvm-svn: 180187
* Fix comment alignment behavior.Daniel Jasper2013-04-242-3/+5
| | | | | | | | | | | In the following snippet, clang-format incorrectly aligned the trailing comment, when only the last line was formatted: int aaaaaa; // comment int b; int c; // Formatting only this line moved this comment. llvm-svn: 180173
* Fix formatting of complex #if expressions.Daniel Jasper2013-04-231-0/+5
| | | | | | | | | | | | | | Before: #if !defined(AAAAAAAAAAAAAAAA) && (defined CCCCCCCC || \ defined DDDDDDDD) && defined(BBBBBBBB) After: #if !defined(AAAAAAAAAAAAAAAA) && (defined CCCCCCCC || defined DDDDDDDD) && \ defined(BBBBBBBB) This fixes llvm.org/PR15828. llvm-svn: 180105
* Fix bin-packing behavior of constructor initialziers.Daniel Jasper2013-04-221-20/+15
| | | | | | | | | | | | | | | | | | | | In Google style, constructor initializers need to be all on one line or one initializer per line if that does not fit. Without this patch, this non-bin-packing-behavior incorrectly extends to the parameters of the initializers. Before: Constructor() : aaaaa(aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa) {} After: Constructor() : aaaaa(aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaa) {} llvm-svn: 180001
* Unified token breaking logic: support for line comments.Alexander Kornienko2013-04-176-224/+192
| | | | | | | | | | | | | | | | | | | Summary: Added BreakableLineComment, moved common code from BreakableBlockComment to newly added BreakableComment. As a side-effect of the rewrite, found another problem with escaped newlines and had to change code which removes trailing whitespace from line comments not to break after this patch. Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D682 llvm-svn: 179693
* Break after multiline parameters.Daniel Jasper2013-04-151-1/+3
| | | | | | | | | | | | | | | | | We do this in general, but missed a few cases. Before: void aaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbb bbbb); After: void aaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbb bbbb); llvm-svn: 179570
* Fix unused variable warning with assertions disabled.Alexander Kornienko2013-04-151-3/+4
| | | | llvm-svn: 179531
* Unified token breaking logic for strings and block comments.Alexander Kornienko2013-04-156-467/+804
| | | | | | | | | | | | | | | | | | | | | | Summary: Both strings and block comments are broken into lines in breakProtrudingToken. Logic specific for strings or block comments is abstracted in implementations of the BreakToken interface. Among other goodness, this change fixes placement of backslashes after a block comment inside a preprocessor directive (see removed FIXMEs in unit tests). The code is far from being polished, and some parts of it will be changed for line comments support. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D665 llvm-svn: 179526
* Revamps structural error detection / handling.Manuel Klimek2013-04-123-40/+44
| | | | | | | | | | | | | | | | | | | | | Previously we'd only detect structural errors on the very first level. This leads to incorrectly balanced braces not being discovered, and thus incorrect indentation. This change fixes the problem by: - changing the parser to use an error state that can be detected anywhere inside the productions, for example if we get an eof on SOME_MACRO({ some block <eof> - previously we'd never break lines when we discovered a structural error; now we break even in the case of a structural error if there are two unwrapped lines within the same line; thus, void f() { while (true) { g(); y(); } } will still be re-formatted, even if there's missing braces somewhere in the file - still exclude macro definitions from generating structural error; macro definitions are inbalanced snippets llvm-svn: 179379
* Change clang-format's affinity for breaking after return types.Daniel Jasper2013-04-112-6/+10
| | | | | | | | | | | | | Function declarations are now broken with the following preferences: 1) break amongst arguments. 2) break after return type. 3) break after (. 4) break before after nested name specifiers. Options #2 or #3 are preferred over #1 only if a substantial number of lines can be saved by that. llvm-svn: 179287
* Fix formatting of overloaded assignment operators.Daniel Jasper2013-04-111-1/+2
| | | | | | Before: SomeType &operator=(const SomeType & S); After: SomeType &operator=(const SomeType &S); llvm-svn: 179270
* Fixes recovering from errors when parsing braced init lists.Manuel Klimek2013-04-101-0/+25
| | | | | | | Before we would build huge unwrapped lines which take a long time to optimze. llvm-svn: 179168
* Fix labels with trailing comments and cleanup.Daniel Jasper2013-04-103-75/+62
| | | | | | | | | | | | | | | | | | Before: class A { public : // test }; After: class A { public: // test }; Also remove duplicate methods calculating properties of AnnotatedTokens and make them members of AnnotatedTokens so that they are in a common place. llvm-svn: 179167
* Fix comments before labels.Daniel Jasper2013-04-091-6/+13
| | | | | | | | | | | | | | | | | | | | | | Before: switch (...) { // a // b // c case first: break; } After: switch (...) { // a // b // c case first: break; } llvm-svn: 179107
* Again macros without trailing semicolons: don't care about declaration context.Alexander Kornienko2013-04-091-3/+30
| | | | | | | | | | | | | | | | Summary: Some codebases use these kinds of macros in functions, e.g. Chromium's IPC_BEGIN_MESSAGE_MAP, IPC_BEGIN_MESSAGE_HANDLER, etc. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D645 llvm-svn: 179099
* Recognize function-like macro usages without semicolon in declaration context.Alexander Kornienko2013-04-081-9/+16
| | | | | | | | | | | | | | | | | | | | Summary: Preserve line breaks after function-like macro usages without semicolon, e.g.: QQQ(xxx) class X { }; Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D638 llvm-svn: 179064
* Revamp indentation behavior for complex binary expressions.Daniel Jasper2013-04-083-43/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to indent according to operator precedence and pretty much identical to how stuff would be indented with parenthesis. Before: bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ccccccccccccccccccccccccccccccccccccccccc; After: bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ccccccccccccccccccccccccccccccccccccccccc; llvm-svn: 179049
* Revert accidental commit r179015.Daniel Jasper2013-04-083-43/+27
| | | | llvm-svn: 179016
* xDaniel Jasper2013-04-083-27/+43
| | | | llvm-svn: 179015
* Allow breaking after 'class' for classes with looong names.Daniel Jasper2013-04-051-1/+4
| | | | | | (Don't ask, this was a user request). llvm-svn: 178888
* Fix bad formatting of overloaded operator definitions.Daniel Jasper2013-04-051-1/+2
| | | | | | | | | | | | | | | | Before: bool operator< (const aaaaaaaaaaaaaaaaaaaaa &left, const aaaaaaaaaaaaaaaaaaaaa &right) { return left.group < right.group; } After: bool operator<(const aaaaaaaaaaaaaaaaaaaaa &left, const aaaaaaaaaaaaaaaaaaaaa &right) { return left.group < right.group; } llvm-svn: 178887
* Improve formatting of multi-variable DeclStmts.Daniel Jasper2013-04-051-3/+12
| | | | | | | | | | | | | | | | | | | | This fixed llvm.org/PR15670 Before: aaaaaaaaa a = aaaaaaaaaaaaaaaaaaaa, b = bbbbbbbbbbbbbbbbbbbb, c = cccccccccccccccccccc, d = dddddddddddddddddddd; aaaaaaaaa *a = aaaaaaaaaaaaaaaaaaa, *b = bbbbbbbbbbbbbbbbbbb, *c = ccccccccccccccccccc, *d = ddddddddddddddddddd; After: aaaaaaaaa a = aaaaaaaaaaaaaaaaaaaa, b = bbbbbbbbbbbbbbbbbbbb, c = cccccccccccccccccccc, d = dddddddddddddddddddd; aaaaaaaaa *a = aaaaaaaaaaaaaaaaaaa, *b = bbbbbbbbbbbbbbbbbbb, *c = ccccccccccccccccccc, *d = ddddddddddddddddddd; llvm-svn: 178860
* Fix bug discovered with address sanitizer.Daniel Jasper2013-04-041-2/+2
| | | | | | Now, this works again with an empty stack. llvm-svn: 178779
* Improve formatting of for loops and multi-variable DeclStmts.Daniel Jasper2013-04-033-21/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This combines several related changes: a) Don't break before after the variable types in for loops with a single variable. b) Better indent DeclStmts defining multiple variables. Before: bool aaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa), bbbbbbbbbbbbbbbbbbbbbbbbb = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(bbbbbbbbbbbbbbbb); for (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa = aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaa; aaaaaaaaaaa != aaaaaaaaaaaaaaaaaaa; ++aaaaaaaaaaa) { } After: bool aaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa), bbbbbbbbbbbbbbbbbbbbbbbbb = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(bbbbbbbbbbbbbbbb); for (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa = aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaa; aaaaaaaaaaa != aaaaaaaaaaaaaaaaaaa; ++aaaaaaaaaaa) { } llvm-svn: 178641
* Even better way to handle comments adjacent to preprocessor directives.Alexander Kornienko2013-04-031-3/+4
| | | | | | | | | | | | | | | | | | Summary: It turns out that we don't need to store CommentsBeforeNextToken in the line state, but rather flush them before we start parsing preprocessor directives. This fixes wrong comment indentation in code blocks in macro calls (the test is included). Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D617 llvm-svn: 178638
* Cleanup, add comments and address review comments.Daniel Jasper2013-04-031-9/+18
| | | | | | No functional changes. llvm-svn: 178626
* Fix some inconsistent use of indentation.Daniel Jasper2013-04-021-15/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically we have always special-cased the top-level statement of an unwrapped line (the one with ParenLevel == 0) and that lead to several inconsistencies. All added tests were formatted in a strange way, for example: Before: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()) { } After: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(); if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()) { } llvm-svn: 178542
* Alternative handling of comments adjacent to preprocessor directives.Alexander Kornienko2013-04-021-1/+3
| | | | | | | | | | | | | | Summary: Store comments in ScopedLineState Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D609 llvm-svn: 178537
* Improve formatting of function types.Daniel Jasper2013-04-012-9/+4
| | | | | | Before: void * (*a)(int *, SomeType *); After: void *(*a)(int *, SomeType *); llvm-svn: 178474
* Fixed handling of comments before preprocessor directives.Alexander Kornienko2013-03-281-0/+1
| | | | | | | | | Comments before preprocessor directives used to be stored with InPPDirective flag set, which prevented correct comment splitting in this case. Fixed by flushing comments before switching on InPPDirective. Added a new test and fixed one of the existing tests. llvm-svn: 178261
* Insert extra new line before access specifiers.Alexander Kornienko2013-03-272-18/+29
| | | | | | | | | | | | | | Summary: Insert extra new line before access specifiers. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D581 llvm-svn: 178149
* Split line commentsAlexander Kornienko2013-03-271-33/+86
| | | | | | | | | | | | | | | | Summary: Split line comments that exceed column limit + fixed leading whitespace handling when splitting block comments. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D577 llvm-svn: 178133
* Better fix for r177725.Daniel Jasper2013-03-222-7/+4
| | | | | | | | | | | | It turns out that -foo; can be an objective C method declaration. So instead of the previous solution, recognize objective C methods only if we are in a declaration scope. llvm-svn: 177740
OpenPOWER on IntegriCloud