llvm-project/clang/lib/Sema
Anastasia Stulova 6064f426a1 [OpenCL] Restrict addr space conversions in nested pointers
Address space conversion changes pointer representation.
This commit disallows such conversions when they are not
legal i.e. for the nested pointers even with compatible
address spaces. Because the address space conversion in
the nested levels can't be generated to modify the pointers
correctly. The behavior implemented is as follows:

- Any implicit conversions of nested pointers with different
  address spaces is rejected.
- Any conversion of address spaces in nested pointers in safe
  casts (e.g. const_cast or static_cast) is rejected.
- Conversion in low level C-style or reinterpret_cast is accepted
  but with a warning (this aligns with OpenCL C behavior).

Fixes PR39674

Differential Revision: https://reviews.llvm.org/D73360
2020-02-07 12:04:35 +00:00
..
AnalysisBasedWarnings.cpp [clang] detect switch fallthrough marked by a comment (PR43465) 2020-02-03 19:33:05 +01:00
CMakeLists.txt [Sema] Split availability processing into SemaAvailability.cpp 2020-01-24 17:35:39 -08:00
CodeCompleteConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CoroutineStmtBuilder.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeclSpec.cpp [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
DelayedDiagnostic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IdentifierResolver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JumpDiagnostics.cpp [NFC] Refactor representation of materialized temporaries 2019-11-19 18:20:45 +01:00
MultiplexExternalSemaSource.cpp [clang] Improve LLVM-style RTTI support in ExternalASTSource/ExternalSemaSource 2019-12-15 18:11:01 +01:00
OpenCLBuiltins.td [OpenCL] Fix tblgen support for cl_khr_mipmap_image_writes 2020-02-05 16:05:20 +00:00
ParsedAttr.cpp Move some definitions from Sema to Basic to fix shared libs build 2019-09-16 13:58:59 +00:00
Scope.cpp Un-revert "[coroutines][PR40978] Emit error for co_yield within catch block" 2019-03-25 00:53:10 +00:00
ScopeInfo.cpp PR42104: Support instantiations of lambdas that implicitly capture 2019-06-04 17:17:20 +00:00
Sema.cpp [Sema] Provide declarations for MaximumAlignment, MaxAlignmentExponent variables 2020-01-24 18:18:15 +03:00
SemaAccess.cpp [c++20] Delete defaulted comparison functions if they would invoke an 2019-12-10 19:28:30 -08:00
SemaAttr.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SemaAvailability.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SemaCUDA.cpp [HIP] Add option -fgpu-allow-device-init 2019-10-22 16:06:20 -04:00
SemaCXXScopeSpec.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
SemaCast.cpp [OpenCL] Restrict addr space conversions in nested pointers 2020-02-07 12:04:35 +00:00
SemaChecking.cpp Improve static checks for sprintf and __builtin___sprintf_chk 2020-01-25 18:10:34 +01:00
SemaCodeComplete.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SemaConcept.cpp [Concepts] Add missing CXXThisScope to function template constraint substitution 2020-02-05 01:10:35 +02:00
SemaConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SemaCoroutine.cpp Fix "pointer is null" static analyzer warnings. NFCI. 2020-01-09 12:05:48 +00:00
SemaDecl.cpp [C++20] Add consteval-specific semantic for functions 2020-02-04 20:38:32 +01:00
SemaDeclAttr.cpp [Sema] Split availability processing into SemaAvailability.cpp 2020-01-24 17:35:39 -08:00
SemaDeclCXX.cpp C++ DR2026: static storage duration variables are not zeroed before 2020-02-06 16:37:22 -08:00
SemaDeclObjC.cpp Revert "[objc_direct] Small updates to help with adoption." 2020-01-30 18:21:25 -08:00
SemaExceptionSpec.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
SemaExpr.cpp [C++20] Add consteval-specific semantic for functions 2020-02-04 20:38:32 +01:00
SemaExprCXX.cpp [Concepts] Transform constraints of non-template functions to ConstantEvaluated 2020-01-25 23:00:24 +02:00
SemaExprMember.cpp Resolve exception specifications after marking the corresponding 2019-12-15 22:02:30 -08:00
SemaExprObjC.cpp Revert "[objc_direct] Small updates to help with adoption." 2020-01-30 18:21:25 -08:00
SemaFixItUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SemaInit.cpp Replace 'AllowExplicit' bool with an enum. No functionality change. 2020-01-30 17:16:50 -08:00
SemaLambda.cpp [C++20] Add consteval-specific semantic for functions 2020-02-04 20:38:32 +01:00
SemaLookup.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
SemaModule.cpp [DeclCXX] Remove unknown external linkage specifications 2019-11-21 15:23:05 +02:00
SemaObjCProperty.cpp Revert "[objc_direct] Small updates to help with adoption." 2020-01-30 18:21:25 -08:00
SemaOpenMP.cpp [OPENMP50]Basic parsing/sema analysis for order(concurrent) clause. 2020-02-03 10:31:02 -05:00
SemaOverload.cpp [OpenCL] Restrict addr space conversions in nested pointers 2020-02-07 12:04:35 +00:00
SemaPseudoObject.cpp [AST] Use an explicit copy in a range-based for 2019-11-12 20:47:46 +01:00
SemaStmt.cpp [Sema] Avoid Wrange-loop-analysis false positives 2020-01-21 21:14:10 +01:00
SemaStmtAsm.cpp [X86][AsmParser] re-introduce 'offset' operator 2019-12-30 14:35:26 -05:00
SemaStmtAttr.cpp [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr. 2019-09-13 17:39:31 +00:00
SemaTemplate.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SemaTemplateDeduction.cpp [Concepts] Correctly form initial parameter mapping for parameter packs, support substitution into SubstNonTypeTemplateParmExpr 2020-01-31 15:59:42 +02:00
SemaTemplateInstantiate.cpp [Concepts] Fix incorrect check when instantiating abbreviated template type-constraints 2020-02-06 23:29:07 +02:00
SemaTemplateInstantiateDecl.cpp [Concepts] Fix incorrect check when instantiating abbreviated template type-constraints 2020-02-06 23:29:07 +02:00
SemaTemplateVariadic.cpp [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
SemaType.cpp [Sema] Remove unneeded TreeTransform.h includes, NFC 2020-01-24 17:48:38 -08:00
TreeTransform.h [OPENMP50]Basic parsing/sema analysis for order(concurrent) clause. 2020-02-03 10:31:02 -05:00
TypeLocBuilder.cpp [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00
TypeLocBuilder.h [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00