Return True for annotations and documented non-actionable constructs.
(signature: str)
| 223 | |
| 224 | |
| 225 | def _signature_is_exempt(signature: str) -> bool: |
| 226 | """Return True for annotations and documented non-actionable constructs.""" |
| 227 | if not signature: |
| 228 | return True |
| 229 | if _SUPPRESS_RE.search(signature): |
| 230 | return True |
| 231 | |
| 232 | code = "\n".join(line.split("//", 1)[0] for line in signature.splitlines()) |
| 233 | if _HAS_NOEXCEPT_RE.search(code): |
| 234 | return True |
| 235 | if _LAMBDA_SOURCE_RE.search(code): |
| 236 | return True |
| 237 | if _DESTRUCTOR_SOURCE_RE.search(code): |
| 238 | return True |
| 239 | if _MACRO_INVOCATION_RE.match(code): |
| 240 | return True |
| 241 | if 'extern "C"' in code: |
| 242 | return True |
| 243 | return False |
| 244 | |
| 245 | |
| 246 | def _run_clang_query( |