]> granicus.if.org Git - clang/commitdiff
Maybe we should store template arguments in the position we allocated for them
authorJohn McCall <rjmccall@apple.com>
Thu, 8 Apr 2010 17:47:15 +0000 (17:47 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 8 Apr 2010 17:47:15 +0000 (17:47 +0000)
instead of scribbling over random memory.  Maybe.

Hopefully this fixes the -vg buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100784 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclTemplate.h

index bb24c3f5f0164765ac676209179f8414cdab8ca0..9f8d88fd49a121e963f04d49325640e1f3f26b02 100644 (file)
@@ -412,7 +412,7 @@ class DependentFunctionTemplateSpecializationInfo {
 
   const TemplateArgumentLoc *getTemplateArgs() const {
     return reinterpret_cast<const TemplateArgumentLoc*>(
-             getTemplates()[getNumTemplates()]);
+             &getTemplates()[getNumTemplates()]);
   }
 
 public: