Skip to content

Commit e2c3d16

Browse files
authored
[NFC] Eliminate need of Emacs tag and file name in file header (#118553)
- Simplify file header to not require file name and C++ Emacs tag. See https://discourse.llvm.org/t/is-c-in-header-files-still-relevant/83124/1
1 parent 9e66206 commit e2c3d16

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

llvm/docs/CodingStandards.rst

+2-12
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ the file. The standard header looks like this:
177177

178178
.. code-block:: c++
179179

180-
//===-- llvm/Instruction.h - Instruction class definition -------*- C++ -*-===//
180+
//===----------------------------------------------------------------------===//
181181
//
182182
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
183183
// See https://llvm.org/LICENSE.txt for license information.
@@ -191,17 +191,7 @@ the file. The standard header looks like this:
191191
///
192192
//===----------------------------------------------------------------------===//
193193

194-
A few things to note about this particular format: The "``-*- C++ -*-``" string
195-
on the first line is there to tell Emacs that the source file is a C++ file, not
196-
a C file (Emacs assumes ``.h`` files are C files by default).
197-
198-
.. note::
199-
200-
This tag is not necessary in ``.cpp`` files. The name of the file is also
201-
on the first line, along with a very short description of the purpose of the
202-
file.
203-
204-
The next section in the file is a concise note that defines the license that the
194+
The first section in the file is a concise note that defines the license that the
205195
file is released under. This makes it perfectly clear what terms the source
206196
code can be distributed under and should not be modified in any way.
207197

0 commit comments

Comments
 (0)