[LLVMbugs] [Bug 14679] New: I can't figure out how to use clang-format
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Dec 20 20:46:14 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14679
Bug #: 14679
Summary: I can't figure out how to use clang-format
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Here's my attempt:
Nicos-MacBook-Pro:src thakis$ ~/src/llvm/Release+Asserts/bin/clang-format -h
clang-format: Unknown command line argument '-h'. Try:
'/Users/thakis/src/llvm/Release+Asserts/bin/clang-format -help'
clang-format: Did you mean '-help'?
Nicos-MacBook-Pro:src thakis$ ~/src/llvm/Release+Asserts/bin/clang-format -help
USAGE: clang-format [options]
OPTIONS:
-fatal-assembler-warnings - Consider warnings as error
-help - Display available options (-help-hidden for more)
-length=<int> - Format a range of this length, -1 for end of
file.
-offset=<int> - Format a range starting at this file offset.
-stats - Enable statistics output from program
-style=<string> - Coding style, currently supports: LLVM, Google.
-version - Display the version of this program
Nicos-MacBook-Pro:src thakis$ mvim test.c
Nicos-MacBook-Pro:src thakis$ ~/src/llvm/Release+Asserts/bin/clang-format
test.c
clang-format: Unknown command line argument 'test.c'. Try:
'/Users/thakis/src/llvm/Release+Asserts/bin/clang-format -help'
Recommendations:
0. -h could be an alias for -help (but it isn't in clang either)
1. the tool should support a file argument
2. and a -o argument (and some flag for "in-place formatting")
3. the help should mention that the tool reads from stdin by default
4. the help should print a short synopsis ("this formats c++ code according to
$blah")
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list