Lines Matching refs:diag
73 unsigned diag = diag::warn_unreachable; in HandleUnreachable() local
76 diag = diag::warn_unreachable_break; in HandleUnreachable()
79 diag = diag::warn_unreachable_return; in HandleUnreachable()
82 diag = diag::warn_unreachable_loop_increment; in HandleUnreachable()
88 S.Diag(L, diag) << R1 << R2; in HandleUnreachable()
95 S.Diag(Open, diag::note_unreachable_silence) in HandleUnreachable()
147 S.Diag(B->getExprLoc(), diag::warn_tautological_overlap_comparison) in compareAlwaysTrue()
157 S.Diag(B->getExprLoc(), diag::warn_comparison_bitwise_always) in compareBitwiseEquality()
261 S.Diag(Body->getLocStart(), diag::warn_infinite_recursive_function); in checkRecursiveFunction()
419 diag::warn_falloff_noreturn_function; in MakeForFunction()
421 diag::warn_maybe_falloff_nonvoid_function; in MakeForFunction()
423 diag::warn_falloff_noreturn_function; in MakeForFunction()
425 diag::warn_falloff_nonvoid_function; in MakeForFunction()
440 diag::warn_suggest_noreturn_function; in MakeForFunction()
451 diag::err_noreturn_block_has_return_expr; in MakeForBlock()
453 diag::err_maybe_falloff_nonvoid_block; in MakeForBlock()
455 diag::err_noreturn_block_has_return_expr; in MakeForBlock()
457 diag::err_falloff_nonvoid_block; in MakeForBlock()
466 diag::err_noreturn_lambda_has_return_expr; in MakeForLambda()
468 diag::warn_maybe_falloff_nonvoid_lambda; in MakeForLambda()
470 diag::err_noreturn_lambda_has_return_expr; in MakeForLambda()
472 diag::warn_falloff_nonvoid_lambda; in MakeForLambda()
482 D.isIgnored(diag::warn_maybe_falloff_nonvoid_function, in checkDiagnostics()
485 D.isIgnored(diag::warn_noreturn_function_has_return_expr, in checkDiagnostics()
488 D.isIgnored(diag::warn_suggest_noreturn_block, FuncLoc)); in checkDiagnostics()
609 S.Diag(VD->getLocation(), diag::note_block_var_fixit_add_initialization) in SuggestInitializationFixit()
630 S.Diag(Loc, diag::note_var_fixit_add_initialization) << VD->getDeclName() in SuggestInitializationFixit()
670 S.Diag(Use.getUser()->getLocStart(), diag::warn_uninit_var) in DiagUninitUse()
677 S.Diag(VD->getLocation(), diag::warn_sometimes_uninit_var) in DiagUninitUse()
682 S.Diag(Use.getUser()->getLocStart(), diag::note_uninit_var_use) in DiagUninitUse()
813 S.Diag(Range.getBegin(), diag::warn_sometimes_uninit_var) in DiagUninitUse()
816 S.Diag(User->getLocStart(), diag::note_uninit_var_use) in DiagUninitUse()
819 S.Diag(Fixit1.RemoveRange.getBegin(), diag::note_uninit_fixit_remove_cond) in DiagUninitUse()
826 S.Diag(Use.getUser()->getLocStart(), diag::warn_maybe_uninit_var) in DiagUninitUse()
860 diag::warn_uninit_self_reference_in_init) in DiagnoseUninitializedUse()
871 diag::warn_uninit_byref_blockvar_captured_by_block) in DiagnoseUninitializedUse()
881 S.Diag(VD->getLocStart(), diag::note_uninit_var_def) in DiagnoseUninitializedUse()
968 diag::warn_fallthrough_attr_unreachable); in checkFallThroughIntoBlock()
1106 PerFunction ? diag::warn_unannotated_fallthrough_per_function in DiagnoseSwitchLabelsFallthrough()
1107 : diag::warn_unannotated_fallthrough); in DiagnoseSwitchLabelsFallthrough()
1133 S.Diag(L, diag::note_insert_fallthrough_fixit) << in DiagnoseSwitchLabelsFallthrough()
1138 S.Diag(L, diag::note_insert_break_fixit) << in DiagnoseSwitchLabelsFallthrough()
1144 S.Diag(F->getLocStart(), diag::warn_fallthrough_attr_invalid_placement); in DiagnoseSwitchLabelsFallthrough()
1282 DiagKind = diag::warn_arc_repeated_use_of_weak; in diagnoseRepeatedUseOfWeak()
1284 DiagKind = diag::warn_arc_possible_repeated_use_of_weak; in diagnoseRepeatedUseOfWeak()
1318 diag::note_arc_weak_also_accessed_here) in diagnoseRepeatedUseOfWeak()
1453 S.PDiag(diag::note_thread_warning_in_fun) in getNotes()
1464 S.PDiag(diag::note_thread_warning_in_fun) in getNotes()
1478 S.PDiag(diag::note_thread_warning_in_fun) in getNotes()
1517 PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_cannot_resolve_lock) in handleInvalidLockExp()
1524 warnLockMismatch(diag::warn_unlock_but_no_lock, Kind, LockName, Loc); in handleUnmatchedUnlock()
1532 PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_unlock_kind_mismatch) in handleIncorrectUnlockKind()
1539 warnLockMismatch(diag::warn_double_lock, Kind, LockName, Loc); in handleDoubleLock()
1549 DiagID = diag::warn_lock_some_predecessors; in handleMutexHeldEndOfScope()
1552 DiagID = diag::warn_expecting_lock_held_on_loop; in handleMutexHeldEndOfScope()
1555 DiagID = diag::warn_no_unlock; in handleMutexHeldEndOfScope()
1558 DiagID = diag::warn_expecting_locked; in handleMutexHeldEndOfScope()
1567 PartialDiagnosticAt Note(LocLocked, S.PDiag(diag::note_locked_here) in handleMutexHeldEndOfScope()
1579 S.PDiag(diag::warn_lock_exclusive_and_shared) in handleExclusiveAndShared()
1581 PartialDiagnosticAt Note(Loc2, S.PDiag(diag::note_lock_exclusive_and_shared) in handleExclusiveAndShared()
1592 diag::warn_variable_requires_any_lock: in handleNoMutexHeld()
1593 diag::warn_var_deref_requires_any_lock; in handleNoMutexHeld()
1607 DiagID = diag::warn_variable_requires_lock_precise; in handleMutexNotHeld()
1610 DiagID = diag::warn_var_deref_requires_lock_precise; in handleMutexNotHeld()
1613 DiagID = diag::warn_fun_requires_lock_precise; in handleMutexNotHeld()
1616 DiagID = diag::warn_guarded_pass_by_reference; in handleMutexNotHeld()
1619 DiagID = diag::warn_pt_guarded_pass_by_reference; in handleMutexNotHeld()
1625 PartialDiagnosticAt Note(Loc, S.PDiag(diag::note_found_mutex_near_match) in handleMutexNotHeld()
1629 S.PDiag(diag::note_guarded_by_declared_here) in handleMutexNotHeld()
1637 DiagID = diag::warn_variable_requires_lock; in handleMutexNotHeld()
1640 DiagID = diag::warn_var_deref_requires_lock; in handleMutexNotHeld()
1643 DiagID = diag::warn_fun_requires_lock; in handleMutexNotHeld()
1646 DiagID = diag::warn_guarded_pass_by_reference; in handleMutexNotHeld()
1649 DiagID = diag::warn_pt_guarded_pass_by_reference; in handleMutexNotHeld()
1657 S.PDiag(diag::note_guarded_by_declared_here) in handleMutexNotHeld()
1668 S.PDiag(diag::warn_acquire_requires_negative_cap) in handleNegativeNotHeld()
1676 PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_fun_excludes_mutex) in handleFunExcludesLock()
1684 S.PDiag(diag::warn_acquired_before) << Kind << L1Name << L2Name); in handleLockAcquiredBefore()
1690 S.PDiag(diag::warn_acquired_before_after_cycle) << L1Name); in handleBeforeAfterCycle()
1733 PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_loop_state_mismatch) << in warnLoopStateMismatch()
1745 diag::warn_param_return_typestate_mismatch) << VariableName << in warnParamReturnTypestateMismatch()
1755 diag::warn_param_typestate_mismatch) << ExpectedState << ObservedState); in warnParamTypestateMismatch()
1763 diag::warn_return_typestate_for_unconsumable_type) << TypeName); in warnReturnTypestateForUnconsumableType()
1772 diag::warn_return_typestate_mismatch) << ExpectedState << ObservedState); in warnReturnTypestateMismatch()
1781 diag::warn_use_of_temp_in_invalid_state) << MethodName << State); in warnUseOfTempInInvalidState()
1789 PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_use_in_invalid_state) << in warnUseInInvalidState()
1809 static unsigned isEnabled(DiagnosticsEngine &D, unsigned diag) { in isEnabled() argument
1810 return (unsigned)!D.isIgnored(diag, SourceLocation()); in isEnabled()
1825 using namespace diag; in AnalysisBasedWarnings()
1915 if (!Diags.isIgnored(diag::warn_tautological_overlap_comparison, in IssueWarnings()
1991 if (!Diags.isIgnored(diag::warn_thread_safety_beta, D->getLocStart())) in IssueWarnings()
1993 if (!Diags.isIgnored(diag::warn_thread_safety_verbose, D->getLocStart())) in IssueWarnings()
2008 if (!Diags.isIgnored(diag::warn_uninit_var, D->getLocStart()) || in IssueWarnings()
2009 !Diags.isIgnored(diag::warn_sometimes_uninit_var, D->getLocStart()) || in IssueWarnings()
2010 !Diags.isIgnored(diag::warn_maybe_uninit_var, D->getLocStart())) { in IssueWarnings()
2033 !Diags.isIgnored(diag::warn_unannotated_fallthrough, D->getLocStart()); in IssueWarnings()
2035 diag::warn_unannotated_fallthrough_per_function, D->getLocStart()); in IssueWarnings()
2041 !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, D->getLocStart())) in IssueWarnings()
2046 if (!Diags.isIgnored(diag::warn_infinite_recursive_function, in IssueWarnings()
2055 if (!Diags.isIgnored(diag::warn_tautological_overlap_comparison, in IssueWarnings()