summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/utils/LexerUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/LexerUtils.h')
-rw-r--r--clang-tools-extra/clang-tidy/utils/LexerUtils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/LexerUtils.h b/clang-tools-extra/clang-tidy/utils/LexerUtils.h
index f81fdae4b52..55a8b85cfda 100644
--- a/clang-tools-extra/clang-tidy/utils/LexerUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/LexerUtils.h
@@ -82,6 +82,14 @@ bool rangeContainsExpansionsOrDirectives(SourceRange Range,
const SourceManager &SM,
const LangOptions &LangOpts);
+/// Assuming that ``Range`` spans a const-qualified type, returns the ``const``
+/// token in ``Range`` that is responsible for const qualification. ``Range``
+/// must be valid with respect to ``SM``. Returns ``None`` if no ``const``
+/// tokens are found.
+llvm::Optional<Token> getConstQualifyingToken(CharSourceRange Range,
+ const ASTContext &Context,
+ const SourceManager &SM);
+
} // namespace lexer
} // namespace utils
} // namespace tidy
OpenPOWER on IntegriCloud