aaron.ballman added inline comments.

================
Comment at: 
clang-tools-extra/docs/clang-tidy/checks/readability/header-guard.rst:31
+     Use ``#pragma once`` instead of macro guards. Note that ``#pragma once``
+     is not part of the C++ standard, and may not work correctly in all cases.
----------------
It's also not in the C standard, so reworded slightly.


================
Comment at: 
clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp:569-571
+            runPragmaOnceCheck("#ifndef BOTH_H\n"
+                               "#define BOTH_H\n"
+                               "#pragma once\n"
----------------
How about a test for:
```
#if !defined(HEADER_GUARD_H)
#define HEADER_GUARD_H 1

#endif
```
and a test for what happens when there's no header guard or pragma once in the 
file.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142123/new/

https://reviews.llvm.org/D142123

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to