This is an archive of the discontinued LLVM Phabricator instance.

Fix dangling pointer in isDerivedFrom.
ClosedPublic

Authored by sbenza on Jan 5 2015, 7:26 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

sbenza updated this revision to Diff 17798.Jan 5 2015, 7:26 AM
sbenza retitled this revision from to Fix dangling pointer in isDerivedFrom..
sbenza updated this object.
sbenza edited the test plan for this revision. (Show Details)
sbenza added a reviewer: klimek.
sbenza added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.
klimek edited edge metadata.Jan 5 2015, 8:07 AM

FYI: Usually when you have simple fixes like this that don't need pre-commit review, you don't need to send a patch with arc. You just land them.