diff options
| author | Kadir Cetinkaya <kadircet@google.com> | 2019-06-06 18:49:16 +0000 |
|---|---|---|
| committer | Kadir Cetinkaya <kadircet@google.com> | 2019-06-06 18:49:16 +0000 |
| commit | 51f85b40bc6ccfce3d6f3c8d984ce6af2336116f (patch) | |
| tree | 6017b34cbcd38c94b41634ddb54e4267de123106 /clang/unittests/Lex | |
| parent | 06de52674da73f30751f3ff19fdf457f87077c65 (diff) | |
| download | bcm5719-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.cpp | 7 |
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) { |

