================ @@ -435,9 +435,8 @@ static std::string replaceDotDot(StringRef Path) { llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (B != E) { - if (B->compare(".") == 0) { - } - else if (B->compare("..") == 0) + if (*B == ".") { + } else if (*B == "..") llvm::sys::path::remove_filename(Buffer); else ---------------- MaskRay wrote:
Refactor this to `else if (*B != ".")` https://github.com/llvm/llvm-project/pull/92708 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits