diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-08 22:20:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-08 22:20:31 +0000 |
commit | 1207d3195276362a1dd9bfbefccd847bd557454a (patch) | |
tree | 294da4dd7312b3c956dcef62c516e6b613fd28da /llvm/lib/Transforms/Utils/CloneModule.cpp | |
parent | d796164e89187d59c663e63ba30042a7f139477e (diff) | |
download | llvm-1207d3195276362a1dd9bfbefccd847bd557454a.zip llvm-1207d3195276362a1dd9bfbefccd847bd557454a.tar.gz llvm-1207d3195276362a1dd9bfbefccd847bd557454a.tar.bz2 |
Fix a bug that crashed clang when parsing this:
class C {
static const int number = 50;
static int arr[number];
};
Here's how it worked:
-GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator.
-VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr.
-On exit they both tried to destroy that one DeclRefExpr.
The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator.
llvm-svn: 57313
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
0 files changed, 0 insertions, 0 deletions