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 {
347
347
Ty = AT->getValueType ();
348
348
349
349
// Invalid pointers.
350
- if (Ptr.isDummy () || !Ptr.isLive () ||
350
+ if (Ptr.isDummy () || !Ptr.isLive () || !Ptr. isBlockPointer () ||
351
351
(!Ptr.isUnknownSizeArray () && Ptr.isOnePastEnd ()))
352
352
return false ;
353
353
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
45
45
static_assert (Failed2 == 0 , " " ); // both-error {{not an integral constant expression}} \
46
46
// both-note {{initializer of 'Failed2' is not a constant expression}}
47
47
48
+ const int x = *(volatile int *)0x1234 ;
49
+
48
50
namespace ScalarTypes {
49
51
constexpr int ScalarInitInt = int ();
50
52
static_assert (ScalarInitInt == 0 , " " );
You can’t perform that action at this time.
0 commit comments