[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 3c412791 1/8: Allow certain reserved names
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 3c412791 1/8: Allow certain reserved names |
Date: |
Thu, 19 May 2022 13:28:58 -0400 (EDT) |
branch: master
commit 3c412791e44a1db2be9cde069386f4b269073168
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Allow certain reserved names
Even though '__func__' and '__builtin_'-prefixed functions are not
currently used in lmi, they are potentially useful, and these changes
were already written and tested for discarded branches.
---
test_coding_rules.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test_coding_rules.cpp b/test_coding_rules.cpp
index be3f7faf..45446e00 100644
--- a/test_coding_rules.cpp
+++ b/test_coding_rules.cpp
@@ -934,6 +934,7 @@ bool check_reserved_name_exception(std::string const& s)
,"__STDC_IEC_559__"
,"__STDC__"
,"__cplusplus"
+ ,"__func__"
,"__has_include"
// Platform identification.
,"_M_IX86"
@@ -1030,7 +1031,11 @@ bool check_reserved_name_exception(std::string const& s)
,"__XSLT_LIBXSLT_H__"
,"__mp_copymem"
};
- return contains(z, s) || begins_with(s, "__cpp_");
+ return
+ contains(z, s)
+ || begins_with(s, "__builtin_")
+ || begins_with(s, "__cpp_")
+ ;
}
/// Check names reserved by C++2003 [17.4.3.1.2].
- [lmi-commits] [lmi] master updated (041ca2fb -> a28eba74), Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 3c412791 1/8: Allow certain reserved names,
Greg Chicares <=
- [lmi-commits] [lmi] master 00d58837 3/8: Test forbiddance of some reserved names, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 1f4c7138 2/8: Allow 'test_coding_rules_test.sh' to contain reserved names, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 776827ee 4/8: Avoid typewriter-style citations, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 9c348d06 5/8: Avoid using _this_ style for emphasis, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 8ecde06f 6/8: Avoid reserved names in token pasting, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 15b60953 7/8: Avoid reserved names and anything resembling them, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master a28eba74 8/8: Forbid "_Forbidden" [273], Greg Chicares, 2022/05/19