| Issue |
244125
|
| Summary |
[clang-format] BasedOnStyle required for `C` but not `Cpp`
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
KrisThielemans
|
If I don't have a line with `BasedOnStyle` in my .clang-format, but use `C`, I get
```
Error reading test.clang: Unsuitable
```
I don't need one for `Cpp`. On the other hand, when using `Cpp`, the documentation doesn't seem to give default values for any of the parameters.
I see that `--dump-config` never writes the `BasedOnStyle` (which makes some sense) and converts `C` to `Cpp`.
It seems to me that `C` and `Cpp` should behave the same. Ideally the defaults should be documented, but that might be painful, and it might be easier to add to the doc of `BasedOnStyle` to say that if this is not specified, the defaults are currently not documented and that this is therefore not recommended.
I'm using
```
clang-format version 23.1.0 (https://github.com/conda-forge/clangdev-feedstock 28ab51758156090b64f141cb7080164e57dbed08)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs