diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-15 01:39:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-15 01:39:24 +0000 |
commit | 9c34ee65a61bbfb60ae76d4df674f49df1842e70 (patch) | |
tree | f4518740d93f502bcc171bf706a1cda534a02d14 | |
parent | c7793c73ba8a343de3f2552d984851985a46f159 (diff) |
Tweak the storage mechanism for a set of overloaded template names in
the TemplateName class. Nothing actually changes, but I find this less
objectionable (and it will factor into an upcoming change).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123508 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/TemplateName.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/AST/TemplateName.h b/include/clang/AST/TemplateName.h index 9b213a3b7a..c85b72f087 100644 --- a/include/clang/AST/TemplateName.h +++ b/include/clang/AST/TemplateName.h @@ -38,18 +38,18 @@ class TemplateDecl; class OverloadedTemplateStorage { union { unsigned Size; - NamedDecl *Storage[1]; + void *PointerAlignment; }; - + friend class ASTContext; OverloadedTemplateStorage(unsigned Size) : Size(Size) {} NamedDecl **getStorage() { - return &Storage[1]; + return reinterpret_cast<NamedDecl **>(this + 1); } NamedDecl * const *getStorage() const { - return &Storage[1]; + return reinterpret_cast<NamedDecl *const *>(this + 1); } public: |