llvm-project/clang/test
Leonard Chan 7add582032 [Sema] Fix for crash on conditional operation with address_space pointer
Compiling the following causes clang to crash

```
char *cmp(__attribute__((address_space(1))) char *x, __attribute__((address_space(2))) char *y) {
  return x < y ? x : y;
}
```

with the message: "wrong cast for pointers in different address
spaces(must be an address space cast)!"

This is because during IR emission, the source and dest type for a
bitcast should not have differing address spaces.

This fix prints an error since the code shouldn't compile in the first place.

Differential Revision: https://reviews.llvm.org/D50278

llvm-svn: 339167
2018-08-07 19:43:53 +00:00
..
ARCMT [ObjC] Allow declaring __strong pointer fields in structs in Objective-C 2018-02-28 07:15:55 +00:00
ASTMerge [ASTImporter] Added import of CXXStdInitializerListExpr 2018-06-29 12:17:34 +00:00
Analysis [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing 2018-08-07 12:55:26 +00:00
CXX Diagnose invalid cv-qualifiers for friend decls. 2018-08-03 22:09:44 +00:00
CodeCompletion [CodeComplete] Add a few extra tests for r333538. NFC 2018-06-01 09:49:53 +00:00
CodeGen Revert "[DebugInfo] Generate debug information for labels. (Fix PR37395)" 2018-08-06 07:07:18 +00:00
CodeGenCUDA Try to make builtin address space declarations not useless 2018-08-02 12:14:28 +00:00
CodeGenCXX Auto var init test fix #2 2018-08-07 04:44:13 +00:00
CodeGenCoroutines [Coroutines] Less IR for noexcept await_resume 2018-06-23 18:57:26 +00:00
CodeGenObjC [CodeGen][ObjC] Make block copy/dispose helper functions exception-safe. 2018-07-26 16:51:21 +00:00
CodeGenObjCXX Add missing temporary materialization conversion on left-hand side of . 2018-07-27 17:13:18 +00:00
CodeGenOpenCL [OpenCL] Restore r338899 (reverted in r338904), fixing stack-use-after-return 2018-08-07 15:52:49 +00:00
Coverage Reapply "[Parse] Use CapturedStmt for @finally on MSVC" 2018-06-08 00:30:00 +00:00
CoverageMapping [OPENMP] Fix PR38256: Fix locations of the artificial conditional op. 2018-07-25 14:40:26 +00:00
Driver [WebAssembly] Remove use of lld -flavor flag 2018-08-07 18:55:41 +00:00
FixIt [Sema] Add fixit for unused lambda captures 2018-07-16 07:23:47 +00:00
Format
Frontend [Fixed Point Arithmetic] Fixed Point Constant 2018-08-06 16:42:37 +00:00
Headers [ms] Add __shiftleft128 / __shiftright128 intrinsics 2018-07-20 21:02:09 +00:00
Import [ASTImporter] Add support for import of CXXInheritedCtorInitExpr. 2018-07-25 10:21:06 +00:00
Index [libclang 8/8] Add support for the flag_enum attribute 2018-08-03 05:55:40 +00:00
Integration
Layout NFC - Fix typo in test/Layout/itanium-pack-and-align.cpp 2018-07-04 11:21:44 +00:00
Lexer [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable. 2018-08-03 23:12:37 +00:00
Misc Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
Modules Diagnose invalid cv-qualifiers for friend decls. 2018-08-03 22:09:44 +00:00
OpenMP [OPENMP] Mark variables captured in declare target region as implicitly 2018-08-07 16:14:36 +00:00
PCH [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name 2018-08-06 21:48:20 +00:00
Parser Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
Preprocessor [Android] Increase default new alignment for Android 2018-08-01 17:55:34 +00:00
Profile [FileCheck] Add -allow-deprecated-dag-overlap to failing clang tests 2018-07-11 20:26:20 +00:00
Refactor
Rewriter Reapply "[Parse] Use CapturedStmt for @finally on MSVC" 2018-06-08 00:30:00 +00:00
Sema [Sema] Fix for crash on conditional operation with address_space pointer 2018-08-07 19:43:53 +00:00
SemaCUDA [CUDA][HIP] Allow function-scope static const variable 2018-07-28 03:05:25 +00:00
SemaCXX [constexpr] Support for constant evaluation of __builtin_memcpy and 2018-08-04 00:57:17 +00:00
SemaObjC Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
SemaObjCXX [Sema] Relax a failing assert in TemplateArgumentLoc 2018-07-31 00:18:30 +00:00
SemaOpenCL AMDGPU: Add builtin for s_dcache_wb 2018-08-07 07:49:13 +00:00
SemaOpenCLCXX [OpenCL] Support new/delete in Sema 2018-06-14 09:51:54 +00:00
SemaTemplate Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
TableGen [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages. 2018-05-19 03:12:04 +00:00
Templight
Tooling [lit, python] Always add quotes around the python path in lit 2018-08-06 22:37:45 +00:00
Unit
VFS [Modules][ObjC] Warn on the use of '@import' in framework headers 2018-06-27 20:29:36 +00:00
clang-rename
.clang-format
CMakeLists.txt Support for multiarch runtimes layout 2018-06-28 03:11:52 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [test] Fix %hmaptool path for standalone builds 2018-08-01 20:38:22 +00:00
lit.site.cfg.py.in Remove unused lit setting, see https://reviews.llvm.org/D46619 2018-05-09 12:38:51 +00:00
make_test_dirs.pl