diff options
-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: |