llvm-project/clang/test
Gabor Buella 1a83d06768 [CodeGen] Improve diagnostics related to target attributes
Summary:
When requirement imposed by __target__ attributes on functions
are not satisfied, prefer printing those requirements, which
are explicitly mentioned in the attributes.

This makes such messages more useful, e.g. printing avx512f instead of avx2
in the following scenario:

```
$ cat foo.c
static inline void __attribute__((__always_inline__, __target__("avx512f")))
x(void)
{
}

int main(void)
{
            x();
}
$ clang foo.c
foo.c:7:2: error: always_inline function 'x' requires target feature 'avx2', but would be inlined into function 'main' that is compiled without support for 'avx2'
        x();
    ^
1 error generated.
```

bugzilla: https://bugs.llvm.org/show_bug.cgi?id=37338

Reviewers: craig.topper, echristo, dblaikie

Reviewed By: craig.topper, echristo

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

llvm-svn: 334174
2018-06-07 08:48:36 +00:00
..
ARCMT [ObjC] Allow declaring __strong pointer fields in structs in Objective-C 2018-02-28 07:15:55 +00:00
ASTMerge [ASTImporter] FriendDecl importing improvements 2018-04-25 17:28:03 +00:00
Analysis [Analyzer][Z3] Test fixes for Z3 constraint manager 2018-06-06 06:25:51 +00:00
CXX [Sema] Use %sub to cleanup overload diagnostics 2018-05-30 01:00:41 +00:00
CodeCompletion [CodeComplete] Add a few extra tests for r333538. NFC 2018-06-01 09:49:53 +00:00
CodeGen [CodeGen] Improve diagnostics related to target attributes 2018-06-07 08:48:36 +00:00
CodeGenCUDA [CUDA][HIP] Do not emit type info when compiling for device 2018-06-05 15:11:02 +00:00
CodeGenCXX Revert r333791 "Cap "voluntary" vector alignment at 16 for all Darwin platforms." 2018-06-04 21:39:20 +00:00
CodeGenCoroutines [coroutines] Pass implicit object parameter to promise ctor (fix BUG37604) 2018-05-28 18:08:47 +00:00
CodeGenObjC [objc-gnu] Fix test. 2018-05-22 10:13:14 +00:00
CodeGenObjCXX [CodeGen] Avoid destructing a callee-destructued struct type in a 2018-04-27 06:57:00 +00:00
CodeGenOpenCL [AMDGPU] fixes for lds f32 builtins 2018-05-21 16:18:07 +00:00
Coverage [analyzer] Fix filename in cross-file HTML report 2018-05-02 14:26:12 +00:00
CoverageMapping [Coverage] Remove a test dependency on the itanium ABI 2018-06-01 17:11:18 +00:00
Driver [Driver] Stop passing -fseh-exceptions for x86_64-windows-msvc 2018-06-06 23:09:02 +00:00
FixIt [Parser][FixIt] Better diagnostics for "typedef" instead of "typename" typo 2018-02-08 14:37:58 +00:00
Format [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
Frontend This diff includes changes for supporting the following types. 2018-06-04 16:07:52 +00:00
Headers [X86] Reduce the number of setzero intrinsics to just the set defined by the Intel Intrinsics Guide. 2018-05-30 18:02:11 +00:00
Import [ASTImporter] Properly import SourceLocations of Attrs 2018-05-08 12:45:21 +00:00
Index [Frontend] Avoid running plugins during code completion parse 2018-05-17 09:21:07 +00:00
Integration
Layout [Sema] Fix incorrect packed aligned structure layout 2018-05-21 14:28:43 +00:00
Lexer As discussed with SG10, bump version of __cpp_deduction_guides macro to indicate support for P0620R0. 2018-05-30 19:54:52 +00:00
Misc Fix test failure after r333485. Try 2. 2018-05-30 02:20:40 +00:00
Modules Change return value of trivial visibility check. 2018-06-07 03:20:30 +00:00
OpenMP [OPENMP, NVPTX] Fixed codegen for orphaned parallel region. 2018-05-25 20:16:03 +00:00
PCH [C++2a] Implement operator<=> CodeGen and ExprConstant 2018-05-07 21:07:10 +00:00
Parser Improve diagonstic for braced-init-list as operand to ?: expression. 2018-05-24 22:02:52 +00:00
Preprocessor [PATCH 2/2] [test] Add support for Samsung Exynos M4 (NFC) 2018-06-06 18:58:01 +00:00
Profile
Refactor
Rewriter
Sema Detect an incompatible VLA pointer assignment 2018-06-05 09:18:26 +00:00
SemaCUDA [CUDA] Check initializers of instantiated template variables. 2018-06-06 22:37:25 +00:00
SemaCXX Change the wording of RTTI errors to make them more generic. 2018-06-07 00:42:59 +00:00
SemaObjC Check pointer null-ness before dereferencing it. 2018-05-29 22:43:00 +00:00
SemaObjCXX Improve diagnostics and error recovery for template name lookup. 2018-05-11 02:43:08 +00:00
SemaOpenCL [AMDGPU] fixes for lds f32 builtins 2018-05-21 16:18:07 +00:00
SemaOpenCLCXX [OpenCL] Restrict various keywords in OpenCL C++ mode 2018-05-09 13:16:17 +00:00
SemaTemplate PR37680: fix faulty assertion condition. 2018-06-06 16:36:56 +00:00
TableGen [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages. 2018-05-19 03:12:04 +00:00
Templight [Templight] Template Instantiation Observer 2018-02-10 14:04:45 +00:00
Tooling Fix test clang-diff-json.cpp 2018-02-10 21:28:55 +00:00
Unit
VFS [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
clang-rename
.clang-format
CMakeLists.txt [ThinLTO/CFI] Include TYPE_ID summaries into GLOBALVAL_SUMMARY_BLOCK 2018-02-14 22:41:15 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages. 2018-05-19 03:12:04 +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