正确的LLVM标头保护样式是什么? [英] What is proper LLVM header guard style?

查看:91
本文介绍了正确的LLVM标头保护样式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在clang整洁的情况下,检查 [llvm- header-guard] 寻找LLVM样式的标题保护,但是我找不到合适的LLVM标题保护样式的任何示例,特别是给定义的名称的结构

In clang tidy, the check [llvm-header-guard] looks for LLVM style header guards, but I can't find any examples of proper LLVM header guard style, specifically the structure of the name given to the define, the coding standards pages does not mention anything.

推荐答案

查看单元测试:

它似乎接受了常用模式的一些变体.对于名为include/llvm/ADT/foo.h的文件,约定似乎是:

it seems to accept a few variations on the commonly used patterns. For a file named include/llvm/ADT/foo.h the convention seems to be:

#ifndef LLVM_ADT_FOO_H
#define LLVM_ADT_FOO_H
//...
#endif // LLVM_ADT_FOO_H

这篇关于正确的LLVM标头保护样式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆