[cfe-commits] [patch] Fix getDriver().getInstalledDir() comparisons

Dimitry Andric dimitry at andric.com
Fri Feb 25 15:40:02 PST 2011


Since getDriver().getInstalledDir() returns a const char *, don't try to
compare it with getDriver().Dir.c_str(), since that is a pointer
comparison, not a "are these strings equal" comparison.

Instead, just compare with getDriver().Dir directly, so both sides will
get promoted to std::string, and the regular std::string comparison
operator applies.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clang-driver-dir-1.diff
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110226/e71d1235/attachment.ksh>


More information about the cfe-commits mailing list