Lines Matching refs:Search

591   matched = Search(r'\bNOLINT(NEXTLINE)?\b(\([^)]+\))?', raw_line)
680 def Search(pattern, s): function
1497 if Search(r'\b(?:0[bBxX]?|[1-9])[0-9a-fA-F]*$', head):
1540 elif i > 0 and Search(r'\boperator\s*$', line[0:i]):
1569 (line[i - 1] == '-' or Search(r'\boperator\s*$', line[0:i - 1]))):
1665 Search(r'\boperator\s*$', line[0:i]))):
1900 if Search(r'//\s*NOLINT\(build/header_guard\)', i):
1983 if Search(_TEST_FILE_SUFFIX, fileinfo.BaseName()):
2133 if Search(pattern, line):
2153 if Search(r'\bVLOG\((INFO|ERROR|WARNING|DFATAL|FATAL)\)', line):
2187 if Search(r'^#define', clean_lines[linenum]):
2190 if linenum > 0 and Search(r'\\$', clean_lines[linenum - 1]):
2292 if Search('(^|[^:]):($|[^:])', clean_lines.elided[linenum]):
2300 match = Search(
2807 if Search(r'printf\s*\(.*".*%[-+ ]?\d*q', line):
2811 if Search(r'printf\s*\(.*".*%\d+\$', line):
2818 if Search(r'("|\').*\\(%|\[|\(|{)', line):
2825 if Search(r'\b(const|volatile|void|char|short|int|long'
2842 if Search(r'(\w+|[+-]?\d+(\.\d*)?)\s*(<|>)\?=?\s*(\w+|[+-]?\d+)(\.\d*)?',
2847 if Search(r'^\s*const\s*string\s*&\s*\w+\s*;', line):
2912 Search(r'\bstd\s*::\s*initializer_list\b', constructor_args[0]))
2955 match = Search(pattern, line)
2974 not Search(r'\b(if|for|while|switch|return|new|delete|catch|sizeof)\b',
2977 not Search(r' \([^)]+\)\([^)]*(\)|,$)', fncall) and
2979 not Search(r' \([^)]+\)\[[^\]]+\]', fncall)):
2980 if Search(r'\w\s*\(\s(?!\s*\\$)', fncall): # a ( used for a fn call
2983 elif Search(r'\(\s+(?!(\s*\\)|\()', fncall):
2986 if (Search(r'\w\s+\(', fncall) and
2987 not Search(r'_{0,2}asm_{0,2}\s+_{0,2}volatile_{0,2}\s+\(', fncall) and
2988 not Search(r'#\s*define|typedef|using\s+\w+\s*=', fncall) and
2989 not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall) and
2990 not Search(r'\bcase\s+\(', fncall)):
2993 if Search(r'\boperator_*\b', line):
3001 if Search(r'[^)]\s+\)\s*[^{\s]', fncall):
3004 if Search(r'^\s+\)', fncall):
3084 if Search(r'(;|})', start_line): # Declarations and trivial functions
3087 elif Search(r'{', start_line):
3089 function = Search(r'((\w|:)*)\(', line).group(1)
3091 parameter_regexp = Search(r'(\(.*\))', joined_line)
3282 if Search(r'\w\s+\[', line) and not Search(r'(?:delete|return)\s+\[', line):
3288 if (Search(r'for *\(.*[^:]:[^: ]', line) or
3289 Search(r'for *\(.*[^: ]:[^:]', line)):
3322 if ((Search(r'[\w.]=', line) or
3323 Search(r'=[\w.]', line))
3324 and not Search(r'\b(if|while|for) ', line)
3326 and not Search(r'(>=|<=|==|!=|&=|\^=|\|=|\+=|\*=|\/=|\%=)', line)
3327 and not Search(r'operator=', line)):
3346 match = Search(r'[^<>=!\s](==|!=|<=|>=|\|\|)[^<>=!\s,;\)]', line)
3379 match = Search(r'(operator|[^\s(<])(?:L|UL|LL|ULL|l|ul|ll|ull)?<<([^\s,=<])', line)
3397 match = Search(r'>>[a-zA-Z_]', line)
3403 match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
3421 match = Search(r' (if\(|for\(|while\(|switch\()', line)
3431 match = Search(r'\b(if|for|while|switch)\s*'
3438 not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)):
3469 if (Search(r',[^,\s]', ReplaceAll(r'\boperator\s*,\s*\(', 'F(', line)) and
3470 Search(r',[^,\s]', raw[linenum])):
3478 if Search(r';[^\s};\\)/]', line):
3539 if Search(typename_pattern, clean_lines.elided[i]):
3614 if Search(r'}else', line):
3621 if Search(r':\s*;\s*$', line):
3624 elif Search(r'^\s*;\s*$', line):
3628 elif (Search(r'\s+;\s*$', line) and
3629 not Search(r'\bfor\b', line)):
3648 if Search(r'\bdecltype\s*$', text[0:start_col]):
3692 not Search(r'\b(class|struct)\b', prev_line) and
3693 not Search(r'\\$', prev_line)):
3700 if Search(r'\{\s*$', clean_lines.lines[i]):
3754 if (not Search(r'[,;:}{(]\s*$', prevline) and
3769 if Search(r'else if\s*\(', line): # could be multi-line if
3770 brace_on_left = bool(Search(r'}\s*else if\s*\(', line))
3780 elif Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line):
3785 if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line):
3801 if_else_match = Search(r'\b(if\s*\(|else\b)', line)
3805 if_match = Search(r'\bif\s*\(', line)
3939 macro = Search(r'\b([A-Z_][A-Z0-9_]*)\s*$', line_prefix)
3946 (func and not Search(r'\boperator\s*\[\s*\]', func.group(1))) or
3947 Search(r'\b(?:struct|union)\s+alignas\s*$', line_prefix) or
3948 Search(r'\bdecltype$', line_prefix) or
3949 Search(r'\s+=\s*$', line_prefix)):
3953 Search(r'\]\s*$', clean_lines.elided[opening_parenthesis[1] - 1])):
3970 if prevline and Search(r'[;{}]\s*$', prevline):
4039 while not Search(r'^\s*\{', opening_line_fragment):
4040 if Search(r'^(?!\s*$)', opening_line_fragment):
4087 while Search(r'^\s*$|^(?=\s*else)', current_line_fragment):
4088 if Search(r'^(?=\s*else)', current_line_fragment):
4348 if (not Search(r'[",=><] *$', prev) and
4722 if Search(r'\bshort port\b', line):
4723 if not Search(r'\bunsigned short port\b', line):
4727 match = Search(r'\b(short|long(?! +double)|long long)\b', line)
4738 if Search(r'\boperator\s*&\s*\(\s*\)', line):
4744 if Search(r'\}\s*if\s*\(', line):
4766 match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
4772 if Search(r'\busing namespace\b', line):
4792 if Search(r'sizeof\(.+\)', tok): continue
4793 if Search(r'arraysize\(\w+\)', tok): continue
4820 and Search(r'\bnamespace\s*{', line)
4840 if linenum + 1 < clean_lines.NumLines() and not Search(r'[;({]', line):
4871 not Search(r'\bstring\b(\s+const)?\s*[\*\&]\s*(const\s+)?\w', line) and
4872 not Search(r'\boperator\W', line) and
4874 if Search(r'\bconst\b', line):
4883 if (Search(r'\b([A-Za-z0-9_]*_)\(\1\)', line) or
4884 Search(r'\b([A-Za-z0-9_]*_)\(CHECK_NOTNULL\(\1\)\)', line)):
4901 match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
4909 if Search(r'\bsprintf\s*\(', line):
4912 match = Search(r'\b(strcpy|strcat)\s*\(', line)
4936 Search(r'\boverride\b', line[closing_paren:]))
4973 if Search(r'\s:\s*\w+[({]', line):
4979 if Search(r'\}\s*,\s*$', line):
4983 if Search(r'[{};]\s*$', line):
5049 previous = Search(r'\b((?:const\s*)?(?:[\w<>]|::)+[\w<>])\s*$',
5053 previous = Search(r'\b((?:const\s*)?(?:[\w<>]|::)+::)\s*$',
5093 if not Search(r'[),]\s*$', previous_line):
5099 if Search(r'\\\s*$', line):
5116 if Search(whitelisted_functions, line):
5118 elif not Search(r'\S+\([^)]*$', line):
5124 Search(whitelisted_functions, clean_lines.elided[linenum - i - 1])):
5152 match = Search(
5191 not Search(r'new\(\S+\)\s*' + matched_type, line)):
5224 match = Search(
5273 match = Search(pattern, line)
5327 Search(r'\bstd::m?function\s*\<\s*$',
5435 matched_test_suffix = Search(_TEST_FILE_SUFFIX, fileinfo.BaseName())
5623 if (Search(r'\b(public|protected|private)\s+$', virtual.group(1)) or
5657 match = Search(r'\b(override|final)\b', line)
5666 if Search(r'[^\w]\s*$', line):
5693 if Search(r'\boverride\b', fragment) and Search(r'\bfinal\b', fragment):
5854 if Search(r'\bstd::%s\b' % top_name, line):