[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 23:56:33 PST 2024


steakhal wrote:

> +1 to @pogo59's comment about pruning complete paths - I suspect they're in the minority. Might be worth checking whether the `===` at the start and end is markup for any particular thing (I /think/ the `-*- C++ -*-` is load bearing for some editors to inform them this `.h` file is C++ not C, so I'm not sure about some other features of those top-of-file comments).

According to the [LLVM Coding Standard](https://llvm.org/docs/CodingStandards.html#file-headers), it should look like this:
```
//===-- llvm/Instruction.h - Instruction class definition -------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file contains the declaration of the Instruction class, which is the
/// base class for all of the VM instructions.
///
//===----------------------------------------------------------------------===//
```
And also explicitly notes:
> This tag ["-*- C++ -*-"] is not necessary in .cpp files. The name of the file is also on the first line, along with a very short description of the purpose of the file.

I could probably interpret this as we could drop the path to the file, but keep the last part.

How should I proceed?

https://github.com/llvm/llvm-project/pull/82919


More information about the cfe-commits mailing list