lmi-commits
[Top][All Lists]
Advanced

[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].



reply via email to

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