Index: clang/lib/Sema/SemaInit.cpp =================================================================== --- clang/lib/Sema/SemaInit.cpp +++ clang/lib/Sema/SemaInit.cpp @@ -5063,9 +5063,9 @@ // than, cv2; otherwise, the program is ill-formed. unsigned T1CVRQuals = T1Quals.getCVRQualifiers(); unsigned T2CVRQuals = T2Quals.getCVRQualifiers(); - if ((RefRelationship == Sema::Ref_Related && - (T1CVRQuals | T2CVRQuals) != T1CVRQuals) || - !T1Quals.isAddressSpaceSupersetOf(T2Quals)) { + if (RefRelationship == Sema::Ref_Related && + ((T1CVRQuals | T2CVRQuals) != T1CVRQuals || + !T1Quals.isAddressSpaceSupersetOf(T2Quals))) { Sequence.SetFailed(InitializationSequence::FK_ReferenceInitDropsQualifiers); return; }