================
@@ -4427,7 +4427,13 @@ const char *StyleOptionHelpDescription =
"4. \"{key: value, ...}\" to set specific parameters, e.g.:\n"
" --style=\"{BasedOnStyle: llvm, IndentWidth: 8}\"";
-static FormatStyle::LanguageKind getLanguageByFileName(StringRef FileName) {
+static FormatStyle::LanguageKind getLanguageByFileName(StringRef &FileName) {
+ constexpr std::array TemplateSuffixes{StringRef{".in"},
+ StringRef{".template"}};
----------------
HazardyKnusperkeks wrote:
I tried to research that (with and without a LLM) and from that I get than
`.in` is the most common for our use case, but it also listed `.template`, at
my old job we had some `.template` files, but they weren't C++ code, I added it
to show there could be more.
https://github.com/llvm/llvm-project/pull/191502
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits