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() {
2062
2062
if (ImmediateDiag) {
2063
2063
// Emit our diagnostic and, if it was a warning or error, output a callstack
2064
2064
// if Fn isn't a priori known-emitted.
2065
- bool IsWarningOrError = S.getDiagnostics ().getDiagnosticLevel (
2066
- DiagID, Loc) >= DiagnosticsEngine::Warning;
2067
2065
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
+ }
2070
2073
} else {
2071
2074
assert ((!PartialDiagId || ShowCallStack) &&
2072
2075
" Must always show call stack for deferred diags." );
You can’t perform that action at this time.
0 commit comments