Issue 134390
Summary [clang-format] Add target language & standard to the documentation
Labels documentation
Assignees
Reporter SunBlack
    Sometimes we waste some time thinking about whether a new check is relevant for us. For example, the [`AllowShortCaseExpressionOnASingleLine`](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#allowshortcaseexpressiononasingleline) option was added in Clang-Format 19. As a C++ developer, I was not familiar with the syntax, so I first looked to see if it was a language construct from a newer standard that I was not yet familiar with (e.g. C++26). It wasn't until I took a look at the source code, or the PR for it (#91112), that I saw that this option is apparently Java-specific and therefore not relevant for us.

It would therefore be practical if the languages were included in the documentation, e.g. via:
![Image](https://github.com/user-attachments/assets/20b0db33-a069-4773-b90d-fef3de68d4d3)
In case it is for all languages it could be `Languages: all` (I think there should be a badge even in this case, so it is clear, that no one missed to document this).

In case of specific required versions of the standard, it could look like this:

![Image](https://github.com/user-attachments/assets/30967f92-ba6c-4fa6-9174-c0f51308ecfb)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to