llvm-project/clang/lib
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
..
ARCMigrate Remove trailing space 2018-07-30 19:24:48 +00:00
AST [AST] Remove unnecessary indirections in DeclarationNameTable 2018-08-06 16:47:31 +00:00
ASTMatchers [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's declaration. 2018-07-27 17:26:11 +00:00
Analysis Properly add shared locks to the initial list of locks being tracked, instead of assuming unlock functions always use exclusive locks. 2018-08-03 19:37:45 +00:00
Basic [VFS] Emit an error when entry at root level uses a relative path. 2018-08-07 19:05:41 +00:00
CodeGen [OPENMP] Mark variables captured in declare target region as implicitly 2018-08-07 16:14:36 +00:00
CrossTU [CrossTU] Fix handling of Cross Translation Unit directory path 2017-10-27 12:53:37 +00:00
Driver [WebAssembly] Remove use of lld -flavor flag 2018-08-07 18:55:41 +00:00
Edit Remove trailing space 2018-07-30 19:24:48 +00:00
Format [clang-format] comment reflow: add last line's penalty when ending broken 2018-08-07 10:23:24 +00:00
Frontend [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable. 2018-08-03 23:12:37 +00:00
FrontendTool Remove trailing space 2018-07-30 19:24:48 +00:00
Headers [clang] Fix broken include_next in float.h 2018-08-06 14:29:47 +00:00
Index Remove trailing space 2018-07-30 19:24:48 +00:00
Lex Remove trailing space 2018-07-30 19:24:48 +00:00
Parse Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
Rewrite Remove trailing space 2018-07-30 19:24:48 +00:00
Sema [Sema] Fix for crash on conditional operation with address_space pointer 2018-08-07 19:43:53 +00:00
Serialization Append new attributes to the end of an AttributeList. 2018-08-03 01:21:16 +00:00
StaticAnalyzer [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing 2018-08-07 12:55:26 +00:00
Tooling Fully qualify the renamed symbol if the shortened name is ambiguous. 2018-08-03 09:16:07 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00