diff --git a/include/clang/AST/TemplateName.h b/include/clang/AST/TemplateName.h index 9b213a3b7aa57d291bf4c54d2c12c3aa9b5c6420..c85b72f08796df7b678259dbca9748d9b378bcd0 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: