diff options
author | Alex Lorenz <arphaman@gmail.com> | 2016-12-02 09:51:51 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2016-12-02 09:51:51 +0000 |
commit | 8c1b5c9ea9af2e4aa2234d313fbb4fbcf9bbf972 (patch) | |
tree | 1d432c489c6d292ed23d845eb89d5f953a4a0caf /clang/test | |
parent | 5ce101a848ace70fc7663b0d8129d2a4e8bbaca4 (diff) | |
download | bcm5719-llvm-8c1b5c9ea9af2e4aa2234d313fbb4fbcf9bbf972.tar.gz bcm5719-llvm-8c1b5c9ea9af2e4aa2234d313fbb4fbcf9bbf972.zip |
[Frontend] Fix an issue where a quoted search path is incorrectly
removed as a duplicate header search path
The commit r126167 started passing the First index into RemoveDuplicates, but
forgot to update 0 to First in the loop that looks for the duplicate. This
resulted in a bug where an -iquoted search path was incorrectly removed if you
passed in the same path into -iquote and more than one time into -isystem.
rdar://23991350
Differential Revision: https://reviews.llvm.org/D27298
llvm-svn: 288491
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Frontend/include-duplicate-removal.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Frontend/include-duplicate-removal.c b/clang/test/Frontend/include-duplicate-removal.c new file mode 100644 index 00000000000..fb02cd7e48c --- /dev/null +++ b/clang/test/Frontend/include-duplicate-removal.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -v -I%S/Inputs -iquote %S/Inputs/SystemHeaderPrefix -isystem %S/Inputs/SystemHeaderPrefix -isystem %S/Inputs/SystemHeaderPrefix %s 2>&1 | FileCheck %s + +#include <test.h> + +// CHECK: ignoring duplicate directory +// CHECK-SAME: Inputs/SystemHeaderPrefix"{{$}} + +// CHECK: #include "..." +// CHECK-NEXT: {{.*}}Inputs/SystemHeaderPrefix{{$}} +// CHECK-NEXT: #include <...> +// CHECK-NEXT: {{.*}}Inputs{{$}} +// CHECK-NEXT: {{.*}}Inputs/SystemHeaderPrefix{{$}} |