aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclGroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/DeclGroup.h')
-rw-r--r--include/clang/AST/DeclGroup.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h
index 3a57281bc0..b1c2575361 100644
--- a/include/clang/AST/DeclGroup.h
+++ b/include/clang/AST/DeclGroup.h
@@ -134,4 +134,21 @@ public:
};
} // end clang namespace
+
+namespace llvm {
+ // DeclGroupRef is "like a pointer", implement PointerLikeTypeTraits.
+ template <typename T>
+ class PointerLikeTypeTraits;
+ template <>
+ class PointerLikeTypeTraits<clang::DeclGroupRef> {
+ public:
+ static inline void *getAsVoidPointer(clang::DeclGroupRef P) {
+ return P.getAsOpaquePtr();
+ }
+ static inline clang::DeclGroupRef getFromVoidPointer(void *P) {
+ return clang::DeclGroupRef::getFromOpaquePtr(P);
+ }
+ enum { NumLowBitsAvailable = 0 };
+ };
+}
#endif