| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/objc/ |
| H A D | PropertyDeclarationCheck.cpp | 110 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()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/ |
| H A D | SingleWorkItemBarrierCheck.cpp | 43 const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("function"); in check() local 47 diag(MatchedDecl->getLocation(), in check() 50 << MatchedDecl; in check() 58 if (MatchedDecl->hasAttr<ReqdWorkGroupSizeAttr>()) { in check() 59 const auto *Attribute = MatchedDecl->getAttr<ReqdWorkGroupSizeAttr>(); in check() 66 diag(MatchedDecl->getLocation(), in check() 69 << MatchedDecl; in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvm/ |
| H A D | PreferIsaOrDynCastInConditionalsCheck.cpp | 72 if (const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("assign")) { in check() local 73 SourceLocation StartLoc = MatchedDecl->getCallee()->getExprLoc(); in check() 77 diag(MatchedDecl->getBeginLoc(), in check() 81 } else if (const auto *MatchedDecl = in check() local 83 SourceLocation StartLoc = MatchedDecl->getCallee()->getExprLoc(); in check() 92 diag(MatchedDecl->getBeginLoc(), Message) in check() 94 } else if (const auto *MatchedDecl = in check() local 124 diag(MatchedDecl->getBeginLoc(), in check() 127 << FixItHint::CreateReplacement(SourceRange(MatchedDecl->getBeginLoc(), in check() 128 MatchedDecl->getEndLoc()), in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/ |
| H A D | InitVariablesCheck.cpp | 59 const auto *MatchedDecl = Result.Nodes.getNodeAs<VarDecl>("vardecl"); in check() local 78 if (MatchedDecl->getEndLoc().isMacroID()) in check() 81 QualType TypePtr = MatchedDecl->getType(); in check() 103 diag(MatchedDecl->getLocation(), "variable %0 is not initialized") in check() 104 << MatchedDecl; in check() 107 MatchedDecl->getLocation().getLocWithOffset( in check() 108 MatchedDecl->getName().size()), in check() 112 Source.getFileID(MatchedDecl->getBeginLoc()), MathHeader); in check()
|
| H A D | SpecialMemberFunctionsCheck.cpp | 99 const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXRecordDecl>("class-def"); in check() local 100 if (!MatchedDecl) in check() 103 ClassDefId ID(MatchedDecl->getLocation(), std::string(MatchedDecl->getName())); in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | AssignmentInIfConditionCheck.cpp | 32 const auto *MatchedDecl = in check() local 34 if (!MatchedDecl) { in check() 37 diag(MatchedDecl->getBeginLoc(), in check() 39 diag(MatchedDecl->getBeginLoc(), in check() 42 diag(MatchedDecl->getBeginLoc(), in check()
|
| H A D | ExceptionEscapeCheck.cpp | 66 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(), "an exception may be thrown in function " in check() 77 << MatchedDecl; in check()
|
| H A D | ImplicitWideningOfMultiplicationResultCheck.cpp | 265 if (const auto *MatchedDecl = Result.Nodes.getNodeAs<ImplicitCastExpr>("x")) in check() local 266 handleImplicitCastExpr(MatchedDecl); in check() 267 else if (const auto *MatchedDecl = in check() local 269 handlePointerOffsetting(MatchedDecl); in check() 270 else if (const auto *MatchedDecl = in check() local 272 handlePointerOffsetting(MatchedDecl); in check()
|
| H A D | UnhandledSelfAssignmentCheck.cpp | 104 const auto *MatchedDecl = in check() local 106 diag(MatchedDecl->getLocation(), in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | UseUsingCheck.cpp | 70 const auto *MatchedDecl = Result.Nodes.getNodeAs<TypedefDecl>(TypedefName); in check() local 71 if (MatchedDecl->getLocation().isInvalid()) in check() 74 SourceLocation StartLoc = MatchedDecl->getBeginLoc(); in check() 82 if (MatchedDecl->getUnderlyingType()->isArrayType() || StartLoc.isMacroID()) { in check() 93 std::string Type = MatchedDecl->getUnderlyingType().getAsString(PrintPolicy); in check() 94 std::string Name = MatchedDecl->getNameAsString(); in check() 95 SourceRange ReplaceRange = MatchedDecl->getSourceRange(); in check()
|
| H A D | UnaryStaticAssertCheck.cpp | 24 const auto *MatchedDecl = in check() local 26 const StringLiteral *AssertMessage = MatchedDecl->getMessage(); in check() 28 SourceLocation Loc = MatchedDecl->getLocation(); in check()
|
| H A D | ReplaceRandomShuffleCheck.cpp | 57 const auto *MatchedDecl = Result.Nodes.getNodeAs<DeclRefExpr>("name"); in check() local 86 CharSourceRange::getTokenRange(MatchedDecl->getSourceRange()), in check() 91 Diag << FixItHint::CreateRemoval(MatchedDecl->getSourceRange()); in check() 92 Diag << FixItHint::CreateInsertion(MatchedDecl->getBeginLoc(), NewName); in check()
|
| H A D | UseNodiscardCheck.cpp | 113 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 << NoDiscardMacro; in check()
|
| H A D | AvoidBindCheck.cpp | 657 const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("bind"); in check() local 661 diag(MatchedDecl->getBeginLoc(), in check() 716 Diag << FixItHint::CreateReplacement(MatchedDecl->getSourceRange(), in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/google/ |
| H A D | FunctionNamingCheck.cpp | 110 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()
|
| H A D | DefaultArgumentsCheck.cpp | 28 const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXMethodDecl>("Decl"); in check() local 29 diag(MatchedDecl->getLocation(), in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvmlibc/ |
| H A D | ImplementationInNamespaceCheck.cpp | 29 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()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/ |
| H A D | TriviallyDestructibleCheck.cpp | 52 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()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | RedundantAccessSpecifiersCheck.cpp | 27 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()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/cert/ |
| H A D | LimitedRandomnessCheck.cpp | 31 const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("randomGenerator"); in check() local 32 diag(MatchedDecl->getBeginLoc(), "rand() has limited randomness" + Msg); in check()
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/ |
| H A D | Contributing.rst | 214 const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("x"); 215 if (!MatchedDecl->getIdentifier() || MatchedDecl->getName().startswith("awesome_")) 217 diag(MatchedDecl->getLocation(), "function %0 is insufficiently awesome") 218 << MatchedDecl 219 << FixItHint::CreateInsertion(MatchedDecl->getLocation(), "awesome_");
|