]> granicus.if.org Git - clang/commit
Fix dangling pointer in isDerivedFrom.
authorSamuel Benzaquen <sbenza@google.com>
Mon, 5 Jan 2015 15:26:42 +0000 (15:26 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Mon, 5 Jan 2015 15:26:42 +0000 (15:26 +0000)
commit35276390608adec9840c7ed64f2ee211162a97cb
treeb2f87a6484b29c688d52756dc0a76b0b04f08aff
parent2636d188e64d28ace63b361f1f1382b9deb6e731
Fix dangling pointer in isDerivedFrom.

Summary:
Replace usage of StringRef with std::string in AST_MATCHER* generated
matchers to make sure they keep their own copy of the string.
The value could be a temporary and it causes the pointer to be dangling
by the time the matcher is executed.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D6843

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225180 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchers.h