diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-27 14:05:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-27 14:05:10 +0200 |
commit | 58c8c09f8d9aa87f5579063844be6779f0a2f9f6 (patch) | |
tree | 1a722be7c61cc2cd578395eeefb9c4d9c5558411 | |
parent | 7c0da317ebcd9ac8b1141d6fc0f3b6f4973563f4 (diff) |
fix allocation on stack
-rw-r--r-- | clang/rename.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/rename.cxx b/clang/rename.cxx index 76e1655..14bfc85 100644 --- a/clang/rename.cxx +++ b/clang/rename.cxx @@ -167,6 +167,15 @@ public: aName = pRecordDecl->getNameAsString(); RewriteText(pDecl->getTypeSpecStartLoc(), pRecordDecl->getNameAsString().length(), aName); } + else if (clang::CXXRecordDecl* pCXXRecordDecl = pType->getAsCXXRecordDecl()) + { + /* + * C c; + * ^ Handles this. + */ + aName = pCXXRecordDecl->getNameAsString(); + RewriteText(pDecl->getTypeSpecStartLoc(), pCXXRecordDecl->getNameAsString().length(), aName); + } return true; } |