Home
last modified time | relevance | path

Searched refs:MatchedDecl (Results 1 – 18 of 18) sorted by relevance

/external/llvm-project/clang-tools-extra/clang-tidy/objc/
DPropertyDeclarationCheck.cpp110 const auto *MatchedDecl = in check() local
112 assert(MatchedDecl->getName().size() > 0); in check()
113 auto *DeclContext = MatchedDecl->getDeclContext(); in check()
117 hasCategoryPropertyPrefix(MatchedDecl->getName())) { in check()
118 if (!prefixedPropertyNameValid(MatchedDecl->getName()) || in check()
122 diag(MatchedDecl->getLocation(), in check()
125 << MatchedDecl->getName() << generateFixItHint(MatchedDecl, Style); in check()
129 diag(MatchedDecl->getLocation(), in check()
132 << MatchedDecl->getName() in check()
133 << generateFixItHint(MatchedDecl, StandardProperty); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/
DInitVariablesCheck.cpp58 const auto *MatchedDecl = Result.Nodes.getNodeAs<VarDecl>("vardecl"); in check() local
77 if (MatchedDecl->getEndLoc().isMacroID()) in check()
80 QualType TypePtr = MatchedDecl->getType(); in check()
98 diag(MatchedDecl->getLocation(), "variable %0 is not initialized") in check()
99 << MatchedDecl in check()
101 MatchedDecl->getLocation().getLocWithOffset( in check()
102 MatchedDecl->getName().size()), in check()
106 Source.getFileID(MatchedDecl->getBeginLoc()), MathHeader); in check()
DSpecialMemberFunctionsCheck.cpp104 const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXRecordDecl>("class-def"); in check() local
105 if (!MatchedDecl) in check()
108 ClassDefId ID(MatchedDecl->getLocation(), std::string(MatchedDecl->getName())); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/llvm/
DPreferIsaOrDynCastInConditionalsCheck.cpp71 if (const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("assign")) { in check() local
72 SourceLocation StartLoc = MatchedDecl->getCallee()->getExprLoc(); in check()
76 diag(MatchedDecl->getBeginLoc(), in check()
80 } else if (const auto *MatchedDecl = in check() local
82 SourceLocation StartLoc = MatchedDecl->getCallee()->getExprLoc(); in check()
91 diag(MatchedDecl->getBeginLoc(), Message) in check()
93 } else if (const auto *MatchedDecl = in check() local
123 diag(MatchedDecl->getBeginLoc(), in check()
126 << FixItHint::CreateReplacement(SourceRange(MatchedDecl->getBeginLoc(), in check()
127 MatchedDecl->getEndLoc()), in check()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DUseUsingCheck.cpp44 const auto *MatchedDecl = Result.Nodes.getNodeAs<TypedefDecl>("typedef"); in check() local
45 if (MatchedDecl->getLocation().isInvalid()) in check()
48 SourceLocation StartLoc = MatchedDecl->getBeginLoc(); in check()
56 if (MatchedDecl->getUnderlyingType()->isArrayType() || StartLoc.isMacroID()) { in check()
67 std::string Type = MatchedDecl->getUnderlyingType().getAsString(printPolicy); in check()
68 std::string Name = MatchedDecl->getNameAsString(); in check()
69 SourceRange ReplaceRange = MatchedDecl->getSourceRange(); in check()
DUnaryStaticAssertCheck.cpp24 const auto *MatchedDecl = in check() local
26 const StringLiteral *AssertMessage = MatchedDecl->getMessage(); in check()
28 SourceLocation Loc = MatchedDecl->getLocation(); in check()
DReplaceRandomShuffleCheck.cpp57 const auto *MatchedDecl = Result.Nodes.getNodeAs<DeclRefExpr>("name"); in check() local
87 CharSourceRange::getTokenRange(MatchedDecl->getSourceRange()), in check()
92 Diag << FixItHint::CreateRemoval(MatchedDecl->getSourceRange()); in check()
93 Diag << FixItHint::CreateInsertion(MatchedDecl->getBeginLoc(), NewName); in check()
DUseNodiscardCheck.cpp113 const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXMethodDecl>("no_discard"); in check() local
115 SourceLocation Loc = MatchedDecl->getLocation(); in check()
119 SourceLocation RetLoc = MatchedDecl->getInnerLocStart(); in check()
124 << MatchedDecl; in check()
DAvoidBindCheck.cpp658 const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("bind"); in check() local
662 diag(MatchedDecl->getBeginLoc(), in check()
717 Diag << FixItHint::CreateReplacement(MatchedDecl->getSourceRange(), in check()
/external/llvm-project/clang-tools-extra/clang-tidy/google/
DFunctionNamingCheck.cpp110 const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("function"); in check() local
112 bool IsGlobal = MatchedDecl->getStorageClass() != SC_Static; in check()
113 diag(MatchedDecl->getLocation(), in check()
117 << MatchedDecl << IsGlobal << generateFixItHint(MatchedDecl); in check()
DDefaultArgumentsCheck.cpp28 const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXMethodDecl>("Decl"); in check() local
29 diag(MatchedDecl->getLocation(), in check()
/external/llvm-project/clang-tools-extra/clang-tidy/llvmlibc/
DImplementationInNamespaceCheck.cpp29 const auto *MatchedDecl = in check() local
31 if (!Result.SourceManager->isInMainFile(MatchedDecl->getLocation())) in check()
34 if (const auto *NS = dyn_cast<NamespaceDecl>(MatchedDecl)) { in check()
41 diag(MatchedDecl->getLocation(), in check()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DExceptionEscapeCheck.cpp66 const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("thrower"); in check() local
68 if (!MatchedDecl) in check()
71 if (Tracer.analyze(MatchedDecl).getBehaviour() == in check()
75 diag(MatchedDecl->getLocation(), in check()
79 << MatchedDecl; in check()
DUnhandledSelfAssignmentCheck.cpp107 const auto *MatchedDecl = in check() local
109 diag(MatchedDecl->getLocation(), in check()
/external/llvm-project/clang-tools-extra/clang-tidy/performance/
DTriviallyDestructibleCheck.cpp52 const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXDestructorDecl>("decl"); in check() local
56 const auto *FirstDecl = cast<CXXMethodDecl>(MatchedDecl->getFirstDecl()); in check()
60 MatchedDecl->getBeginLoc(), in check()
61 utils::lexer::findNextTerminator(MatchedDecl->getEndLoc(), SM, in check()
73 diag(MatchedDecl->getLocation(), "destructor definition is here", in check()
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DRedundantAccessSpecifiersCheck.cpp27 const auto *MatchedDecl = in check() local
32 AS(MatchedDecl->decls_begin()), in check()
33 ASEnd(MatchedDecl->decls_end()); in check()
49 MatchedDecl->isClass() ? AS_private : AS_public; in check()
/external/llvm-project/clang-tools-extra/clang-tidy/cert/
DLimitedRandomnessCheck.cpp31 const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("randomGenerator"); in check() local
32 diag(MatchedDecl->getBeginLoc(), "rand() has limited randomness" + msg); in check()
/external/llvm-project/clang-tools-extra/docs/clang-tidy/
DContributing.rst204 const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("x");
205 if (!MatchedDecl->getIdentifier() || MatchedDecl->getName().startswith("awesome_"))
207 diag(MatchedDecl->getLocation(), "function %0 is insufficiently awesome")
208 << MatchedDecl
209 << FixItHint::CreateInsertion(MatchedDecl->getLocation(), "awesome_");