Skip to content

Commit d4890c1

Browse files
committed
Address comments from Corentin
1 parent 9fb5dd6 commit d4890c1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,11 +2413,12 @@ static bool CheckEvaluationResult(CheckEvaluationResultKind CERK,
24132413
if (!Value.hasValue()) {
24142414
if (SubobjectDecl) {
24152415
Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized)
2416-
<< true << SubobjectDecl;
2416+
<< /*(name)*/ 1 << SubobjectDecl;
24172417
Info.Note(SubobjectDecl->getLocation(),
24182418
diag::note_constexpr_subobject_declared_here);
24192419
} else {
2420-
Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << false << Type;
2420+
Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized)
2421+
<< /*of type*/ 0 << Type;
24212422
}
24222423
return false;
24232424
}

clang/lib/AST/Interp/Interp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) {
439439
static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI,
440440
const FieldDecl *SubObjDecl) {
441441
assert(SubObjDecl && "Subobject declaration does not exist");
442-
S.FFDiag(SI, diag::note_constexpr_uninitialized) << true << SubObjDecl;
442+
S.FFDiag(SI, diag::note_constexpr_uninitialized)
443+
<< /*(name)*/ 1 << SubObjDecl;
443444
S.Note(SubObjDecl->getLocation(),
444445
diag::note_constexpr_subobject_declared_here);
445446
}

0 commit comments

Comments
 (0)