[llvm] e2c3d16 - [NFC] Eliminate need of Emacs tag and file name in file header (#118553)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 08:57:31 PST 2024


Author: Rahul Joshi
Date: 2024-12-04T08:57:27-08:00
New Revision: e2c3d16282aca0f7e13f58170140647632d627c9

URL: https://github.com/llvm/llvm-project/commit/e2c3d16282aca0f7e13f58170140647632d627c9
DIFF: https://github.com/llvm/llvm-project/commit/e2c3d16282aca0f7e13f58170140647632d627c9.diff

LOG: [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

Added: 
    

Modified: 
    llvm/docs/CodingStandards.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/CodingStandards.rst b/llvm/docs/CodingStandards.rst
index 6e90efe0f11197..d6d6ecf759cf38 100644
--- a/llvm/docs/CodingStandards.rst
+++ b/llvm/docs/CodingStandards.rst
@@ -177,7 +177,7 @@ the file. The standard header looks like this:
 
 .. code-block:: c++
 
-  //===-- 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.
@@ -191,17 +191,7 @@ the file. The standard header looks like this:
   ///
   //===----------------------------------------------------------------------===//
 
-A few things to note about this particular format: The "``-*- C++ -*-``" string
-on the first line is there to tell Emacs that the source file is a C++ file, not
-a C file (Emacs assumes ``.h`` files are C files by default).
-
-.. note::
-
-    This tag 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.
-
-The next section in the file is a concise note that defines the license that the
+The first section in the file is a concise note that defines the license that the
 file is released under.  This makes it perfectly clear what terms the source
 code can be distributed under and should not be modified in any way.
 


        


More information about the llvm-commits mailing list