We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b3eb1b commit c3329b1Copy full SHA for c3329b1
clang/lib/AST/Interp/Pointer.h
@@ -279,7 +279,7 @@ class Pointer {
279
return getFieldDesc()->isUnknownSizeArray();
280
}
281
/// Checks if the pointer points to an array.
282
- bool isArrayElement() const { return Base != Offset; }
+ bool isArrayElement() const { return inArray() && Base != Offset; }
283
/// Pointer points directly to a block.
284
bool isRoot() const {
285
return (Base == 0 || Base == RootPtrMark) && Offset == 0;
0 commit comments