diff options
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Pointer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp index 324097a..8abdc54b 100644 --- a/clang/lib/AST/ByteCode/Pointer.cpp +++ b/clang/lib/AST/ByteCode/Pointer.cpp @@ -210,7 +210,8 @@ APValue Pointer::toAPValue(const ASTContext &ASTCtx) const { }; bool UsePath = true; - if (getType()->isLValueReferenceType()) + if (const ValueDecl *VD = getDeclDesc()->asValueDecl(); + VD && VD->getType()->isLValueReferenceType()) UsePath = false; // Build the path into the object. |