Home
last modified time | relevance | path

Searched refs:FormatExpr (Results 1 – 4 of 4) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/FileCheck/
H A DFileCheck.cpp668 StringRef FormatExpr = Expr.take_front(FormatSpecEnd); in parseNumericSubstitutionBlock() local
670 FormatExpr = FormatExpr.trim(SpaceChars); in parseNumericSubstitutionBlock()
671 if (!FormatExpr.consume_front("%")) in parseNumericSubstitutionBlock()
673 SM, FormatExpr, in parseNumericSubstitutionBlock()
677 SMLoc AlternateFormFlagLoc = SMLoc::getFromPointer(FormatExpr.data()); in parseNumericSubstitutionBlock()
678 bool AlternateForm = FormatExpr.consume_front("#"); in parseNumericSubstitutionBlock()
681 if (FormatExpr.consume_front(".")) { in parseNumericSubstitutionBlock()
682 if (FormatExpr.consumeInteger(10, Precision)) in parseNumericSubstitutionBlock()
683 return ErrorDiagnostic::get(SM, FormatExpr, in parseNumericSubstitutionBlock()
687 if (!FormatExpr.empty()) { in parseNumericSubstitutionBlock()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaObjC.cpp2287 const Expr *FormatExpr = Args[Idx]; in DiagnoseCStringFormatDirectiveInCFAPI() local
2288 if (const CStyleCastExpr *CSCE = dyn_cast<CStyleCastExpr>(FormatExpr)) in DiagnoseCStringFormatDirectiveInCFAPI()
2289 FormatExpr = CSCE->getSubExpr(); in DiagnoseCStringFormatDirectiveInCFAPI()
2292 dyn_cast<ObjCStringLiteral>(FormatExpr->IgnoreParenImpCasts())) in DiagnoseCStringFormatDirectiveInCFAPI()
2295 FormatString = dyn_cast<StringLiteral>(FormatExpr->IgnoreParenImpCasts()); in DiagnoseCStringFormatDirectiveInCFAPI()
2299 Diag(FormatExpr->getExprLoc(), diag::warn_objc_cdirective_format_string) in DiagnoseCStringFormatDirectiveInCFAPI()
H A DSemaExprObjC.cpp2565 Expr *FormatExpr = Args[Idx]; in DiagnoseCStringFormatDirectiveInObjCAPI() local
2567 dyn_cast<ObjCStringLiteral>(FormatExpr->IgnoreParenImpCasts())) { in DiagnoseCStringFormatDirectiveInObjCAPI()
2570 S.Diag(FormatExpr->getExprLoc(), diag::warn_objc_cdirective_format_string) in DiagnoseCStringFormatDirectiveInObjCAPI()
H A DSemaChecking.cpp1122 static bool ProcessFormatStringLiteral(const Expr *FormatExpr, in ProcessFormatStringLiteral() argument
1125 if (const auto *Format = dyn_cast<StringLiteral>(FormatExpr); in ProcessFormatStringLiteral()
1292 const auto *FormatExpr = in checkFortifiedBuiltinMemoryFunction() local
1297 if (!ProcessFormatStringLiteral(FormatExpr, FormatStrRef, StrLen, Context)) in checkFortifiedBuiltinMemoryFunction()
1328 auto *FormatExpr = TheCall->getArg(FormatIndex)->IgnoreParenImpCasts(); in checkFortifiedBuiltinMemoryFunction() local
1332 if (ProcessFormatStringLiteral(FormatExpr, FormatStrRef, StrLen, Context)) { in checkFortifiedBuiltinMemoryFunction()
1417 const auto *FormatExpr = TheCall->getArg(2)->IgnoreParenImpCasts(); in checkFortifiedBuiltinMemoryFunction() local
1421 ProcessFormatStringLiteral(FormatExpr, FormatStrRef, StrLen, Context)) { in checkFortifiedBuiltinMemoryFunction()