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 @@ -2281,11 +2281,14 @@ Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() {
2281
2281
if (ImmediateDiag) {
2282
2282
// Emit our diagnostic and, if it was a warning or error, output a callstack
2283
2283
// if Fn isn't a priori known-emitted.
2284
- bool IsWarningOrError = S.getDiagnostics ().getDiagnosticLevel (
2285
- DiagID, Loc) >= DiagnosticsEngine::Warning;
2286
2284
ImmediateDiag.reset (); // Emit the immediate diag.
2287
- if (IsWarningOrError && ShowCallStack)
2288
- emitCallStackNotes (S, Fn);
2285
+
2286
+ if (ShowCallStack) {
2287
+ bool IsWarningOrError = S.getDiagnostics ().getDiagnosticLevel (
2288
+ DiagID, Loc) >= DiagnosticsEngine::Warning;
2289
+ if (IsWarningOrError)
2290
+ emitCallStackNotes (S, Fn);
2291
+ }
2289
2292
} else {
2290
2293
assert ((!PartialDiagId || ShowCallStack) &&
2291
2294
" Must always show call stack for deferred diags." );
You can’t perform that action at this time.
0 commit comments