File indexing completed on 2026-05-10 08:36:20
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_INTEGERTYPESCHECK_H
0010 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_INTEGERTYPESCHECK_H
0011
0012 #include "../ClangTidyCheck.h"
0013
0014 #include <memory>
0015
0016 namespace clang {
0017
0018 class IdentifierTable;
0019
0020 namespace tidy::google::runtime {
0021
0022
0023
0024
0025
0026
0027
0028
0029 class IntegerTypesCheck : public ClangTidyCheck {
0030 public:
0031 IntegerTypesCheck(StringRef Name, ClangTidyContext *Context);
0032 bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
0033 return LangOpts.CPlusPlus && !LangOpts.ObjC;
0034 }
0035 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
0036 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
0037 void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
0038 std::optional<TraversalKind> getCheckTraversalKind() const override {
0039 return TK_IgnoreUnlessSpelledInSource;
0040 }
0041
0042 private:
0043 const StringRef UnsignedTypePrefix;
0044 const StringRef SignedTypePrefix;
0045 const StringRef TypeSuffix;
0046
0047 std::unique_ptr<IdentifierTable> IdentTable;
0048 };
0049
0050 }
0051 }
0052
0053 #endif