lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 00d58837 3/8: Test forbiddance of some reserv


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 00d58837 3/8: Test forbiddance of some reserved names
Date: Thu, 19 May 2022 13:29:00 -0400 (EDT)

branch: master
commit 00d588370f51d0327f858f42eb40adb2bdf6e413
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Test forbiddance of some reserved names
    
    "_Forbidden" is not yet forbidden.
---
 test_coding_rules_test.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test_coding_rules_test.sh b/test_coding_rules_test.sh
index a44aafea..55e31db6 100755
--- a/test_coding_rules_test.sh
+++ b/test_coding_rules_test.sh
@@ -274,6 +274,16 @@ for(int& i : bad_type())
 for(auto i : bad_ref())
 EOF
 
+cat >eraseme_cpp_008.cpp <<EOF
+$boilerplate
+#if defined _LIBC // Specifically allowed.
+#endif // defined _LIBC
+#if defined __GNUC__ // Specifically allowed.
+#endif // defined __GNUC__
+int  _Forbidden;
+bool __forbidden;
+EOF
+
 # Headers.
 
 cat >eraseme_hpp_000.hpp <<EOF
@@ -463,6 +473,7 @@ File 'eraseme_cpp_007.cpp' should have a space on both 
sides of the colon follow
 File 'eraseme_cpp_007.cpp' should have a space on both sides of the colon 
following the for-range-declaration, instead of ': '.
 File 'eraseme_cpp_007.cpp' for-range-declaration should deduce type rather 
than specify 'int'.
 File 'eraseme_cpp_007.cpp' for-range-declaration should use 'auto&' or 'auto 
const&' instead of 'auto '.
+File 'eraseme_cpp_008.cpp' contains reserved name '__forbidden'.
 File 'eraseme_hpp_001.hpp' lacks canonical closing header guard.
 File 'eraseme_hpp_002.hpp' lacks canonical opening header guard.
 File 'eraseme_hpp_003.hpp' lacks canonical opening header guard.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]