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)
commit45ed4f954265175849efdd0d45940a64395b44d0
treef9f92b4eb3c9ecadeb31071f286f5b7ee7285a31
parentf199f4c593ec96835c1680795ddd3b33e29a29f8
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

llvm-svn: 225180
clang/include/clang/ASTMatchers/ASTMatchers.h