summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Reapply "Make static counters in ASTContext non-static." with fixes.Alexander Kornienko2019-02-253-37/+24
| | | | | | This reverts commit e50038e4dc53caee1acc811362ac0b15e00ef5eb. llvm-svn: 354827
* [CodeGenObjC] Fix a nullptr dyn_castErik Pilkington2019-02-252-2/+16
| | | | | | | | | | ObjCMessageExpr::getInstanceReceiver returns nullptr if the receiver is 'super'. Make this check more strict, since we don't care about messages to super here. rdar://48247290 llvm-svn: 354826
* [libclang] Expose warn_unused and warn_unused_result attributes.Emilio Cobos Alvarez2019-02-255-2/+22
| | | | | | | | | This is helpful to properly detect them, and fixing issues like https://github.com/rust-lang/rust-bindgen/issues/1518. Differential Revision: https://reviews.llvm.org/D58570 llvm-svn: 354824
* [libclang] Fix a trivial error introduced in D57946.Emilio Cobos Alvarez2019-02-251-1/+1
| | | | | | | | | | The value for CXCursor_ConvergentAttr is not 420. I'm not really sure how easy it is to test this, and I'm not familiar with the python bindings, just noticed the error while looking at D57946 to write D58570. Differential Revision: https://reviews.llvm.org/D58571 llvm-svn: 354823
* [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier.Michael Kruse2019-02-2516-71/+203
| | | | | | | | | | | | | | | | | | | | This patch implements the parsing and sema support for the OpenMP 'from'-clause with potential user-defined mappers attached. User-defined mappers are a new feature in OpenMP 5.0. A 'from'-clause can have an explicit or implicit associated mapper, which instructs the compiler to generate and use customized mapping functions. An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len]) struct S ss; #pragma omp target update from(mapper(id): ss) // use the mapper with name 'id' to map ss from device Contributed-by: Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D58638 llvm-svn: 354817
* Revert "Make static counters in ASTContext non-static."Vlad Tsyrklevich2019-02-253-24/+37
| | | | | | | This reverts commit r354795, I suspect it is causing test failures on MSan sanitizer bots. llvm-svn: 354812
* [analyzer] Fix infinite recursion in printing macrosKristof Umann2019-02-251-1/+11
| | | | | | | | | | | | | | | | #define f(y) x #define x f(x) int main() { x; } This example results a compilation error since "x" in the first line was not defined earlier. However, the macro expression printer goes to an infinite recursion on this example. Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D57892 llvm-svn: 354806
* Make static counters in ASTContext non-static.Alexander Kornienko2019-02-253-37/+24
| | | | | | | | | | | | | | | | | | Summary: Fixes a data race and makes it possible to run clang-based tools in multithreaded environment with TSan. Reviewers: ilya-biryukov, riccibruno Reviewed By: riccibruno Subscribers: riccibruno, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58612 llvm-svn: 354795
* [AArch64] Add support for Cortex-A76 and Cortex-A76AELuke Cheeseman2019-02-254-0/+57
| | | | | | | | | | - Add LLVM backend support for Cortex-A76 and Cortex-A76AE - Documentation can be found at https://developer.arm.com/products/processors/cortex-a/cortex-a76 Differential Revision: https://reviews.llvm.org/D57764 llvm-svn: 354789
* Fixed typos in tests: s/CHEKC/CHECK/Dmitri Gribenko2019-02-252-2/+2
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: nemanjai, javed.absar, jsji, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D58611 llvm-svn: 354785
* [SYCL] Add clang front-end option to enable SYCL device compilation flow.Alexey Bader2019-02-255-1/+22
| | | | | | Patch by Mariya Podchishchaeva <mariya.podchishchaeva@intel.com> llvm-svn: 354773
* Fix accidentally used hard tabs. NFCKristina Brooks2019-02-241-1/+1
| | | | | | | Big sorry. This undoes the indentation mess I made in r354751. llvm-svn: 354752
* Wrap code for builtin_assume_aligned at 80 col.NFCKristina Brooks2019-02-241-1/+2
| | | | | | | Minor style fix to avoid going over 80 cols in handling of case for Builtin::BI__builtin_assume_aligned. NFC. llvm-svn: 354751
* Typo: s/CHCCK/CHECKMichael Liao2019-02-241-1/+1
| | | | llvm-svn: 354742
* [NFC] Minor coding style (indent) fix.Michael Liao2019-02-241-1/+1
| | | | llvm-svn: 354741
* Enable coroutines under -std=c++2a.Richard Smith2019-02-2311-16/+22
| | | | llvm-svn: 354736
* [cxx_status] Update to match Kona motions.Richard Smith2019-02-231-8/+59
| | | | llvm-svn: 354735
* [NFC] Fix Wdocumentation warning in OMPToClauseBruno Ricci2019-02-231-1/+0
| | | | llvm-svn: 354728
* [Sema][NFC] SequenceChecker: More tests in preparation for D57660Bruno Ricci2019-02-231-5/+148
| | | | llvm-svn: 354727
* Remove OpenBSD case for old system libstdc++ header path as OpenBSDBrad Smith2019-02-231-8/+0
| | | | | | has switched to libc++. llvm-svn: 354723
* Remove sanitizer context workaround no longer necessaryBrad Smith2019-02-231-3/+1
| | | | | | The base linker is now lld. llvm-svn: 354721
* [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier.Michael Kruse2019-02-2218-118/+309
| | | | | | | | | | | | | | | | | | | This patch implements the parsing and sema support for OpenMP to clause with potential user-defined mappers attached. User defined mapper is a new feature in OpenMP 5.0. A to/from clause can have an explicit or implicit associated mapper, which instructs the compiler to generate and use customized mapping functions. An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len]) struct S ss; #pragma omp target update to(mapper(id): ss) // use the mapper with name 'id' to map ss to device Contributed-by: <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D58523 llvm-svn: 354698
* [clang] Only provide C11 features in <float.h> starting with C++17Louis Dionne2019-02-222-4/+4
| | | | | | | | | | | | | | Summary: In r353970, I enabled those features in C++11 and above. To be strictly conforming, those features should only be enabled in C++17 and above. Reviewers: jfb, eli.friedman Subscribers: jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D58289 llvm-svn: 354691
* [OPENMP] Delayed diagnostics for VLA support.Alexey Bataev2019-02-225-12/+32
| | | | | | Generalized processing of the deferred diagnostics for OpenMP/CUDA code. llvm-svn: 354690
* Fix "not all control paths return" warning. NFCI.Simon Pilgrim2019-02-221-0/+1
| | | | llvm-svn: 354681
* Revert "[OPENMP] Delayed diagnostics for VLA support."Alexey Bataev2019-02-223-20/+12
| | | | | | | This reverts commit r354679 to fix the problem with the Windows buildbots llvm-svn: 354680
* [OPENMP] Delayed diagnostics for VLA support.Alexey Bataev2019-02-223-12/+20
| | | | | | Generalized processing of the deferred diagnostics for OpenMP/CUDA code. llvm-svn: 354679
* CodeGen: use COMDAT for block copy/destroy helpersSaleem Abdulrasool2019-02-222-1/+14
| | | | | | | | | | | SVN r339438 added support to deduplicate the helpers by using a consistent naming scheme and using LinkOnceODR semantics. This works on ELF by means of weak linking semantics, and entirely does not work on PE/COFF where you end up with multiply defined strong symbols, which is a strong error on PE/COFF. Assign the functions a COMDAT group so that they can be uniqued by the linker. This fixes the use of blocks in CoreFoundation on Windows. llvm-svn: 354678
* [CUDA]Delayed diagnostics for the asm instructions.Alexey Bataev2019-02-226-20/+134
| | | | | | | | | Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and device compilation sides. Differential Revision: https://reviews.llvm.org/D58463 llvm-svn: 354671
* revert r354615: [HIP] change kernel stub nameYaxun Liu2019-02-222-8/+1
| | | | | | | | It caused regressions. Differential Revision: https://reviews.llvm.org/D58518 llvm-svn: 354651
* [analyzer] MIGChecker: Enable by default as `osx.MIG'.Artem Dergachev2019-02-222-10/+6
| | | | | | | | | | With r354643, the checker is feature-rich and polished enough. rdar://problem/35380337 Differential Revision: https://reviews.llvm.org/D58397 llvm-svn: 354644
* [analyzer] MIGChecker: Add support for more APIs.Artem Dergachev2019-02-222-18/+166
| | | | | | | | | | | | | | | Add more "consuming" functions. For now only vm_deallocate() was supported. Add a non-zero value that isn't an error; this value is -305 ("MIG_NO_REPLY") and it's fine to deallocate data when you are returning this error. Make sure that the mig_server_routine annotation is inherited. rdar://problem/35380337 Differential Revision: https://reviews.llvm.org/D58397 llvm-svn: 354643
* [analyzer] MIGChecker: Fix an FN when the object is released in a destructor.Artem Dergachev2019-02-222-3/+43
| | | | | | | | | | | | | | | | | When a MIG server routine argument is released in an automatic destructor, the Static Analyzer thinks that this happens after the return statement, and so the violation of the MIG convention doesn't happen. Of course, it doesn't quite work that way, so this is a false negative. Add a hack that makes the checker double-check at the end of function that no argument was released when the routine fails with an error. rdar://problem/35380337 Differential Revision: https://reviews.llvm.org/D58392 llvm-svn: 354642
* [analyzer] MIGChecker: Improve intermediate diagnostic notes.Artem Dergachev2019-02-222-12/+71
| | | | | | | | | | | | | | | | | | Add a BugReporterVisitor for highlighting the events of deallocating a parameter. All such events are relevant to the emitted report (as long as the report is indeed emitted), so all of them will get highlighted. Add a trackExpressionValue visitor for highlighting where does the error return code come from. Do not add a trackExpressionValue visitor for highlighting how the deallocated argument(s) was(were) copied around. This still remains to be implemented. rdar://problem/35380337 Differential Revision: https://reviews.llvm.org/D58368 llvm-svn: 354641
* [analyzer] MIGChecker: Take advantage of the mig_server_routine annotation.Artem Dergachev2019-02-222-15/+70
| | | | | | | | | | | | | | | | r354530 has added a new function/block/message attribute "mig_server_routine" that attracts compiler's attention to functions that need to follow the MIG server routine convention with respect to deallocating out-of-line data that was passed to them as an argument. Teach the checker to identify MIG routines by looking at this attribute, rather than by making heuristic-based guesses. rdar://problem/35380337 Differential Revision: https://reviews.llvm.org/58366 llvm-svn: 354638
* [analyzer] MIGChecker: A checker for Mach Interface Generator conventions.Artem Dergachev2019-02-214-0/+190
| | | | | | | | | | | | | | | | | This checker detects use-after-free bugs in (various forks of) the Mach kernel that are caused by errors in MIG server routines - functions called remotely by MIG clients. The MIG convention forces the server to only deallocate objects it receives from the client when the routine is executed successfully. Otherwise, if the server routine exits with an error, the client assumes that it needs to deallocate the out-of-line data it passed to the server manually. This means that deallocating such data within the MIG routine and then returning a non-zero error code is always a dangerous use-after-free bug. rdar://problem/35380337 Differential Revision: https://reviews.llvm.org/D57558 llvm-svn: 354635
* Use _Q as MS ABI mangling for char8_t.Richard Smith2019-02-212-7/+12
| | | | | | Thanks to Yuriy Solodkyy for letting us know the mangling here. llvm-svn: 354633
* [clang-cl] Whitelist -fbracket-depth=123 in clang-clReid Kleckner2019-02-212-1/+2
| | | | | | | | Users apparently need it when expanding large quantities of macros. Fixes PR38685 llvm-svn: 354626
* AMDGPU: Don't emit debugger subtarget featuresMatt Arsenault2019-02-212-10/+3
| | | | | | Keep the flag around for compatability. llvm-svn: 354624
* [Driver] Fix float ABI default for Android ARMv8.Dan Albert2019-02-212-1/+11
| | | | | | | | | | | | | | | | Summary: Android doesn't regress back to soft float after ARMv7 :) Reviewers: srhines, pirama Reviewed By: srhines, pirama Subscribers: javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58477 llvm-svn: 354622
* [Fixed Point Arithmetic] Fixed Point ComparisonsLeonard Chan2019-02-213-12/+428
| | | | | | | | | This patch implements fixed point comparisons with other fixed point types and integers. This also provides constant expression evaluation for them. Differential Revision: https://reviews.llvm.org/D57219 llvm-svn: 354621
* [HIP] change kernel stub nameYaxun Liu2019-02-212-1/+8
| | | | | | | | | | Add .stub to kernel stub function name so that it is different from kernel name in device code. This is necessary to let debugger find correct symbol for kernel Differential Revision: https://reviews.llvm.org/D58518 llvm-svn: 354615
* [CodeGen] Fix string literal address space casting.Michael Liao2019-02-212-3/+11
| | | | | | | | | | | | | | | | Summary: - If a string literal is reused directly, need to add necessary address space casting if the target requires that. Reviewers: yaxunl Subscribers: jvesely, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58509 llvm-svn: 354610
* [test] Fix typo: 's/ ot / to /' [NFC]Mandeep Singh Grang2019-02-211-1/+1
| | | | llvm-svn: 354608
* Revert "[CUDA]Delayed diagnostics for the asm instructions."Alexey Bataev2019-02-215-124/+13
| | | | | | | This reverts commit r354593 to fix the problem with the crash on windows. llvm-svn: 354596
* [CUDA]Delayed diagnostics for the asm instructions.Alexey Bataev2019-02-215-13/+124
| | | | | | | | | | | | | | | | Summary: Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and device compilation sides. Reviewers: tra, jlebar Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58463 llvm-svn: 354593
* [CodeComplete] Collect visited contexts when scope specifier is invalid.Eric Liu2019-02-212-4/+21
| | | | | | | | | | | | | | | | | Summary: This will allow completion consumers to guess the specified scope by putting together scopes in the context with the specified scope (e.g. when the specified namespace is not imported yet). Reviewers: ilya-biryukov Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58446 llvm-svn: 354570
* [OpenCL] Simplify LLVM IR generated for OpenCL blocksAndrew Savonichev2019-02-215-64/+91
| | | | | | | | | | | | | | | | | | | Summary: Emit direct call of block invoke functions when possible, i.e. in case the block is not passed as a function argument. Also doing some refactoring of `CodeGenFunction::EmitBlockCallExpr()` Reviewers: Anastasia, yaxunl, svenvh Reviewed By: Anastasia Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58388 llvm-svn: 354568
* [clang][Index] Enable indexing of Template Type Parameters behind a flagKadir Cetinkaya2019-02-217-4/+44
| | | | | | | | | | | | | | | | | Summary: clangd uses indexing api to provide references and it was not possible to perform symbol information for template parameters. This patch enables visiting of TemplateTypeParmTypeLocs. Reviewers: ilya-biryukov, akyrtzi Subscribers: javed.absar, kristof.beyls, ioeric, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58293 llvm-svn: 354560
* Revert r354546Serge Guelton2019-02-211-6/+7
| | | | | | This triggers an ICE on gcc 7, see http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/17598/steps/build%20stage%201/logs/stdio llvm-svn: 354549
OpenPOWER on IntegriCloud