<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 20, 2020 at 3:32 PM Eric Christopher via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Eric Christopher<br>
Date: 2020-06-20T00:58:04-07:00<br>
New Revision: f305176bc606eb1e6aab116d84125a38edae7047<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/f305176bc606eb1e6aab116d84125a38edae7047" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/f305176bc606eb1e6aab116d84125a38edae7047</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/f305176bc606eb1e6aab116d84125a38edae7047.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/f305176bc606eb1e6aab116d84125a38edae7047.diff</a><br>
<br>
LOG: [cpplint] As part of using inclusive language within the llvm project,<br>
migrate away from the use of blacklist and whitelist.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    compiler-rt/lib/sanitizer_common/scripts/cpplint.py<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/compiler-rt/lib/sanitizer_common/scripts/cpplint.py b/compiler-rt/lib/sanitizer_common/scripts/cpplint.py<br>
index 65baa6cc1603..59e99f2585e8 100755<br>
--- a/compiler-rt/lib/sanitizer_common/scripts/cpplint.py<br>
+++ b/compiler-rt/lib/sanitizer_common/scripts/cpplint.py<br>
@@ -3866,8 +3866,8 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error):<br>
<br>
   # Block bodies should not be followed by a semicolon.  Due to C++11<br>
   # brace initialization, there are more places where semicolons are<br>
-  # required than not, so we use a whitelist approach to check these<br>
-  # rather than a blacklist.  These are the places where "};" should<br>
+  # required than not, so we use a allowed list approach to check these<br></blockquote><div>s/a allowed/an allowed/;<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+  # rather than an exclusion list.  These are the places where "};" should<br>
   # be replaced by just "}":<br>
   # 1. Some flavor of block following closing parenthesis:<br>
   #    for (;;) {};<br>
@@ -3924,11 +3924,11 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error):<br>
     #  - INTERFACE_DEF<br>
     #  - EXCLUSIVE_LOCKS_REQUIRED, SHARED_LOCKS_REQUIRED, LOCKS_EXCLUDED:<br>
     #<br>
-    # We implement a whitelist of safe macros instead of a blacklist of<br>
+    # We implement a list of allowed safe macros instead of a list of<br>
     # unsafe macros, even though the latter appears less frequently in<br>
     # google code and would have been easier to implement.  This is because<br>
-    # the downside for getting the whitelist wrong means some extra<br>
-    # semicolons, while the downside for getting the blacklist wrong<br>
+    # the downside for getting the allowed list wrong means some extra<br>
+    # semicolons, while the downside for getting the exclusion list wrong<br>
     # would result in compile errors.<br>
     #<br>
     # In addition to macros, we also don't want to warn on<br>
@@ -5124,19 +5124,19 @@ def CheckForNonConstReference(filename, clean_lines, linenum,<br>
   #<br>
   # We also accept & in static_assert, which looks like a function but<br>
   # it's actually a declaration expression.<br>
-  whitelisted_functions = (r'(?:[sS]wap(?:<\w:+>)?|'<br>
+  allowed_functions = (r'(?:[sS]wap(?:<\w:+>)?|'<br>
                            r'operator\s*[<>][<>]|'<br>
                            r'static_assert|COMPILE_ASSERT'<br>
                            r')\s*\(')<br>
-  if Search(whitelisted_functions, line):<br>
+  if Search(allowed_functions, line):<br>
     return<br>
   elif not Search(r'\S+\([^)]*$', line):<br>
-    # Don't see a whitelisted function on this line.  Actually we<br>
+    # Don't see an allowed function entry on this line.  Actually we<br>
     # didn't see any function name on this line, so this is likely a<br>
     # multi-line parameter list.  Try a bit harder to catch this case.<br>
     for i in xrange(2):<br>
       if (linenum > i and<br>
-          Search(whitelisted_functions, clean_lines.elided[linenum - i - 1])):<br>
+          Search(allowed_functions, clean_lines.elided[linenum - i - 1])):<br>
         return<br>
<br>
   decls = ReplaceAll(r'{[^}]*}', ' ', line)  # exclude function body<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>