Build the clang-query matcher for actionable owned functions.
(file_regex: str)
| 90 | |
| 91 | |
| 92 | def build_query(file_regex: str) -> str: |
| 93 | """Build the clang-query matcher for actionable owned functions.""" |
| 94 | matcher = ( |
| 95 | "match functionDecl(" |
| 96 | "unless(isNoThrow()), " |
| 97 | "unless(isDeleted()), " |
| 98 | "unless(isDefaulted()), " |
| 99 | "unless(isImplicit()), " |
| 100 | "unless(cxxDestructorDecl()), " |
| 101 | "unless(cxxMethodDecl(ofClass(cxxRecordDecl(isLambda())))), " |
| 102 | "unless(hasParent(linkageSpecDecl())), " |
| 103 | f'isExpansionInFileMatching("{file_regex}"))' |
| 104 | ) |
| 105 | return f"set output diag\n{matcher}\n" |
| 106 | |
| 107 | |
| 108 | def normalize_signature(signature: str) -> str: |