aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Pointer.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.h')
-rw-r--r--clang/lib/AST/ByteCode/Pointer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h
index e168154..5e7c5d6 100644
--- a/clang/lib/AST/ByteCode/Pointer.h
+++ b/clang/lib/AST/ByteCode/Pointer.h
@@ -577,6 +577,13 @@ public:
return isRoot() ? getDeclDesc()->IsConst : getInlineDesc()->IsConst;
}
+ /// Checks if an object or a subfield is volatile.
+ bool isVolatile() const {
+ if (!isBlockPointer())
+ return false;
+ return isRoot() ? getDeclDesc()->IsVolatile : getInlineDesc()->IsVolatile;
+ }
+
/// Returns the declaration ID.
std::optional<unsigned> getDeclID() const {
if (isBlockPointer()) {