Add automatic header guard checks/fixes (#1260)

My intent is to add CARBON_ bas a prefix, and this makes that easier by creating a tool for auto-fixing guards in general.

string_literal is a manual fix -- it had no guard and I didn't automate that (technically I think I could, especially by enforcing the file header/footer, but it didn't feel quite worth it to me).
This commit is contained in:
Jon Meow
2022-05-12 15:54:45 -07:00
committed by GitHub
parent 27c8d1fc12
commit 3825f97e43
10 changed files with 140 additions and 16 deletions
+3 -3
View File
@@ -2,8 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef TOOLCHAIN_SOURCE_SOURCEBUFFER_H_
#define TOOLCHAIN_SOURCE_SOURCEBUFFER_H_
#ifndef TOOLCHAIN_SOURCE_SOURCE_BUFFER_H_
#define TOOLCHAIN_SOURCE_SOURCE_BUFFER_H_
#include <string>
#include <utility>
@@ -74,4 +74,4 @@ class SourceBuffer {
} // namespace Carbon
#endif // TOOLCHAIN_SOURCE_SOURCEBUFFER_H_
#endif // TOOLCHAIN_SOURCE_SOURCE_BUFFER_H_