[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/6751 Here is the releva

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/128122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
@@ -3353,7 +3353,12 @@ struct FormatStyle { } bool isTableGen() const { return Language == LK_TableGen; } - /// Language, this format style is targeted at. + /// The language that this format style targets. + /// \note + /// You can also specify the language (``Cpp``

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/128122 >From 507c54acac3e73826f63691c901ceba9c569869f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 20 Feb 2025 20:02:44 -0800 Subject: [PATCH 1/2] [clang-format] Allow specifying the language for `.h` files Clos

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
owenca wrote: > I think > > ``` > // clang-format Language: ObjC > ``` > > is fine, I just wondered if we wanted to support the Emacs mode as well.. > (maybe a later commit if someone specifically asks) Got it, but nah. https://github.com/llvm/llvm-project/pull/128122 ___

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
@@ -4782,7 +4782,13 @@ the configuration (without a prefix: ``Auto``). .. _Language: **Language** (``LanguageKind``) :versionbadge:`clang-format 3.5` :ref:`¶ ` - Language, this format style is targeted at. + The language that this format style targets. + + .. note:: + +

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
@@ -3353,7 +3353,12 @@ struct FormatStyle { } bool isTableGen() const { return Language == LK_TableGen; } - /// Language, this format style is targeted at. + /// The language that this format style targets. + /// \note + /// You can also specify the language (``Cpp``

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
@@ -3353,7 +3353,12 @@ struct FormatStyle { } bool isTableGen() const { return Language == LK_TableGen; } - /// Language, this format style is targeted at. + /// The language that this format style targets. + /// \note + /// You can also specify the language (``Cpp``

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Björn Schäpers via cfe-commits
@@ -3353,7 +3353,12 @@ struct FormatStyle { } bool isTableGen() const { return Language == LK_TableGen; } - /// Language, this format style is targeted at. + /// The language that this format style targets. + /// \note + /// You can also specify the language (``Cpp``

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread via cfe-commits
mydeveloperday wrote: I think ``` // clang-format Language: ObjC ``` is fine, I just wondered if we wanted to support the Emacs mode as well.. (maybe a later commit if someone specifically asks) https://github.com/llvm/llvm-project/pull/128122 ___

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-20 Thread Owen Pan via cfe-commits
owenca wrote: > a bit old school.. > > ``` > /* -*- Mode: C++; -*- */ > /* -*- Mode: C; -*- */ > /* -*- Mode: objc; -*- */ > ``` We support the following now: ```cpp // clang-format off // clang-format off: reason // clang-format on // clang-format on: reason /* clang-format off */ /* clang-for

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-20 Thread via cfe-commits
mydeveloperday wrote: a bit old school.. ``` /* -*- Mode: C++; -*- */ /* -*- Mode: C; -*- */ /* -*- Mode: objc; -*- */ ``` https://github.com/llvm/llvm-project/pull/128122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-20 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. I think this should help, I wonder if there is a equivalent of this (but for C/ObjC) that we can support ``` # -*-Mode: Makefile;-*- ``` https://github.com/llvm/llvm-project/pull/128122 _

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Closes #128119 --- Full diff: https://github.com/llvm/llvm-project/pull/128122.diff 5 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst (+7-1) - (modified) clang/docs/ReleaseNotes.rst

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Owen Pan (owenca) Changes Closes #128119 --- Full diff: https://github.com/llvm/llvm-project/pull/128122.diff 5 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst (+7-1) - (modified) clang/docs/ReleaseNotes.rst (+3) -

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/128122 Closes #128119 >From 507c54acac3e73826f63691c901ceba9c569869f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 20 Feb 2025 20:02:44 -0800 Subject: [PATCH] [clang-format] Allow specifying the language for `.h`