diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2018-10-01 11:56:42 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2018-10-01 11:56:42 +0000 |
| commit | 3e4f5eb33c98a324a8c62c885006fa8922fb0d0d (patch) | |
| tree | 2d4db00fd843d901847cc67873607c1f6d53fe32 /clang/test/CodeCompletion | |
| parent | c6268f3ba2c5c3d33e32534f7b602aa396982cdb (diff) | |
| download | bcm5719-llvm-3e4f5eb33c98a324a8c62c885006fa8922fb0d0d.tar.gz bcm5719-llvm-3e4f5eb33c98a324a8c62c885006fa8922fb0d0d.zip | |
[CodeComplete] #include completion treats -I as non-system (require header-like extension).
llvm-svn: 343457
Diffstat (limited to 'clang/test/CodeCompletion')
| -rw-r--r-- | clang/test/CodeCompletion/included-files.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/clang/test/CodeCompletion/included-files.cpp b/clang/test/CodeCompletion/included-files.cpp index 81892c58c4d..ba153e6e275 100644 --- a/clang/test/CodeCompletion/included-files.cpp +++ b/clang/test/CodeCompletion/included-files.cpp @@ -15,15 +15,21 @@ // CHECK-2: foosys.h" // CHECK-2-NOT: foosys" -// Angled string showes all files, but only in system dirs. +// Angled shows headers from system dirs. #include <foosys> // RUN: %clang -fsyntax-only -isystem %t/a -Xclang -code-completion-at=%t/main.cc:19:13 %t/main.cc | FileCheck -check-prefix=CHECK-3 %s // CHECK-3-NOT: foo.cc> // CHECK-3-NOT: foo.h> // CHECK-3: foosys> +// With -I rather than -isystem, the header extension is required. +#include <foosys> +// RUN: %clang -fsyntax-only -I %t/a -Xclang -code-completion-at=%t/main.cc:26:13 %t/main.cc | FileCheck -check-prefix=CHECK-4 %s +// CHECK-4-NOT: foo.cc> +// CHECK-4-NOT: foo.h> +// CHECK-4-NOT: foosys> + // Backslash handling. #include "a\foosys" -// RUN: %clang -fsyntax-only -isystem %t/a -Xclang -code-completion-at=%t/main.cc:26:13 %t/main.cc -fms-compatibility | FileCheck -check-prefix=CHECK-4 %s -// CHECK-4: foosys.h" - +// RUN: %clang -fsyntax-only -isystem %t/a -Xclang -code-completion-at=%t/main.cc:33:13 %t/main.cc -fms-compatibility | FileCheck -check-prefix=CHECK-5 %s +// CHECK-5: foosys.h" |

