• Home
  • Raw
  • Download

Lines Matching refs:Search

596   matched = Search(r'\bNOLINT(NEXTLINE)?\b(\([^)]+\))?', raw_line)
685 def Search(pattern, s): function
1502 if Search(r'\b(?:0[bBxX]?|[1-9])[0-9a-fA-F]*$', head):
1545 elif i > 0 and Search(r'\boperator\s*$', line[0:i]):
1574 (line[i - 1] == '-' or Search(r'\boperator\s*$', line[0:i - 1]))):
1670 Search(r'\boperator\s*$', line[0:i]))):
1905 if Search(r'//\s*NOLINT\(build/header_guard\)', i):
1988 if Search(_TEST_FILE_SUFFIX, fileinfo.BaseName()):
2138 if Search(pattern, line):
2158 if Search(r'\bVLOG\((INFO|ERROR|WARNING|DFATAL|FATAL)\)', line):
2192 if Search(r'^#define', clean_lines[linenum]):
2195 if linenum > 0 and Search(r'\\$', clean_lines[linenum - 1]):
2297 if Search('(^|[^:]):($|[^:])', clean_lines.elided[linenum]):
2305 match = Search(
2812 if Search(r'printf\s*\(.*".*%[-+ ]?\d*q', line):
2816 if Search(r'printf\s*\(.*".*%\d+\$', line):
2823 if Search(r'("|\').*\\(%|\[|\(|{)', line):
2830 if Search(r'\b(const|volatile|void|char|short|int|long'
2847 if Search(r'(\w+|[+-]?\d+(\.\d*)?)\s*(<|>)\?=?\s*(\w+|[+-]?\d+)(\.\d*)?',
2852 if Search(r'^\s*const\s*string\s*&\s*\w+\s*;', line):
2917 Search(r'\bstd\s*::\s*initializer_list\b', constructor_args[0]))
2960 match = Search(pattern, line)
2979 not Search(r'\b(if|for|while|switch|return|new|delete|catch|sizeof)\b',
2982 not Search(r' \([^)]+\)\([^)]*(\)|,$)', fncall) and
2984 not Search(r' \([^)]+\)\[[^\]]+\]', fncall)):
2985 if Search(r'\w\s*\(\s(?!\s*\\$)', fncall): # a ( used for a fn call
2988 elif Search(r'\(\s+(?!(\s*\\)|\()', fncall):
2991 if (Search(r'\w\s+\(', fncall) and
2992 not Search(r'_{0,2}asm_{0,2}\s+_{0,2}volatile_{0,2}\s+\(', fncall) and
2993 not Search(r'#\s*define|typedef|using\s+\w+\s*=', fncall) and
2994 not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall) and
2995 not Search(r'\bcase\s+\(', fncall)):
2998 if Search(r'\boperator_*\b', line):
3006 if Search(r'[^)]\s+\)\s*[^{\s]', fncall):
3009 if Search(r'^\s+\)', fncall):
3089 if Search(r'(;|})', start_line): # Declarations and trivial functions
3092 elif Search(r'{', start_line):
3094 function = Search(r'((\w|:)*)\(', line).group(1)
3096 parameter_regexp = Search(r'(\(.*\))', joined_line)
3287 if Search(r'\w\s+\[', line) and not Search(r'(?:delete|return)\s+\[', line):
3293 if (Search(r'for *\(.*[^:]:[^: ]', line) or
3294 Search(r'for *\(.*[^: ]:[^:]', line)):
3327 if ((Search(r'[\w.]=', line) or
3328 Search(r'=[\w.]', line))
3329 and not Search(r'\b(if|while|for) ', line)
3331 and not Search(r'(>=|<=|==|!=|&=|\^=|\|=|\+=|\*=|\/=|\%=)', line)
3332 and not Search(r'operator=', line)):
3351 match = Search(r'[^<>=!\s](==|!=|<=|>=|\|\|)[^<>=!\s,;\)]', line)
3384 match = Search(r'(operator|[^\s(<])(?:L|UL|LL|ULL|l|ul|ll|ull)?<<([^\s,=<])', line)
3402 match = Search(r'>>[a-zA-Z_]', line)
3408 match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
3426 match = Search(r' (if\(|for\(|while\(|switch\()', line)
3436 match = Search(r'\b(if|for|while|switch)\s*'
3443 not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)):
3474 if (Search(r',[^,\s]', ReplaceAll(r'\boperator\s*,\s*\(', 'F(', line)) and
3475 Search(r',[^,\s]', raw[linenum])):
3483 if Search(r';[^\s};\\)/]', line):
3544 if Search(typename_pattern, clean_lines.elided[i]):
3619 if Search(r'}else', line):
3626 if Search(r':\s*;\s*$', line):
3629 elif Search(r'^\s*;\s*$', line):
3633 elif (Search(r'\s+;\s*$', line) and
3634 not Search(r'\bfor\b', line)):
3653 if Search(r'\bdecltype\s*$', text[0:start_col]):
3697 not Search(r'\b(class|struct)\b', prev_line) and
3698 not Search(r'\\$', prev_line)):
3705 if Search(r'\{\s*$', clean_lines.lines[i]):
3759 if (not Search(r'[,;:}{(]\s*$', prevline) and
3774 if Search(r'else if\s*\(', line): # could be multi-line if
3775 brace_on_left = bool(Search(r'}\s*else if\s*\(', line))
3785 elif Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line):
3790 if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line):
3806 if_else_match = Search(r'\b(if\s*\(|else\b)', line)
3810 if_match = Search(r'\bif\s*\(', line)
3944 macro = Search(r'\b([A-Z_][A-Z0-9_]*)\s*$', line_prefix)
3951 (func and not Search(r'\boperator\s*\[\s*\]', func.group(1))) or
3952 Search(r'\b(?:struct|union)\s+alignas\s*$', line_prefix) or
3953 Search(r'\bdecltype$', line_prefix) or
3954 Search(r'\s+=\s*$', line_prefix)):
3958 Search(r'\]\s*$', clean_lines.elided[opening_parenthesis[1] - 1])):
3975 if prevline and Search(r'[;{}]\s*$', prevline):
4044 while not Search(r'^\s*\{', opening_line_fragment):
4045 if Search(r'^(?!\s*$)', opening_line_fragment):
4092 while Search(r'^\s*$|^(?=\s*else)', current_line_fragment):
4093 if Search(r'^(?=\s*else)', current_line_fragment):
4363 if (not Search(r'[",=><] *$', prev) and
4737 if Search(r'\bshort port\b', line):
4738 if not Search(r'\bunsigned short port\b', line):
4742 match = Search(r'\b(short|long(?! +double)|long long)\b', line)
4753 if Search(r'\boperator\s*&\s*\(\s*\)', line):
4759 if Search(r'\}\s*if\s*\(', line):
4781 match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
4787 if Search(r'\busing namespace\b', line):
4807 if Search(r'sizeof\(.+\)', tok): continue
4808 if Search(r'arraysize\(\w+\)', tok): continue
4835 and Search(r'\bnamespace\s*{', line)
4855 if linenum + 1 < clean_lines.NumLines() and not Search(r'[;({]', line):
4886 not Search(r'\bstring\b(\s+const)?\s*[\*\&]\s*(const\s+)?\w', line) and
4887 not Search(r'\boperator\W', line) and
4889 if Search(r'\bconst\b', line):
4898 if (Search(r'\b([A-Za-z0-9_]*_)\(\1\)', line) or
4899 Search(r'\b([A-Za-z0-9_]*_)\(CHECK_NOTNULL\(\1\)\)', line)):
4916 match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
4924 if Search(r'\bsprintf\s*\(', line):
4927 match = Search(r'\b(strcpy|strcat)\s*\(', line)
4951 Search(r'\boverride\b', line[closing_paren:]))
4988 if Search(r'\s:\s*\w+[({]', line):
4994 if Search(r'\}\s*,\s*$', line):
4998 if Search(r'[{};]\s*$', line):
5064 previous = Search(r'\b((?:const\s*)?(?:[\w<>]|::)+[\w<>])\s*$',
5068 previous = Search(r'\b((?:const\s*)?(?:[\w<>]|::)+::)\s*$',
5108 if not Search(r'[),]\s*$', previous_line):
5114 if Search(r'\\\s*$', line):
5131 if Search(allowed_functions, line):
5133 elif not Search(r'\S+\([^)]*$', line):
5139 Search(allowed_functions, clean_lines.elided[linenum - i - 1])):
5167 match = Search(
5206 not Search(r'new\(\S+\)\s*' + matched_type, line)):
5239 match = Search(
5288 match = Search(pattern, line)
5342 Search(r'\bstd::m?function\s*\<\s*$',
5450 matched_test_suffix = Search(_TEST_FILE_SUFFIX, fileinfo.BaseName())
5638 if (Search(r'\b(public|protected|private)\s+$', virtual.group(1)) or
5672 match = Search(r'\b(override|final)\b', line)
5681 if Search(r'[^\w]\s*$', line):
5708 if Search(r'\boverride\b', fragment) and Search(r'\bfinal\b', fragment):
5869 if Search(r'\bstd::%s\b' % top_name, line):