| /llvm-project-15.0.7/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/ |
| H A D | result_of11.pass.cpp | 37 struct FD : public F {}; struct 90 test_result_of_imp<PMD(FD &), char &>(); in main() 91 test_result_of_imp<PMD(FD const &), char const &>(); in main() 92 test_result_of_imp<PMD(FD volatile &), char volatile &>(); in main() 100 test_result_of_imp<PMD(FD ), char &&>(); in main() 101 test_result_of_imp<PMD(FD const ), char &&>(); in main() 102 test_result_of_imp<PMD(FD volatile ), char &&>(); in main() 103 test_result_of_imp<PMD(FD const volatile ), char &&>(); in main() 107 test_result_of_imp<PMD(std::unique_ptr<FD>), char &>(); in main() 108 test_result_of_imp<PMD(std::unique_ptr<FD const>), const char &>(); in main() [all …]
|
| /llvm-project-15.0.7/llvm/test/CodeGen/RISCV/ |
| H A D | interrupt-attr.ll | 196 ; CHECK-RV32-FD-LABEL: foo_with_call: 197 ; CHECK-RV32-FD: # %bb.0: 296 ; CHECK-RV32-FD-NEXT: addi sp, sp, 320 297 ; CHECK-RV32-FD-NEXT: mret 441 ; CHECK-RV64-FD-LABEL: foo_with_call: 442 ; CHECK-RV64-FD: # %bb.0: 542 ; CHECK-RV64-FD-NEXT: mret 701 ; CHECK-RV32-FD: # %bb.0: 804 ; CHECK-RV32-FD-NEXT: mret 955 ; CHECK-RV64-FD: # %bb.0: [all …]
|
| H A D | interrupt-attr-callee.ll | 46 ; CHECK-RV32-FD-LABEL: handler: 47 ; CHECK-RV32-FD: # %bb.0: # %entry 48 ; CHECK-RV32-FD-NEXT: addi sp, sp, -16 51 ; CHECK-RV32-FD-NEXT: lui a0, 2 52 ; CHECK-RV32-FD-NEXT: addi a0, a0, 4 53 ; CHECK-RV32-FD-NEXT: call read@plt 54 ; CHECK-RV32-FD-NEXT: mv s0, a0 55 ; CHECK-RV32-FD-NEXT: call callee@plt 56 ; CHECK-RV32-FD-NEXT: mv a0, s0 59 ; CHECK-RV32-FD-NEXT: addi sp, sp, 16 [all …]
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | CGNonTrivialStruct.cpp | 27 if (FD && FD->isBitField()) in getFieldSize() 28 return FD->getBitWidthValue(Ctx); in getFieldSize() 44 for (const FieldDecl *FD : RD->fields()) { in visitStructFields() local 45 QualType FT = FD->getType(); in visitStructFields() 61 uint64_t getFieldOffsetInBits(const FieldDecl *FD) { in getFieldOffsetInBits() 62 return FD ? Ctx.getASTRecordLayout(FD->getParent()) in getFieldOffsetInBits() 67 CharUnits getFieldOffset(const FieldDecl *FD) { in getFieldOffset() 111 uint64_t FieldSize = getFieldSize(FD, FT, Ctx); in visitTrivial() 258 if (FD && FD->isZeroLengthBitField(this->Ctx)) in visitVolatileTrivial() 435 const FieldDecl *FD) { in getAddrWithOffset() [all …]
|
| H A D | CGRecordLayout.h | 111 const FieldDecl *FD, 197 unsigned getLLVMFieldNo(const FieldDecl *FD) const { in getLLVMFieldNo() argument 198 FD = FD->getCanonicalDecl(); in getLLVMFieldNo() 199 assert(FieldInfo.count(FD) && "Invalid field for record!"); in getLLVMFieldNo() 200 return FieldInfo.lookup(FD); in getLLVMFieldNo() 222 const CGBitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const { in getBitFieldInfo() argument 223 FD = FD->getCanonicalDecl(); in getBitFieldInfo() 224 assert(FD->isBitField() && "Invalid call for non-bit-field decl!"); in getBitFieldInfo() 226 it = BitFields.find(FD); in getBitFieldInfo()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | CheckSecuritySyntaxOnly.cpp | 134 const FunctionDecl *FD = CE->getDirectCallee(); in VisitCallExpr() local 136 if (!FD) in VisitCallExpr() 140 IdentifierInfo *II = FD->getIdentifier(); in VisitCallExpr() 184 (this->*evalFunction)(CE, FD); in VisitCallExpr() 556 checkCall_mkstemp(CE, FD); in checkCall_mktemp() 682 if (!checkCall_strCommon(CE, FD)) in checkCall_strcpy() 721 if (!checkCall_strCommon(CE, FD)) in checkCall_strcat() 882 os2 << "Function '" << *FD in checkCall_rand() 1001 const FunctionDecl *FD = CE->getDirectCallee(); in checkUncheckedReturnValue() local 1002 if (!FD) in checkUncheckedReturnValue() [all …]
|
| H A D | PaddingChecker.cpp | 173 auto IsTrickyField = [](const FieldDecl *FD) -> bool { in shouldSkipDecl() argument 175 if (FD->isBitField()) in shouldSkipDecl() 179 QualType Ty = FD->getType(); in shouldSkipDecl() 195 for (const FieldDecl *FD : RD->fields()) { in calculateBaselinePad() local 199 if (FD->isZeroSize(ASTContext)) in calculateBaselinePad() 254 RetVal.Field = FD; in calculateOptimalPad() 255 auto &Ctx = FD->getASTContext(); in calculateOptimalPad() 256 auto Info = Ctx.getTypeInfoInChars(FD->getType()); in calculateOptimalPad() 260 if (auto Max = FD->getMaxAlignment()) in calculateOptimalPad() 337 for (const auto *FD : OptimalFieldsOrder) in reportRecord() local [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/ |
| H A D | DefineInline.cpp | 60 SourceLocation CurLoc = FD->getEndLoc(); in getSemicolonForDecl() 73 return FD; in getSelectedFunction() 116 Parent = FD->getParent(); in checkDeclsAreVisible() 151 FD->getBody(), in qualifyAllDecls() 205 SM, FD->getASTContext().getLangOpts(), FD->getBody()->getSourceRange()); in qualifyAllDecls() 329 auto *CanonDecl = FD->getCanonicalDecl(); in findTarget() 330 if (!FD->isFunctionTemplateSpecialization() || CanonDecl == FD) in findTarget() 335 auto *PrevDecl = FD; in findTarget() 349 return FD->getBeginLoc(); in getBeginLoc() 355 if (FD->isInlined() || llvm::isa<CXXMethodDecl>(FD)) in addInlineIfInHeader() [all …]
|
| H A D | DefineOutline.cpp | 53 return FD; in getSelectedFunction() 116 SM, FD->getASTContext().getLangOpts(), FD->getSourceRange()); in getFunctionSourceAfterReplacements() 145 auto &AST = FD->getASTContext(); in getFunctionSourceCode() 157 FD, in getFunctionSourceCode() 166 Ref.NameLoc != FD->getLocation()) in getFunctionSourceCode() 189 for (const auto *PVD : FD->parameters()) { in getFunctionSourceCode() 237 DelAttr(FD->getAttr<OverrideAttr>()); in getFunctionSourceCode() 238 DelAttr(FD->getAttr<FinalAttr>()); in getFunctionSourceCode() 271 DelKeyword(tok::kw_virtual, {FD->getBeginLoc(), FD->getLocation()}); in getFunctionSourceCode() 273 DelKeyword(tok::kw_static, {FD->getBeginLoc(), FD->getLocation()}); in getFunctionSourceCode() [all …]
|
| /llvm-project-15.0.7/clang/lib/Analysis/ |
| H A D | RetainSummaryManager.cpp | 293 const FunctionDecl *FD, in getSummaryForObjCOrCFObject() argument 414 if (isRetain(FD, FName)) { in getSummaryForObjCOrCFObject() 439 if (isRetain(FD, FName)) in getSummaryForObjCOrCFObject() 463 if (isRelease(FD, FName)) in getSummaryForObjCOrCFObject() 503 if (FD->isImplicit()) in generateSummary() 541 if (!FD) in getFunctionSummary() 557 FuncSummaries[FD] = S; in getFunctionSummary() 717 const Decl *FD) { in isTrustedReferenceCountImplementation() argument 750 (isRetain(FD, FName) || isAutorelease(FD, FName) || in canEval() 906 return FD->getReturnType(); in getCallableReturnType() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/ |
| H A D | NewDeleteOverloadsCheck.cpp | 64 OverloadedOperatorKind getCorrespondingOverload(const FunctionDecl *FD) { in getCorrespondingOverload() argument 65 switch (FD->getOverloadedOperator()) { in getCorrespondingOverload() 154 const auto *FD = Result.Nodes.getNodeAs<FunctionDecl>("func"); in check() local 156 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) in check() 158 Overloads[RD].push_back(FD); in check() 174 [&Overload](const FunctionDecl *FD) { in onEndOfTranslationUnit() argument 175 if (FD == Overload) in onEndOfTranslationUnit() 184 if (!areCorrespondingOverloads(Overload, FD)) in onEndOfTranslationUnit() 201 for (const auto *FD : Diagnose) in onEndOfTranslationUnit() local 202 diag(FD->getLocation(), "declaration of %0 has no matching declaration " in onEndOfTranslationUnit() [all …]
|
| H A D | DefinitionsInHeadersCheck.cpp | 99 if (const auto *FD = dyn_cast<FunctionDecl>(ND)) { in check() local 101 if (FD->isInlined()) in check() 104 if (FD->getTemplatedKind() == FunctionDecl::TK_FunctionTemplate) in check() 107 if (FD->isTemplateInstantiation()) in check() 111 if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) { in check() 124 bool IsFullSpec = FD->getTemplateSpecializationKind() != TSK_Undeclared; in check() 125 diag(FD->getLocation(), in check() 129 << IsFullSpec << FD; in check() 131 if (FD->isMain()) in check() 133 diag(FD->getLocation(), /*Description=*/"make as 'inline'", in check() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | AutoConvert.cpp | 20 std::error_code llvm::disableAutoConversion(int FD) { in disableAutoConversion() argument 26 if (fcntl(FD, F_CONTROL_CVT, &Convert) == -1) in disableAutoConversion() 31 std::error_code llvm::enableAutoConversion(int FD) { in enableAutoConversion() argument 38 if (fcntl(FD, F_CONTROL_CVT, &Query) == -1) in enableAutoConversion() 43 (FD == STDIN_FILENO || FD == STDOUT_FILENO || FD == STDERR_FILENO) in enableAutoConversion() 48 if (fcntl(FD, F_CONTROL_CVT, &Query) == -1) in enableAutoConversion() 53 std::error_code llvm::setFileTag(int FD, int CCSID, bool Text) { in setFileTag() argument 62 if (fcntl(FD, F_SETTAG, &Tag) == -1) in setFileTag()
|
| H A D | MemoryBuffer.cpp | 259 sys::fs::file_t FD = *FDOrErr; in getFileAux() local 262 sys::fs::closeFile(FD); in getFileAux() 318 static bool shouldUseMmap(sys::fs::file_t FD, in shouldUseMmap() argument 345 if (sys::fs::status(FD, Status)) in shouldUseMmap() 380 sys::fs::file_t FD = *FDOrErr; in getReadWriteFile() local 388 std::error_code EC = sys::fs::status(FD, Status); in getReadWriteFile() 449 return getMemoryBufferForStream(FD, Filename); in getOpenFileImpl() 468 if (auto EC = llvm::enableAutoConversion(FD)) in getOpenFileImpl() 528 sys::fs::file_t FD = *FDOrErr; in getFileAsStream() local 530 getMemoryBufferForStream(FD, Filename); in getFileAsStream() [all …]
|
| H A D | raw_ostream.cpp | 581 int FD; in getFD() local 589 return FD; in getFD() 621 if (FD < 0 ) { in raw_fd_ostream() 634 if (FD <= STDERR_FILENO) in raw_fd_ostream() 661 if (FD >= 0) { in ~raw_fd_ostream() 674 if (FD == 2) return; in ~raw_fd_ostream() 799 FD = -1; in close() 810 pos = ::lseek(FD, off, SEEK_SET); in seek() 839 if (fstat(FD, &statbuf) != 0) in preferred_buffer_size() 867 return sys::fs::FileLocker(FD); in lock() [all …]
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/ |
| H A D | CallDescription.cpp | 61 const auto *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl()); in matches() local 62 if (!FD) in matches() 65 return matchesImpl(FD, Call.getNumArgs(), Call.parameters().size()); in matches() 69 const auto *FD = dyn_cast_or_null<FunctionDecl>(CE.getCalleeDecl()); in matchesAsWritten() local 70 if (!FD) in matchesAsWritten() 73 return matchesImpl(FD, CE.getNumArgs(), FD->param_size()); in matchesAsWritten() 79 const auto *FD = Callee; in matchesImpl() local 80 if (!FD) in matchesImpl() 90 II = &FD->getASTContext().Idents.get(getFunctionName()); in matchesImpl() 146 if (!MatchNameOnly(*this, FD)) in matchesImpl() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/Support/ |
| H A D | ReplaceFileTest.cpp | 32 int FD = 0; in CreateFileWithContent() local 33 if (std::error_code ec = fs::openFileForWrite(FilePath, FD)) in CreateFileWithContent() 37 raw_fd_ostream OS(FD, ShouldClose); in CreateFileWithContent() 44 int FD; member in __anonb72412a40111::ScopedFD 50 explicit ScopedFD(int Descriptor) : FD(Descriptor) {} in ScopedFD() 51 ~ScopedFD() { Process::SafelyCloseFileDescriptor(FD); } in ~ScopedFD() 54 bool FDHasContent(int FD, StringRef Content) { in FDHasContent() argument 62 int FD = 0; in FileHasContent() local 63 auto EC = fs::openFileForRead(File, FD); in FileHasContent() 66 ScopedFD EventuallyCloseIt(FD); in FileHasContent() [all …]
|
| H A D | raw_pwrite_stream_test.cpp | 53 int FD; in TEST() local 62 ASSERT_NO_ERROR(sys::fs::openFileForRead(Path, FD)); in TEST() 64 ASSERT_NO_ERROR(sys::fs::createTemporaryFile("foo", "bar", FD, Path)); in TEST() 69 raw_fd_ostream OS(FD, true); in TEST() 85 int FD; in TEST() local 86 sys::fs::openFileForWrite("/dev/null", FD, sys::fs::CD_OpenExisting); in TEST() 87 raw_fd_ostream OS(FD, true); in TEST()
|
| /llvm-project-15.0.7/libc/benchmarks/automemcpy/lib/ |
| H A D | CodeGen.cpp | 286 Impl.Ctx = getCtx(FD.Type); in getImplementation() 289 if (auto C = FD.Contiguous) in getImplementation() 292 if (auto C = FD.Overlap) in getImplementation() 295 if (const auto &L = FD.Loop) in getImplementation() 309 for (const auto &FD : Descriptors) in Serialize() local 396 return Stream << '{' << FD.Type << ',' << FD.Contiguous << ',' << FD.Overlap in operator <<() 397 << ',' << FD.Loop << ',' << FD.AlignedLoop << ',' in operator <<() 398 << FD.Accelerator << ',' << FD.ElementClass << '}'; in operator <<() 533 if (FD.Desc.Type == FT) in Serialize() 638 for (auto &FD : Descriptors) { in Serialize() local [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | SignalHandlerCheck.cpp | 249 bool isStandardFunction(const FunctionDecl *FD) { in isStandardFunction() argument 277 FD->getCanonicalDecl()->getLocation()); in isStandardFunction() 379 bool SignalHandlerCheck::checkFunction(const FunctionDecl *FD, in checkFunction() argument 383 if (isStandardFunction(FD)) { in checkFunction() 384 if (!isStandardFunctionAsyncSafe(FD)) { in checkFunction() 389 << FD << FunctionIsCalled; in checkFunction() 395 if (!FD->hasBody()) { in checkFunction() 400 << FD << FunctionIsCalled; in checkFunction() 408 const FunctionDecl *FD) const { in isStandardFunctionAsyncSafe() 409 assert(isStandardFunction(FD)); in isStandardFunctionAsyncSafe() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Support/ |
| H A D | FileSystem.h | 421 (void)FD; in resize_file_before_mapping_readwrite() 867 int FD = -1; variable 993 inline file_t convertFDToNativeFile(int FD) { return FD; } in convertFDToNativeFile() argument 1189 tryLockFile(int FD, 1228 FileLocker(int FD) : FD(FD) {} in FileLocker() argument 1233 FileLocker(FileLocker &&L) : FD(L.FD) { L.FD = -1; } in FileLocker() 1235 if (FD != -1) in ~FileLocker() 1239 FD = L.FD; 1240 L.FD = -1; 1245 if (FD != -1) { in unlock() [all …]
|
| /llvm-project-15.0.7/clang/lib/Sema/ |
| H A D | SemaSYCL.cpp | 25 FunctionDecl *FD = dyn_cast<FunctionDecl>(getCurLexicalContext()); in SYCLDiagIfDeviceCode() local 26 SemaDiagnosticBuilder::Kind DiagKind = [this, FD] { in SYCLDiagIfDeviceCode() 27 if (!FD) in SYCLDiagIfDeviceCode() 29 if (getEmissionStatus(FD) == Sema::FunctionEmissionStatus::Emitted) in SYCLDiagIfDeviceCode() 33 return SemaDiagnosticBuilder(DiagKind, Loc, DiagID, FD, *this); in SYCLDiagIfDeviceCode() 76 if (auto *FD = dyn_cast<FieldDecl>(D)) in deepTypeCheckForSYCLDevice() local 77 SYCLDiagIfDeviceCode(FD->getLocation(), in deepTypeCheckForSYCLDevice() 79 << FD->getType()->isPointerType() << FD->getType(); in deepTypeCheckForSYCLDevice()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/cert/ |
| H A D | InvalidPtrChecker.cpp | 119 const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl()); in postPreviousReturnInvalidatingCall() local 122 if (const MemRegion *const *Reg = State->get<PreviousCallResultMap>(FD)) { in postPreviousReturnInvalidatingCall() 125 Note = C.getNoteTag([PrevReg, FD](PathSensitiveBugReport &BR, in postPreviousReturnInvalidatingCall() 130 FD->getNameForDiagnostic(Out, FD->getASTContext().getLangOpts(), true); in postPreviousReturnInvalidatingCall() 132 FD->getNameForDiagnostic(Out, FD->getASTContext().getLangOpts(), true); in postPreviousReturnInvalidatingCall() 149 State = State->set<PreviousCallResultMap>(FD, MR); in postPreviousReturnInvalidatingCall() 234 const auto *FD = dyn_cast<FunctionDecl>(C.getLocationContext()->getDecl()); in checkBeginFunction() local 235 if (!FD || FD->param_size() != 3 || !FD->isMain()) in checkBeginFunction() 240 State->getRegion(FD->parameters()[2], C.getLocationContext()); in checkBeginFunction()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | GCMetadata.cpp | 107 GCFunctionInfo *FD = &getAnalysis<GCModuleInfo>().getFunctionInfo(F); in runOnFunction() local 109 OS << "GC roots for " << FD->getFunction().getName() << ":\n"; in runOnFunction() 110 for (GCFunctionInfo::roots_iterator RI = FD->roots_begin(), in runOnFunction() 111 RE = FD->roots_end(); in runOnFunction() 115 OS << "GC safe points for " << FD->getFunction().getName() << ":\n"; in runOnFunction() 116 for (GCFunctionInfo::iterator PI = FD->begin(), PE = FD->end(); PI != PE; in runOnFunction() 123 for (const GCRoot &R : make_range(FD->live_begin(PI), FD->live_end(PI))) in runOnFunction()
|
| /llvm-project-15.0.7/clang/lib/ARCMigrate/ |
| H A D | TransUnbridgedCasts.cpp | 136 if (FD->hasAttr<CFReturnsRetainedAttr>()) { in transformNonObjCToObjCCast() 140 if (FD->hasAttr<CFReturnsNotRetainedAttr>()) { in transformNonObjCToObjCCast() 144 if (FD->isGlobal() && in transformNonObjCToObjCCast() 145 FD->getIdentifier() && in transformNonObjCToObjCCast() 154 if (FD->getName() == "CFRetain" && in transformNonObjCToObjCCast() 155 FD->getNumParams() == 1 && in transformNonObjCToObjCCast() 157 FD->isExternallyVisible()) { in transformNonObjCToObjCCast() 419 if (FD->getName() == "CFRetain" && FD->getNumParams() == 1 && in isPassedToCFRetain() 420 FD->getParent()->isTranslationUnit() && in isPassedToCFRetain() 421 FD->isExternallyVisible()) in isPassedToCFRetain() [all …]
|