summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Lex
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2019-06-06 18:49:16 +0000
committerKadir Cetinkaya <kadircet@google.com>2019-06-06 18:49:16 +0000
commit51f85b40bc6ccfce3d6f3c8d984ce6af2336116f (patch)
tree6017b34cbcd38c94b41634ddb54e4267de123106 /clang/unittests/Lex
parent06de52674da73f30751f3ff19fdf457f87077c65 (diff)
downloadbcm5719-llvm-51f85b40bc6ccfce3d6f3c8d984ce6af2336116f.tar.gz
bcm5719-llvm-51f85b40bc6ccfce3d6f3c8d984ce6af2336116f.zip
[clang][HeaderSearch] Consider all path separators equal
Reviewers: ilya-biryukov, sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62965 llvm-svn: 362731
Diffstat (limited to 'clang/unittests/Lex')
-rw-r--r--clang/unittests/Lex/HeaderSearchTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Lex/HeaderSearchTest.cpp b/clang/unittests/Lex/HeaderSearchTest.cpp
index 5bcdd9efd17..499acec9bfd 100644
--- a/clang/unittests/Lex/HeaderSearchTest.cpp
+++ b/clang/unittests/Lex/HeaderSearchTest.cpp
@@ -98,6 +98,13 @@ TEST_F(HeaderSearchTest, BackSlash) {
/*WorkingDir=*/""),
"z/t");
}
+
+TEST_F(HeaderSearchTest, BackSlashWithDotDot) {
+ addSearchDir("..\\y");
+ EXPECT_EQ(Search.suggestPathToFileForDiagnostics("C:\\x\\y\\z\\t",
+ /*WorkingDir=*/"C:/x/y/"),
+ "z/t");
+}
#endif
TEST_F(HeaderSearchTest, DotDotsWithAbsPath) {
OpenPOWER on IntegriCloud