File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ std::optional<APValue> Pointer::toRValue(const Context &Ctx) const {
347347 Ty = AT->getValueType ();
348348
349349 // Invalid pointers.
350- if (Ptr.isDummy () || !Ptr.isLive () ||
350+ if (Ptr.isDummy () || !Ptr.isLive () || !Ptr. isBlockPointer () ||
351351 (!Ptr.isUnknownSizeArray () && Ptr.isOnePastEnd ()))
352352 return false ;
353353
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ constexpr int Failed2 = Failed1 + 1; // both-error {{must be initialized by a co
4545static_assert (Failed2 == 0 , " " ); // both-error {{not an integral constant expression}} \
4646 // both-note {{initializer of 'Failed2' is not a constant expression}}
4747
48+ const int x = *(volatile int *)0x1234 ;
49+
4850namespace ScalarTypes {
4951 constexpr int ScalarInitInt = int ();
5052 static_assert (ScalarInitInt == 0 , " " );
You can’t perform that action at this time.
0 commit comments