[llvm-bugs] [Bug 25143] New: Option AlignConsecutiveDeclarations doesn't work
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 12 04:13:51 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=25143
Bug ID: 25143
Summary: Option AlignConsecutiveDeclarations doesn't work
Product: clang
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: superkarl0_0 at 163.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Classification: Unclassified
If I add the AlignConsecutiveDeclarations to the .clang-format file and format
codes in Emacs 24.3.1, it breaks everything.
Codes before formatting:
-----------------------------------------------------------------------
void Test::foo()
{
int foo1 = 1;
int fooo2 = 2;
std::string thisString = "aaaa";
}
Codes after formatting:
-----------------------------------------------------------------------
void Test::foo() {
int foo1 = 1;
int fooo2 = 2;
std::string thisString = "aaaa";
}
Here is my .clang-format file:
---
# We'll use defaults from the LLVM style, but with 4 columns indentation.
BasedOnStyle: LLVM
IndentWidth: 4
AllowShortFunctionsOnASingleLine: None
IndentCaseLabels: true
AlignConsecutiveAssignments: true
#AlignConsecutiveDeclarations: true
---
Language: Cpp
# Add custom config here.
BreakBeforeBraces: Allman
ConstructorInitializerAllOnOneLineOrOnePerLine: true
PointerAlignment: Left
BinPackParameters: false
---
Language: JavaScript
# Use 100 columns for JS.
ColumnLimit: 100
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151012/0c7c141a/attachment.html>
More information about the llvm-bugs
mailing list