diff options
author | Juan Gu <juan.gu@mongodb.com> | 2023-02-23 19:05:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-23 23:17:58 +0000 |
commit | 248888231318f0423bf78234d2f120585f4fdd6a (patch) | |
tree | dc4a087f4dd4c48b3234fbf7f0a10a25fafd02bc /buildscripts/linter | |
parent | 307fa56fe32f797b13df4b22425868d107447fd4 (diff) | |
download | mongo-248888231318f0423bf78234d2f120585f4fdd6a.tar.gz |
SERVER-71742 Move volatile keyword lint to clang-tidy
Diffstat (limited to 'buildscripts/linter')
-rw-r--r-- | buildscripts/linter/simplecpplint.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/buildscripts/linter/simplecpplint.py b/buildscripts/linter/simplecpplint.py index d82b30af217..399ad2893b0 100644 --- a/buildscripts/linter/simplecpplint.py +++ b/buildscripts/linter/simplecpplint.py @@ -54,7 +54,6 @@ _RE_LINT = re.compile("//.*NOLINT") _RE_COMMENT_STRIP = re.compile("//.*") _RE_PATTERN_MONGO_POLYFILL = _make_polyfill_regex() -_RE_VOLATILE = re.compile('[^_]volatile') _RE_MUTEX = re.compile('(^|[ ({,])stdx?::mutex[ ({]') _RE_ASSERT = re.compile(r'\bassert\s*\(') _RE_UNSTRUCTURED_LOG = re.compile(r'\blogd\s*\(') @@ -154,7 +153,6 @@ class Linter: if not self.clean_lines[linenum]: continue - self._check_for_mongo_volatile(linenum) self._check_for_mongo_polyfill(linenum) self._check_for_mongo_atomic(linenum) self._check_for_mongo_mutex(linenum) @@ -235,14 +233,6 @@ class Linter: if def_line is not None: self._error(def_line, 'mongodb/undefmacro', f'Missing "#undef {macro}"') - def _check_for_mongo_volatile(self, linenum): - line = self.clean_lines[linenum] - if _RE_VOLATILE.search(line) and not "__asm__" in line: - self._error( - linenum, 'mongodb/volatile', - 'Illegal use of the volatile storage keyword, use AtomicWord instead ' - 'from "mongo/platform/atomic_word.h"') - def _check_for_mongo_polyfill(self, linenum): line = self.clean_lines[linenum] match = _RE_PATTERN_MONGO_POLYFILL.search(line) |