summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/utils/ASTUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/ASTUtils.h')
-rw-r--r--clang-tools-extra/clang-tidy/utils/ASTUtils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/ASTUtils.h b/clang-tools-extra/clang-tidy/utils/ASTUtils.h
index 7f753270f0d..ccff000adc5 100644
--- a/clang-tools-extra/clang-tidy/utils/ASTUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/ASTUtils.h
@@ -20,6 +20,13 @@ const FunctionDecl *getSurroundingFunction(ASTContext &Context,
const Stmt &Statement);
// Determine whether Expr is a Binary or Ternary expression.
bool IsBinaryOrTernary(const Expr *E);
+
+/// Checks whether a macro flag is present in the given argument. Only considers
+/// cases of single match or match in a binary OR expression. For example,
+/// <needed-flag> or <flag> | <needed-flag> | ...
+bool exprHasBitFlagWithSpelling(const Expr *Flags, const SourceManager &SM,
+ const LangOptions &LangOpts,
+ StringRef FlagName);
} // namespace utils
} // namespace tidy
} // namespace clang
OpenPOWER on IntegriCloud