-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Closed as not planned
Closed as not planned
Copy link
Labels
clang-formatobsoleteIssues with old (unsupported) versions of LLVMIssues with old (unsupported) versions of LLVM
Description
Let this be the file, unformatted.c, to be formatted in the examples:
int main(int argc , char * argv [] ) {
int * thing;
int *eee;
}This will not format the C code at all as clang-format returns Configuration file(s) do(es) not support C++:
---
Language: C
IndentWidth: 9
PointerAlignment: LeftAdding BaseOnStyle: LLVM to the top of the file will run without an error, but the custom settings defined are ignored:
BasedOnStyle: LLVM
---
Language: C
IndentWidth: 9
PointerAlignment: LeftFormatted file:
int main(int argc, char *argv[]) {
int *thing;
int *eee;
}For some reason, changing Language: C to use Cpp works.
BasedOnStyle: LLVM
---
Language: Cpp
IndentWidth: 9
PointerAlignment: LeftFormatted file:
int main(int argc, char* argv[]) {
int* thing;
int* eee;
}Why is Language: C ignored?
clang-format version:
$ clang-format-21 --version
Debian clang-format version 21.0.0 (++20250612091244+3f0cf742ac4e-1~exp1)
Metadata
Metadata
Assignees
Labels
clang-formatobsoleteIssues with old (unsupported) versions of LLVMIssues with old (unsupported) versions of LLVM