llvm-project/clang/test
Nico Weber b9d50bdff2 Fix pr31836 on Windows too, and correctly handle repeated separators.
The approach in D30000 assumes that the '/' returned by path::begin()
is the first element for absolute paths, but that's not true on
Windows.

Also, on Windows backslashes in include lines often end up escaped
so that there are two of them. Having backslashes in include lines
is undefined behavior in most cases and implementation-defined
behavior in C++20, but since clang treats it as normal repeated
path separators, the diagnostic should too.

Unbreaks -Wnonportable-include-path for absolute paths on Windows,
and unbreaks it on non-Windows in the case of absolute paths with
repeated directory separators.

This affects e.g. the `#include __FILE__` technique if the file
passed to clang has the wrong case for the drive letter. Before:

C:\src\llvm-project>bin\clang-cl.exe c:\src\llvm-project\test.cc
c:\\src\\llvm-project\\test.cc(4,10): warning: non-portable path to file
    '"c\\srccllvm-projectctest.cc.'; specified path differs in case from
    file name on disk [-Wnonportable-include-path]
         ^

Now:

C:\src\llvm-project> out\gn\bin\clang-cl c:\src\llvm-project\test.cc
c:\\src\\llvm-project\\test.cc(4,10): warning: non-portable path to file
    '"C:\\src\\llvm-project\\test.cc"'; specified path differs in case from
    file name on disk [-Wnonportable-include-path]
         ^

Differential Revision: https://reviews.llvm.org/D79223
2020-05-01 14:17:01 -04:00
..
ARCMT
AST Fix the check for regparm in FunctionType::ExtInfo 2020-04-27 16:01:07 +01:00
ASTMerge
Analysis [analyzer] Track runtime types represented by Obj-C Class objects 2020-04-29 13:35:53 +03:00
CXX Improve diagnostics for missing import / #include of module. 2020-04-28 18:41:14 -07:00
ClangScanDeps
CodeCompletion [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
CodeGen Revert "Reapply "Add support for #pragma float_control" with improvements to" 2020-05-01 10:31:09 -07:00
CodeGenCUDA [hip] Remove test using `hip_pinned_shadow` attribute. NFC. 2020-04-27 16:44:59 -04:00
CodeGenCXX Fix x86/x86_64 calling convention for _ExtInt 2020-04-29 11:04:25 -07:00
CodeGenCoroutines [CodeGen] Add an alignment attribute to all sret parameters 2020-03-24 15:31:57 -04:00
CodeGenHIP
CodeGenObjC Emit Objective-C constructors as writable 2020-04-14 22:32:34 +02:00
CodeGenObjCXX [Frontend] Drop unneeded CC1 options 2020-04-21 19:59:28 -07:00
CodeGenOpenCL Revert "Reapply "Add support for #pragma float_control" with improvements to" 2020-05-01 10:31:09 -07:00
CodeGenOpenCLCXX [CodeGen] Add an alignment attribute to all sret parameters 2020-03-24 15:31:57 -04:00
CodeGenSYCL [SYCL] Update __builtin_unique_stable_name for other backends. 2020-04-17 07:54:18 -07:00
Coverage
CoverageMapping Reland: [Coverage] Revise format to reduce binary size 2020-02-28 18:12:04 -08:00
Driver [Gnu toolchain] Move GCC multilib/multiarch paths support from Linux to Gnu 2020-05-01 12:37:12 +02:00
FixIt [objc_direct] Small updates to help with adoption. 2020-02-16 16:32:41 -08:00
Format
Frontend [Fixed Point] Add triples to test cases. 2020-04-08 16:31:36 +02:00
Headers Revert "Reapply "Add support for #pragma float_control" with improvements to" 2020-05-01 10:31:09 -07:00
Import [CodeGen] Emit destructor calls to destruct compound literals 2020-03-10 14:08:28 -07:00
Index Expose AtomicType in the libclang C API. 2020-04-16 08:06:58 -04:00
Integration
InterfaceStubs [llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists. 2020-04-01 10:49:06 -04:00
Layout [MS] Fix packed struct layout for arrays of aligned non-record types 2020-04-14 18:34:52 -07:00
Lexer Fix pr31836 on Windows too, and correctly handle repeated separators. 2020-05-01 14:17:01 -04:00
Misc Fix test/Misc/warning-flags.c after 5c03beefa7 2020-04-27 10:18:48 -07:00
Modules Improve diagnostics for missing import / #include of module. 2020-04-28 18:41:14 -07:00
OpenMP [OPENMP50]Codegen for reduction clauses with 'task' modifier. 2020-05-01 11:40:27 -04:00
PCH Revert "Reapply "Add support for #pragma float_control" with improvements to" 2020-05-01 10:31:09 -07:00
Parser Revert "Reapply "Add support for #pragma float_control" with improvements to" 2020-05-01 10:31:09 -07:00
ParserSYCL [SYCL] Implement __builtin_unique_stable_name. 2020-03-25 07:01:50 -07:00
Preprocessor [AVR][NFC] Move preprocessor tests to Preprocessor directory 2020-04-26 01:29:25 +02:00
Profile Reland: [Coverage] Revise format to reduce binary size 2020-02-28 18:12:04 -08:00
Refactor
Rewriter
Sema Disable _ExtInt by default 2020-04-29 13:48:12 -07:00
SemaCUDA recommit c77a4078e0 with fix 2020-04-28 09:14:13 -04:00
SemaCXX Fix ext-int Sema test that didn't specify a triple. 2020-04-29 14:34:53 -07:00
SemaObjC [ObjC generics] Fix not inheriting type bounds in categories/extensions. 2020-04-24 16:32:28 -07:00
SemaObjCXX [AST] dont invaliate VarDecl when the initializer contains errors. 2020-04-21 10:53:35 +02:00
SemaOpenCL [AST] Use PrintingPolicy for format string diagnosis 2020-04-28 23:43:48 +01:00
SemaOpenCLCXX [OpenCL] Fixed test for the cast operators. 2020-04-28 12:46:36 +01:00
SemaSYCL [SYCL] Driver option to select SYCL version 2020-03-07 18:28:54 +03:00
SemaTemplate PR45000: Let Sema::SubstParmVarDecl handle default args of lambdas in initializers 2020-04-22 22:37:21 +02:00
TableGen
Templight
Tooling [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin 2020-03-05 11:05:26 -08:00
Unit Revert a few unsuccessful attempts at fixing bots. 2020-04-13 17:09:21 -04:00
VFS
clang-rename [clang-rename] Fix the failure rename test. 2020-02-11 10:07:00 +01:00
utils/update_cc_test_checks Move update_cc_test_checks.py tests to clang 2020-02-14 14:39:55 +00:00
.clang-format
CMakeLists.txt Stop passing site cfg files via --param to llvm-lit. 2020-04-07 08:20:40 -04:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Fix an indent. 2020-04-13 11:54:00 -04:00
lit.site.cfg.py.in Revert "Temporarily revert "build: use `find_package(Python3)` if available"" 2020-04-29 01:38:08 +00:00
make_test_dirs.pl