summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] Unconditionally enable GC of globals on COFF.Evgeniy Stepanov2017-04-261-1/+1
| | | | | | | | | | | This change restores pre-r301225 behavior, where linker GC compatible global instrumentation was used on COFF targets disregarding -f(no-)data-sections and/or /Gw flags. This instrumentation puts each global in a COMDAT with an ASan descriptor for that global. It effectively enables -fdata-sections, but limits it to ASan-instrumented globals. llvm-svn: 301374
* [Hexagon] Set -ffp-contract=fast at -O3 unless explicitly specifiedKrzysztof Parzyszek2017-04-251-0/+16
| | | | llvm-svn: 301361
* Minor fix for distribute_parallel_for_num_threads_codegen on AARCH64Carlo Bertolli2017-04-251-1/+1
| | | | llvm-svn: 301348
* [PGO/tests] Update comment to reflect reality.Davide Italiano2017-04-251-1/+1
| | | | llvm-svn: 301344
* Recommit ofCarlo Bertolli2017-04-257-0/+4235
| | | | | | | | | | | | | | [OpenMP] Initial implementation of code generation for pragma 'distribute parallel for' on host https://reviews.llvm.org/D29508 This patch makes the following additions: It abstracts away loop bound generation code from procedures associated with pragma 'for' and loops in general, in such a way that the same procedures can be used for 'distribute parallel for' without the need for a full re-implementation. It implements code generation for 'distribute parallel for' and adds regression tests. It includes tests for clauses. It is important to notice that most of the clauses are implemented as part of existing procedures. For instance, firstprivate is already implemented for 'distribute' and 'for' as separate pragmas. As the implementation of 'distribute parallel for' is based on the same procedures, then we automatically obtain implementation for such clauses without the need to add new code. However, this requires regression tests that verify correctness of produced code. llvm-svn: 301340
* [PGO] Update test now that we don't call IndirectCallPromotion.Davide Italiano2017-04-251-2/+2
| | | | llvm-svn: 301339
* [libclang] Check for a record declaration before a template specializationAlex Lorenz2017-04-251-1/+7
| | | | | | | | | | Fixes PR32539. Patch by Emilio Cobos Álvarez! Differential Revision: https://reviews.llvm.org/D32348 llvm-svn: 301328
* [index] Index type source info for class specializationsAlex Lorenz2017-04-252-0/+34
| | | | | | rdar://31758344 llvm-svn: 301315
* [index] Record the 'SpecializationOf' relation for function specializationsAlex Lorenz2017-04-251-0/+35
| | | | | | rdar://31603531 llvm-svn: 301310
* Fix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++Ismail Donmez2017-04-251-1/+1
| | | | llvm-svn: 301302
* [modules ts] Diagnose 'export' declarations outside of a module interface.Richard Smith2017-04-243-9/+34
| | | | llvm-svn: 301271
* [Modules] Fix test to wipe out the cache before using itBruno Cardoso Lopes2017-04-241-1/+1
| | | | | | | | | This should appease bots: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/35914 rdar://problem/31796737 llvm-svn: 301261
* [analyzer] Improve subscripting null arrays for catching null dereferences.Artem Dergachev2017-04-241-8/+11
| | | | | | | | | | | | | Array-to-pointer cast now works correctly when the pointer to the array is concrete, eg. null, which allows further symbolic calculations involving such values. Inlined defensive checks are now detected correctly when the resulting null symbol is being array-subscripted before dereference. Differential Revision: https://reviews.llvm.org/D32291 llvm-svn: 301251
* [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761)Vedant Kumar2017-04-241-0/+11
| | | | | | | | Patch by Adam Folwarczny! Differential Revision: https://reviews.llvm.org/D32406 llvm-svn: 301249
* Specify a target explicitly in libfuzzer driver flag testGeorge Karpenkov2017-04-241-1/+1
| | | | llvm-svn: 301246
* Revert r301223Carlo Bertolli2017-04-247-4235/+0
| | | | llvm-svn: 301233
* [asan] Disable ASan global-GC depending on the target and compiler flags.Evgeniy Stepanov2017-04-241-0/+7
| | | | llvm-svn: 301225
* [analyzer] Improve suppression for inlined defensive checks before operator &.Artem Dergachev2017-04-244-3/+89
| | | | | | | | | | | | | | | | | | | Null dereferences are suppressed if the lvalue was constrained to 0 for the first time inside a sub-function that was inlined during analysis, because such constraint is a valid defensive check that does not, by itself, indicate that null pointer case is anyhow special for the caller. If further operations on the lvalue are performed, the symbolic lvalue is collapsed to concrete null pointer, and we need to track where does the null pointer come from. Improve such tracking for lvalue operations involving operator &. rdar://problem/27876009 Differential Revision: https://reviews.llvm.org/D31982 llvm-svn: 301224
* [OpenMP] Initial implementation of code generation for pragma 'distribute ↵Carlo Bertolli2017-04-247-0/+4235
| | | | | | | | | | | | | | | | | parallel for' on host https://reviews.llvm.org/D29508 This patch makes the following additions: 1. It abstracts away loop bound generation code from procedures associated with pragma 'for' and loops in general, in such a way that the same procedures can be used for 'distribute parallel for' without the need for a full re-implementation. 2. It implements code generation for 'distribute parallel for' and adds regression tests. It includes tests for clauses. It is important to notice that most of the clauses are implemented as part of existing procedures. For instance, firstprivate is already implemented for 'distribute' and 'for' as separate pragmas. As the implementation of 'distribute parallel for' is based on the same procedures, then we automatically obtain implementation for such clauses without the need to add new code. However, this requires regression tests that verify correctness of produced code. Looking forward to comments. llvm-svn: 301223
* Remove erroneous driver test for -fsanitize=fuzzer flagGeorge Karpenkov2017-04-241-2/+0
| | | | | | | libfuzzer is not available on all platforms, and hence we can not always rely that it was compiled. llvm-svn: 301216
* Flag -fsanitize=fuzzer to enable libfuzzerGeorge Karpenkov2017-04-241-0/+22
| | | | | | | | | | Previously, adding libfuzzer to a project was a multi-step procedure, involving libfuzzer compilation, linking the library, and specifying coverage flags. With this change,libfuzzer can be enabled by adding a single -fsanitize=fuzzer flag instead. llvm-svn: 301212
* [index] If the 'external_source_symbol' attribute indicates 'Swift' as the ↵Argyrios Kyrtzidis2017-04-241-15/+15
| | | | | | language then report it accordingly llvm-svn: 301183
* [index] The relation between the declarations in template specializationsAlex Lorenz2017-04-241-0/+109
| | | | | | | | | | | | that 'override' declarations in the base template should be recorded This can be used for improved "go to definition" feature in Xcode. rdar://31604739 Differential Revision: https://reviews.llvm.org/D32020 llvm-svn: 301180
* [Devirtualization] Emit invariant.group loads with empty group mdPiotr Padlewski2017-04-241-13/+10
| | | | | | | | | | | | | | | Summary: As discussed here http://lists.llvm.org/pipermail/llvm-dev/2017-January/109332.html having different groups doesn't solve the problem entirly. Reviewers: rjmccall, rsmith Subscribers: amharc, cfe-commits Differential Revision: https://reviews.llvm.org/D32110 llvm-svn: 301178
* Rearrange some Modules TS testcases into test/CXX/modules-ts.Richard Smith2017-04-223-35/+71
| | | | llvm-svn: 301066
* Move Split DWARF handling to an MC option/command line argument rather than ↵David Blaikie2017-04-212-8/+13
| | | | | | | | | | | | | | | | | | | using metadata Since Split DWARF needs to name the actual .dwo file that is generated, it can't be known at the time the llvm::Module is produced as it may be merged with other Modules before the object is generated and that object may be generated with any name. By passing the Split DWARF file name when LLVM is producing object code the .dwo file name in the object file can match correctly. The support for Split DWARF for implicit modules remains the same - using metadata to store the dwo name and dwo id so that potentially multiple skeleton CUs referring to different dwo files can be generated from one llvm::Module. llvm-svn: 301063
* P0629R0: Switch to latest proposal for distinguishing module interface from ↵Richard Smith2017-04-215-32/+34
| | | | | | | | | | | | implementation. This switches from the prototype syntax in P0273R0 ('module' and 'module implementation') to the consensus syntax 'export module' and 'module'. In passing, drop the "module declaration must be first" enforcement, since EWG seems to have changed its mind on that. llvm-svn: 301056
* [index] Take into account the category's external_symbol attr for ↵Argyrios Kyrtzidis2017-04-211-4/+16
| | | | | | namespacing its methods llvm-svn: 301051
* [ms] Give -Wmicrosoft-enum-forward-reference a chance to fire in clang-cl, ↵Nico Weber2017-04-212-23/+24
| | | | | | | | | | | | | | | | | | PR32736 clang-cl sets MicrosoftCompat. In that mode, we always give enums a fixed underlying type, and for enums with fixed underlying type we never enter the block that tries to emit ext_ms_forward_ref_enum. Fix this by requiring an explicit underlying type when we're skipping this diagnostic. We had a test for this warning, but it only ran in C++98 mode. clang-cl always enables -std=c++14, so MicrosoftCompatibiliy-cxx98.cpp is a fairly useless test. Fold it into MicrosoftCompatibility.cpp -- that way, the test checks if -Wmicrosoft-enum-forward-reference can fire in clang-cl builds. https://reviews.llvm.org/D32369 llvm-svn: 301032
* [OpenCL] Fix semantic check of ndrange_t for device_side_enqueue.Anastasia Stulova2017-04-211-3/+5
| | | | | | | | | | | Check unqualified type for ndrange argument in device_side_enqueue so device_side_enqueue accept const and volatile qualified ndranges. Differential Revision: https://reviews.llvm.org/D31458 Patch by Dmitry Borisenkov! llvm-svn: 300988
* [clang-format] Replace IncompleteFormat by a struct with LineKrasimir Georgiev2017-04-211-1/+1
| | | | | | | | | | | | | | Summary: This patch replaces the boolean IncompleteFormat that is used to notify the client if an unrecoverable syntax error occurred by a struct that also contains a line number. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32298 llvm-svn: 300985
* [PR32667] -Wdocumentation should allow @param/@returns for fields/variablesAlex Lorenz2017-04-212-0/+134
| | | | | | | | | | | | | | | | that have a function/block pointer type This commit improves the -Wdocumentation warning by making sure that @param and @returns commands won't trigger warnings when used for fields, variables, or properties whose type is a function/block pointer type. The function/block pointer type must be specified directly with the declaration, and when a typedef is used the warning is still emitted. In the future we might also want to handle the std::function type as well. rdar://24978538 llvm-svn: 300981
* Add support for openSUSE ARM TriplesIsmail Donmez2017-04-2111-0/+40
| | | | | | | | | | | | | | Summary: Add support for armv6hl-suse-linux-gnueabi and armv7hl-suse-linux-gnueabi triples used by openSUSE/SUSE. Reviewers: cfe-commits, rovka, compnerd, rengolin Reviewed By: rengolin Subscribers: aemerson, rengolin, bkramer, chandlerc Differential Revision: https://reviews.llvm.org/D32347 llvm-svn: 300969
* [index] Take advantage of 'external_source_symbol' attribute for indexing ↵Argyrios Kyrtzidis2017-04-211-0/+88
| | | | | | | | | purposes - Ignore decls marked as 'generated_declaration' - Include the 'defined_in' in the USR for additional namespacing llvm-svn: 300949
* [index] For 'transparent' tag typedefs, ignore their tag referenceArgyrios Kyrtzidis2017-04-211-1/+2
| | | | llvm-svn: 300948
* [modules] Properly look up the owning module for an instantiation of a ↵Richard Smith2017-04-213-0/+37
| | | | | | | | | | | | | | | merged template. When looking for the template instantiation pattern of a templated entity, consistently select the definition of the pattern if there is one. This means we'll pick the same owning module when we start instantiating a template that we'll later pick when determining which modules are visible during that instantiation. This reinstates r300650, reverted in r300659, with a fix for a regression reported by Chandler after commit. llvm-svn: 300938
* [analyzer] Fix assert in ExprEngine::processSwitchAlexander Shaposhnikov2017-04-211-0/+13
| | | | | | | | | | | | | | | This diff replaces getTypeSize(CondE->getType())) with getIntWidth(CondE->getType())) in ExprEngine::processSwitch. These calls are not equivalent for bool, see ASTContext.cpp Add a test case. Test plan: make check-clang-analysis make check-clang Differential revision: https://reviews.llvm.org/D32328 llvm-svn: 300936
* Use __CLANG_ATOMIC_TYPE_LOCK_FREE macros in `stdatomic.h`Eric Fiselier2017-04-201-0/+1
| | | | | | | | | | | | | | Summary: This patch makes the header `stdatomic.h` work when `-fms-compatibility` is specified. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32322 llvm-svn: 300919
* Add __CLANG_ATOMIC_<TYPE>_LOCK_FREE macros for use in MSVC compatibility mode.Eric Fiselier2017-04-202-0/+63
| | | | | | | | | | | | | | | | | Summary: Libc++ currently implements the `ATOMIC_<TYPE>_LOCK_FREE` macros using the `__GCC_ATOMIC_<TYPE>_LOCK_FREE` macros. However these are not available when MSVC compatibility is enabled even though C11 `_Atomic` is. This prevents libc++ from correctly implementing `ATOMIC_<TYPE>_LOCK_FREE`. This patch adds an alternative spelling `__CLANG_ATOMIC_<TYPE>_LOCK_FREE` that is enabled with `-fms-compatibility`. Reviewers: rsmith, aaron.ballman, majnemer, zturner, compnerd, jfb, rnk Reviewed By: rsmith Subscribers: BillyONeal, smeenai, jfb, cfe-commits, dschuff Differential Revision: https://reviews.llvm.org/D32265 llvm-svn: 300914
* Sema: protect against ObjC++ typo-correction failureSaleem Abdulrasool2017-04-201-0/+9
| | | | | | | | | ObjC++ has two different types of "pointer" types (ObjCClassPointerType and PointerType). Both can be indirected through. However, the former is not a member expression. Ensure that we do not try to rebuild the MRE in that case. llvm-svn: 300909
* Enable leak sanitizer builds for darwinFrancis Ricci2017-04-202-0/+30
| | | | | | | | | | | | | | Summary: Support for leak sanitizer on darwin has been added to compiler-rt, this patch adds compiler support. Reviewers: dexonsmith, compnerd Subscribers: alekseyshl, kubamracek, cfe-commits Differential Revision: https://reviews.llvm.org/D32192 llvm-svn: 300894
* [Driver] Add a missing -no-canonical-prefixes to test.Benjamin Kramer2017-04-201-1/+1
| | | | llvm-svn: 300873
* Don't pass FPOpFusion::Strict to the backendAdam Nemet2017-04-201-0/+18
| | | | | | | | | | | | | | | This restores the behavior prior to D31167 where the code-gen default was FPC_On which mapped to FPOpFusion::Standard. After merging the FE state (on/off) and the code-gen state (on/fast/off), the default became off to match the front-end. In other words, the front-end controls when to fuse along the language standards and the backend shouldn't override this by splitting fused intrinsics as FPOpFusion::Strict would imply. Differential Revision: https://reviews.llvm.org/D32301 llvm-svn: 300858
* [index] Record class template specializations using a new 'SpecializationOf'Alex Lorenz2017-04-201-0/+20
| | | | | | | | | | relationship rdar://31603531 Differential Revision: https://reviews.llvm.org/D32010 llvm-svn: 300832
* Add #pragma clang attribute support to the availability attributeAlex Lorenz2017-04-203-5/+6
| | | | | | rdar://31707804 llvm-svn: 300826
* [AVR] Add -mmcu option to the driverLeslie Zhai2017-04-201-0/+5
| | | | | | | | | | | | | | A patch by Peter Wu! Reviewers: jroelofs, xiangzhai Reviewed By: jroelofs, dylanmckay, xiangzhai Subscribers: dlj, dylanmckay, cfe-commits Differential Revision: https://reviews.llvm.org/D29827 llvm-svn: 300818
* [ODRHash] clean up test and add new examples. NFCRichard Trieu2017-04-201-124/+67
| | | | | | | | | Use a macro to generate the struct with all decls. Previously, four identical changes would be needed to update this test. This macro reduces that to one location. Added two other tests for issues that triggered false positives during testing. llvm-svn: 300814
* PR32673: Don't wrap parameter packs in SubstTemplateTypeParmPackType nodes ↵Richard Smith2017-04-201-0/+35
| | | | | | | | | when forming implicit deduction guides. Doing so thwarts template type deduction. Instead, substitute the pack directly by picking "slice 0" of the resulting expansion. llvm-svn: 300805
* [Sema] Use MSVC inner class behavior on ItaniumShoaib Meenai2017-04-201-0/+25
| | | | | | | | | | | | | | Windows Itanium aims to use MSVC export and import semantics. Inner class members shouldn't be exported on a dllexport explicit instantiation definition of the outer class, and they shouldn't be imported on a dllimport explicit instantiation declaration of the outer class (instead a local copy should be emitted). We were doing the first but not the second, and this mismatch can lead to link errors. Fix the behavior and add tests for both. Differential Revision: https://reviews.llvm.org/D32213 llvm-svn: 300804
* Add a triple to codegen test.Richard Smith2017-04-201-1/+1
| | | | llvm-svn: 300803
OpenPOWER on IntegriCloud