File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2062,11 +2062,14 @@ Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() {
20622062 if (ImmediateDiag) {
20632063 // Emit our diagnostic and, if it was a warning or error, output a callstack
20642064 // if Fn isn't a priori known-emitted.
2065- bool IsWarningOrError = S.getDiagnostics ().getDiagnosticLevel (
2066- DiagID, Loc) >= DiagnosticsEngine::Warning;
20672065 ImmediateDiag.reset (); // Emit the immediate diag.
2068- if (IsWarningOrError && ShowCallStack)
2069- emitCallStackNotes (S, Fn);
2066+
2067+ if (ShowCallStack) {
2068+ bool IsWarningOrError = S.getDiagnostics ().getDiagnosticLevel (
2069+ DiagID, Loc) >= DiagnosticsEngine::Warning;
2070+ if (IsWarningOrError)
2071+ emitCallStackNotes (S, Fn);
2072+ }
20702073 } else {
20712074 assert ((!PartialDiagId || ShowCallStack) &&
20722075 " Must always show call stack for deferred diags." );
You can’t perform that action at this time.
0 commit comments