When checking for uninitialized values, do not confuse "std::move" with every

other function named "move".

llvm-svn: 222863
This commit is contained in:
Richard Trieu
2014-11-27 01:29:32 +00:00
parent e13d71c57c
commit c321b931c0
4 changed files with 50 additions and 3 deletions

View File

@@ -419,7 +419,8 @@ void ClassifyRefs::VisitCallExpr(CallExpr *CE) {
// Classify arguments to std::move as used.
if (CE->getNumArgs() == 1) {
if (FunctionDecl *FD = CE->getDirectCallee()) {
if (FD->getIdentifier() && FD->getIdentifier()->isStr("move")) {
if (FD->isInStdNamespace() && FD->getIdentifier() &&
FD->getIdentifier()->isStr("move")) {
classify(CE->getArg(0), Use);
return;
}