llvm-project/clang/test
Roman Lebedev c2a9061ac5
[Sema] Attempt to perform call-size-specific `__attribute__((alloc_align(param_idx)))` validation
Summary:
`alloc_align` attribute takes parameter number, not the alignment itself,
so given **just** the attribute/function declaration we can't do any
sanity checking for said alignment.

However, at call site, given the actual `Expr` that is passed
into that parameter, we //might// be able to evaluate said `Expr`
as Integer Constant Expression, and perform the sanity checks.
But since there is no requirement for that argument to be an immediate,
we may fail, and that's okay.

However if we did evaluate, we should enforce the same constraints
as with `__builtin_assume_aligned()`/`__attribute__((assume_aligned(imm)))`:
said alignment is a power of two, and is not greater than our magic threshold

Reviewers: erichkeane, aaron.ballman, hfinkel, rsmith, jdoerfert

Reviewed By: erichkeane

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72996
2020-01-23 22:50:49 +03:00
..
ARCMT
AST [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
ASTMerge
Analysis [analyzer] Improve FuchsiaHandleChecker's diagnostic messages 2020-01-23 09:16:40 -08:00
CXX [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
ClangScanDeps Revert "[clang][clang-scan-deps] Aggregate the full dependency information." 2019-12-11 16:35:55 -08:00
CodeCompletion [clang][CodeComplete] Make completion work after initializer lists 2020-01-23 15:32:46 +01:00
CodeGen [ARM,MVE] Make the MVE intrinsics work in C++! 2020-01-23 14:10:27 +00:00
CodeGenCUDA Consolidate internal denormal flushing controls 2020-01-17 20:09:53 -05:00
CodeGenCXX [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
CodeGenCoroutines
CodeGenHIP Don't dump IR output from this test to stdout. 2020-01-16 19:19:45 -08:00
CodeGenObjC Relax the rules around objc_alloc and objc_alloc_init optimizations. 2020-01-14 19:48:33 -08:00
CodeGenObjCXX Debug Info: Strengthen the synthesized-property-cleanup.mm test, NFC 2019-12-10 13:39:22 -08:00
CodeGenOpenCL Consolidate internal denormal flushing controls 2020-01-17 20:09:53 -05:00
CodeGenOpenCLCXX [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387) 2019-12-17 11:10:06 +00:00
Coverage
CoverageMapping Revert "[Coverage] Revise format to reduce binary size" 2019-12-04 10:35:14 -08:00
Driver clang-cl: Parse /QIntel-jcc-erratum 2020-01-23 18:00:38 +01:00
FixIt
Format
Frontend [clang][test][NFC] Use more widely supported sanitizer for file dependency tests 2020-01-14 12:55:11 -08:00
Headers Revert "PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer." 2020-01-20 16:34:09 -08:00
Import Tighten up CHECK lines added in a9f10ebffa to work on ARM. 2019-12-05 18:35:08 -08:00
Index [OpenCL] Pretty print __private addr space 2019-12-27 13:42:07 +00:00
Integration
InterfaceStubs [clang][IFS][test] Temporary work around for in-process cc1 ASAN issues. 2020-01-21 22:56:20 -05:00
Layout
Lexer Fix crash on init-capture packs where the type of the initializer is non-dependent. 2019-12-19 15:20:10 -08:00
Misc Remove umask tests 2020-01-10 21:05:59 -05:00
Modules Move the sysroot attribute from DIModule to DICompileUnit 2020-01-17 12:55:40 -08:00
OpenMP [OPENMP]Fix use of local allocators in allocate clauses. 2020-01-23 11:04:14 -05:00
PCH [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
Parser [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
Preprocessor [Hexagon] Add support for Hexagon/HVX v67 ISA 2020-01-20 16:16:49 -06:00
Profile Revert "[Coverage] Revise format to reduce binary size" 2019-12-04 10:35:14 -08:00
Refactor
Rewriter
Sema [Sema] Attempt to perform call-size-specific `__attribute__((alloc_align(param_idx)))` validation 2020-01-23 22:50:49 +03:00
SemaCUDA
SemaCXX [Sema] Attempt to perform call-size-specific `__attribute__((alloc_align(param_idx)))` validation 2020-01-23 22:50:49 +03:00
SemaObjC Add a FIXME and corresponding test coverage for some suspicious behavior 2020-01-10 16:12:00 -08:00
SemaObjCXX Clean up and slightly generalize implementation of composite pointer 2020-01-10 16:12:00 -08:00
SemaOpenCL CWG2352: Allow qualification conversions during reference binding. 2020-01-09 18:24:06 -08:00
SemaOpenCLCXX Clean up and slightly generalize implementation of composite pointer 2020-01-10 16:12:00 -08:00
SemaSYCL [SYCL] Add sycl_kernel attribute for accelerated code outlining 2019-12-03 16:13:22 +03:00
SemaTemplate [Concepts] Placeholder constraints and abbreviated templates 2020-01-23 19:39:43 +02:00
TableGen
Templight
Tooling
Unit
VFS Fix external-names.c test when separator is \\ 2019-12-31 11:15:46 +00:00
clang-rename
.clang-format
CMakeLists.txt [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation 2020-01-13 10:40:18 -05:00
TestRunner.sh
cxx-sections.data
lit.cfg.py
lit.site.cfg.py.in build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00
make_test_dirs.pl