Lines Matching refs:VD
433 static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) { in SuggestInitializationFixit() argument
434 QualType VariableTy = VD->getType().getCanonicalType(); in SuggestInitializationFixit()
436 !VD->hasAttr<BlocksAttr>()) { in SuggestInitializationFixit()
437 S.Diag(VD->getLocation(), diag::note_block_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
438 << FixItHint::CreateInsertion(VD->getLocation(), "__block "); in SuggestInitializationFixit()
443 if (VD->getInit()) in SuggestInitializationFixit()
452 if (VD->getLocEnd().isMacroID()) in SuggestInitializationFixit()
455 SourceLocation Loc = S.PP.getLocForEndOfToken(VD->getLocEnd()); in SuggestInitializationFixit()
457 S.Diag(Loc, diag::note_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
491 static void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, in DiagUninitUse() argument
609 << VD->getDeclName() << IsCapturedByBlock << DiagKind in DiagUninitUse()
624 << VD->getDeclName() << IsCapturedByBlock in DiagUninitUse()
633 static bool DiagnoseUninitializedUse(Sema &S, const VarDecl *VD, in DiagnoseUninitializedUse() argument
649 if (const Expr *Initializer = VD->getInit()) { in DiagnoseUninitializedUse()
658 << VD->getDeclName() << VD->getLocation() << DRE->getSourceRange(); in DiagnoseUninitializedUse()
663 DiagUninitUse(S, VD, Use, false); in DiagnoseUninitializedUse()
666 if (VD->getType()->isBlockPointerType() && !VD->hasAttr<BlocksAttr>()) in DiagnoseUninitializedUse()
669 << VD->getDeclName(); in DiagnoseUninitializedUse()
671 DiagUninitUse(S, VD, Use, true); in DiagnoseUninitializedUse()
677 if (!SuggestInitializationFixit(S, VD)) in DiagnoseUninitializedUse()
678 S.Diag(VD->getLocStart(), diag::note_uninit_var_def) in DiagnoseUninitializedUse()
679 << VD->getDeclName(); in DiagnoseUninitializedUse()