summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* fix regexes for label names in ms-intrinsics testAlbert Gutowski2016-10-121-8/+8
| | | | llvm-svn: 284062
* Implement MS _BitScan intrinsicsAlbert Gutowski2016-10-121-3/+65
| | | | | | | | | | | | Summary: _BitScan intrinsics (and some others, for example _Interlocked and _bittest) are supposed to work on both ARM and x86. This is an attempt to isolate them, avoiding repeating their code or writing separate function for each builtin. Reviewers: hans, thakis, rnk, majnemer Subscribers: RKSimon, cfe-commits, aemerson Differential Revision: https://reviews.llvm.org/D25264 llvm-svn: 284060
* Remove basic block label in test caseArnold Schwaighofer2016-10-121-1/+0
| | | | | | Another attempt to make a bot happy llvm-svn: 284055
* Specify a target cpu in test caseArnold Schwaighofer2016-10-121-1/+1
| | | | | | Hopefully, this makes the bots happy llvm-svn: 284048
* Declare WinX86_64ABIInfo to satisfy SwiftABI infoArnold Schwaighofer2016-10-122-0/+460
| | | | | | | | | This is minimal support that allows swift's test cases on non windows platforms to pass. rdar://28738985 llvm-svn: 284032
* Move x86-64 builtins from SemaChecking.cpp to BuiltinsX86_64.defAlbert Gutowski2016-10-122-22/+60
| | | | | | | | | | | | Summary: Follow-up to https://reviews.llvm.org/D24598 (separating builtins for x84-64 and i386). Reviewers: hans, thakis, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25494 llvm-svn: 284026
* [ARM] Fix - missing target-cpu in testJaved Absar2016-10-121-1/+1
| | | | | | | | Fixes an incomplete test, wherein the target-cpu name (cortex-r52) was missing. Differential Revision: http://reviews.llvm.org/D25474 llvm-svn: 284009
* Reinstate r283887 and r283882.Vassil Vassilev2016-10-127-0/+55
| | | | | | | | | | | Original message: "[modules] PR28752: Do not instantiate variable declarations which are not visible. https://reviews.llvm.org/D24508 Patch developed in collaboration with Richard Smith!" llvm-svn: 284008
* [CodeCompletion] Show protocol properties that are accessed through qualified idAlex Lorenz2016-10-121-0/+24
| | | | | | | | | | | | This commit improves code completion for properties that are declared in Objective-C protocols by making sure that properties show up in completions when they are accessed through a qualified id. rdar://24426041 Differential Revision: https://reviews.llvm.org/D25436 llvm-svn: 284007
* [Sema] Handle transparent_union attributes in C mode onlyAlex Lorenz2016-10-121-0/+16
| | | | | | | | | | | | | | | This commit marks the transparent_union attributes as C only because clang doesn't support them in C++ mode. Prior to this commit, clang still tried to verify these attributes in C++, leading to crashes when analyzing templated transparent_union unions that have dependent field types. This commit ensures that such crashes won't happen again. As a result of this commit clang now displays a warning every time it encounters a transparent_union attribute in C++ mode. Differential Revision: https://reviews.llvm.org/D25308 llvm-svn: 283995
* Added REQUIRED triples to the test that fails on some ARM buildbots.Artem Belevich2016-10-121-0/+3
| | | | llvm-svn: 283964
* [CUDA] Make touching a kernel from a __host__ __device__ function a deferred ↵Justin Lebar2016-10-123-19/+37
| | | | | | | | | | | | | | | | error. Previously, this was an immediate, don't pass go, don't collect $200 error. But this precludes us from writing code like __host__ __device__ void launch_kernel() { kernel<<<...>>>(); } Such code isn't wrong, following our notions of right and wrong in CUDA, unless it's codegen'ed. llvm-svn: 283963
* Revert - When optimizing for size, enable loop rerolling by defaultMike Edwards2016-10-111-5/+0
| | | | | | This reverts r283685 as it is causing test failures on Green Dragon. llvm-svn: 283950
* [Profile] Update testcase for r283948 (NFC)Vedant Kumar2016-10-111-1/+1
| | | | | | | | | | | Old: "__DATA,__llvm_prf_data" New: "__DATA,__llvm_prf_data,regular,live_support" This should fix the following bot failure: http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55158 llvm-svn: 283949
* Module: for ObjectiveC, be consistent when checking hidden decls.Manman Ren2016-10-115-0/+32
| | | | | | | | | In MatchAllMethodDeclarations, when checking a hidden decl, be sure to allow hidden when searching for methods. rdar://28699972 llvm-svn: 283943
* Swift Calling Convention: Parameters are allowed after theArnold Schwaighofer2016-10-112-4/+4
| | | | | | | | | | | swift_error/swift_context parameter We need to be able to decelare witness functions which append the self type and the self witness tables at the end of the parameter list. rdar://28720996 llvm-svn: 283933
* [Driver] Use -fsyntax-only in test/Driver/show-option-names.cBruno Cardoso Lopes2016-10-111-2/+2
| | | | | | Make the test less expensive, follow up from r283915. llvm-svn: 283917
* [Driver] Fix test from r283913 to unbreak botsBruno Cardoso Lopes2016-10-111-2/+4
| | | | | | | | Followup from r283913 & r283827 http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55135 llvm-svn: 283915
* Reapply [Driver][Diagnostics] Make 'show option names' default for driver ↵Bruno Cardoso Lopes2016-10-111-0/+5
| | | | | | | | | | | | | | | | | | warnings Reapply r283827 by fixing the tests to not be target specific Currently, driver level warnings do not show option names (e.g. warning: complain about foo [-Woption-name]) in a diagnostic unless -fdiagnostics-show-option is explictly specified. OTOH, the driver by default turn this option on for CC1. Change the logic to show option names by default in the driver as well. Differential Revision: https://reviews.llvm.org/D24516 rdar://problem/27300909 llvm-svn: 283913
* Fix clang-offload-bundler test.Zachary Turner2016-10-111-1/+1
| | | | | | | A recent change to llvm::cl slightly changed the format of the help output, and it broke this test. NFC llvm-svn: 283895
* [OpenCL] Allow partial initializer for array and structYaxun Liu2016-10-111-0/+66
| | | | | | | | | | | | | | Currently Clang allows partial initializer for C99 but not for OpenCL, e.g. float a[16][16] = {1.0f, 2.0f}; is allowed in C99 but not allowed in OpenCL. This patch fixes that. Differential Revision: https://reviews.llvm.org/D25335 llvm-svn: 283891
* Revert r283887 and r283882, until the issue is understood and fixed.Vassil Vassilev2016-10-117-55/+0
| | | | llvm-svn: 283890
* [modules] PR28752: Do not instantiate variable declarations which are not ↵Vassil Vassilev2016-10-117-0/+55
| | | | | | | | | | visible. https://reviews.llvm.org/D24508 Patch developed in collaboration with Richard Smith! llvm-svn: 283882
* Revert "[Driver][Diagnostics] Make 'show option names' default for driver ↵Renato Golin2016-10-111-5/+0
| | | | | | | | warnings" This reverts commit r283827, as it's breaking all ARM/AARch64 bots. llvm-svn: 283868
* Explicitly ignore return code in test for test systems that use pipefailDaniel Jasper2016-10-111-2/+2
| | | | llvm-svn: 283853
* Fixup test/Driver/opt-record.c for nvptx pointer sizeHal Finkel2016-10-111-1/+1
| | | | | | On some systems, it looks like nvptx is used instead of nvptx64. llvm-svn: 283839
* Add an option to save the backend-produced YAML optimization record to a fileHal Finkel2016-10-113-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | The backend now has the capability to save information from optimizations, the same information that can be used to generate optimization diagnostics but in machine-consumable form, into an output file. This can be enabled when using opt (see r282539), and this change enables it when using clang. The idea is that other tools will be able to consume these files, and perhaps in combination with the original source code, produce various kinds of optimization reports for users (and for compiler developers). We now have at-least two tools that can consume these files: * tools/llvm-opt-report * utils/opt-viewer Using the flag -fsave-optimization-record will cause the YAML file to be generated; the file name will be based on the output file name (if we're using -c or -S and have an output name), or the input file name. When we're using CUDA, or some other offloading mechanism, separate files are generated for each backend target. The output file name can be specified by the user using -foptimization-record-file=filename. Differential Revision: https://reviews.llvm.org/D25225 llvm-svn: 283834
* Aligned allocation versus CUDA: make deallocation function preference orderRichard Smith2016-10-111-0/+13
| | | | | | | | | | | | | match other CUDA preference orders, per discussion with jlebar. We now model this in an attempt to match overload resolution as closely as possible: - First, we throw out all non-callable (due to CUDA host/device mismatch) operator delete functions. - Then we apply sizedness / alignedness preferences based on whether the type is overaligned and whether the deallocation function is a member. - Finally, we use the CUDA callability preference as a tiebreaker. llvm-svn: 283830
* [Driver][Diagnostics] Make 'show option names' default for driver warningsBruno Cardoso Lopes2016-10-111-0/+5
| | | | | | | | | | | | | | Currently, driver level warnings do not show option names (e.g. warning: complain about foo [-Woption-name]) in a diagnostic unless -fdiagnostics-show-option is explictly specified. OTOH, the driver by default turn this option on for CC1. Change the logic to show option names by default in the driver as well. Differential Revision: https://reviews.llvm.org/D24516 rdar://problem/27300909 llvm-svn: 283827
* [Driver] Let -gline-tables-only win when it comes after -gmodules.Adrian Prantl2016-10-101-0/+11
| | | | | | | | | | | | The -gmodules option is all about putting debug type info into clang modules and for line tables the type information is irrelevant, so combining these two options makes no sense. This commmit fixes the behavior to match the one documented on the clang man page: the last -g... option wins. <rdar://problem/27059770> llvm-svn: 283810
* Add -fno-sanitize-address-use-after-scope flagVitaly Buka2016-10-101-5/+11
| | | | | | | | Reviewers: eugenis Differential Revision: https://reviews.llvm.org/D25453 llvm-svn: 283801
* Implement MS read/write barriers and __faststorefence intrinsicAlbert Gutowski2016-10-101-0/+39
| | | | | | | | | | Reviewers: hans, rnk, majnemer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25442 llvm-svn: 283793
* Re-commit r283722, reverted in r283750, with a fix for a CUDA-specific use ofRichard Smith2016-10-106-4/+391
| | | | | | | | | | | past-the-end iterator. Original commit message: P0035R4: Semantic analysis and code generation for C++17 overaligned allocation. llvm-svn: 283789
* Implement __emul, __emulu, _mul128 and _umul128 MS intrinsicsAlbert Gutowski2016-10-102-26/+74
| | | | | | | | | | Reviewers: rnk, thakis, majnemer, hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25353 llvm-svn: 283785
* [Sema] Prevent using member declaration diagnostic if the base class is invalid.Eric Fiselier2016-10-101-0/+9
| | | | | | | | | | | | | | | Summary: Once a base class has been made invalid (by a static_assert for example) all using-member declarations in the derived classes will result in a "not a base class" diagnostic. This diagnostic is very misleading and should not be emitted. This change is needed to help libc++ produce reasonable diagnostics in `std::optional` and `std::variant`. Reviewers: rsmith, majnemer, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25430 llvm-svn: 283755
* Revert "P0035R4: Semantic analysis and code generation for C++17 overaligned ↵Daniel Jasper2016-10-106-391/+4
| | | | | | | | | | | | allocation." This reverts commit r283722. Breaks: Clang.SemaCUDA.device-var-init.cu Clang.CodeGenCUDA.device-var-init.cu http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/884/ llvm-svn: 283750
* [Driver] Make -print-libgcc-file-name print compiler-rt lib when usedMichal Gorny2016-10-104-1/+24
| | | | | | | | | | | | | | | | | | | | Make the -print-libgcc-file-name option print an appropriate compiler runtime library, that is libgcc.a if gcc runtime is used and an appropriate compiler-rt library if that runtime is used. The main use for this is to allow linking executables built with -nodefaultlibs (e.g. to avoid linking to the standard C++ library) to the compiler runtime library, e.g. using: clang++ ... -nodefaultlibs $(clang++ ... -print-libgcc-file-name) in which case currently a program built like this linked to the gcc runtime unconditionally. The patch fixes it to use compiler-rt libraries instead when compiler-rt is the active runtime. Differential Revision: https://reviews.llvm.org/D25338 llvm-svn: 283746
* Revert "[x86][inline-asm][clang] accept 'v' constraint"Daniel Jasper2016-10-101-30/+0
| | | | | | | | | This reverts commit r283716. Breaks buildbot: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/9155/testReport/junit/Clang/CodeGen/x86_inline_asm_v_constraint_c/ llvm-svn: 283743
* Mark aligned allocation as done.Richard Smith2016-10-101-2/+1
| | | | llvm-svn: 283724
* P0035R4: Semantic analysis and code generation for C++17 overalignedRichard Smith2016-10-106-4/+391
| | | | | | allocation. llvm-svn: 283722
* [x86][inline-asm][clang] accept 'v' constraintMichael Zuckerman2016-10-101-0/+30
| | | | | | | | | | | | | | Commit in the name of: Coby Tayree 1.'v' constraint for (x86) non-avx arch imitates the already implemented 'x' constraint, i.e. allows XMM{0-15} & YMM{0-15} depending on the apparent arch & mode (32/64). 2.for the avx512 arch it allows [X,Y,Z]MM{0-31} (mode dependent) This patch applies the needed changes to clang LLVM patch: https://reviews.llvm.org/D25005 Differential Revision: D25004 llvm-svn: 283716
* When optimizing for size, enable loop rerolling by defaultHal Finkel2016-10-091-0/+5
| | | | | | | | | | We have a loop-rerolling optimization which can be enabled by using -freroll-loops. While sometimes loops are hand-unrolled for performance reasons, when optimizing for size, we should always undo this manual optimization to produce smaller code (our optimizer's unroller will still unroll the rerolled loops if it thinks that is a good idea). llvm-svn: 283685
* [CUDA] Rename cuda_builtin_vars.h to __clang_cuda_builtin_vars.h.Justin Lebar2016-10-082-7/+7
| | | | | | | | | | | | Summary: This matches the idiom we use for our other CUDA wrapper headers. Reviewers: tra Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24978 llvm-svn: 283679
* [CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.Justin Lebar2016-10-083-0/+104
| | | | | | | | | | | | | | | | | Summary: These cause us to consider all functions in-between to be __host__ __device__. You can nest these pragmas; you just can't have more 'end's than 'begin's. Reviewers: rsmith Subscribers: tra, jhen, cfe-commits Differential Revision: https://reviews.llvm.org/D24975 llvm-svn: 283677
* [analyzer] Re-apply r283094 "Improve CloneChecker diagnostics"Artem Dergachev2016-10-0811-29/+214
| | | | | | The parent commit (r283092) was reverted before and now finally landed. llvm-svn: 283661
* [analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"Artem Dergachev2016-10-083-9/+87
| | | | | | The parent commit (r283092) was reverted before and now finally landed. llvm-svn: 283660
* [CUDA] Do a better job at detecting wrong-side calls.Justin Lebar2016-10-082-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Move CheckCUDACall from ActOnCallExpr and BuildDeclRefExpr to DiagnoseUseOfDecl. This lets us catch some edge cases we were missing, specifically around class operators. This necessitates a few other changes: - Avoid emitting duplicate deferred diags in CheckCUDACall. Previously we'd carefully placed our call to CheckCUDACall such that it would only ever run once for a particular callsite. But now this isn't the case. - Emit deferred diagnostics from a template specialization/instantiation's primary template, in addition to from the specialization/instantiation itself. DiagnoseUseOfDecl ends up putting the deferred diagnostics on the template, rather than the specialization, so we need to check both. Reviewers: rsmith Subscribers: cfe-commits, tra Differential Revision: https://reviews.llvm.org/D24573 llvm-svn: 283637
* Revert r283572 - [Driver] Make -print-libgcc-file-name print compiler-rt lib ↵Michal Gorny2016-10-071-15/+0
| | | | | | | | | | when used Revert the -print-libgcc-file-name change as the new test fails on Darwin. It needs to be updated to run the libgcc part only on systems supporting that rtlib. llvm-svn: 283586
* [Driver] Make -print-libgcc-file-name print compiler-rt lib when usedMichal Gorny2016-10-071-0/+15
| | | | | | | | | | | | | | | | | | | | Make the -print-libgcc-file-name option print an appropriate compiler runtime library, that is libgcc.a if gcc runtime is used and an appropriate compiler-rt library if that runtime is used. The main use for this is to allow linking executables built with -nodefaultlibs (e.g. to avoid linking to the standard C++ library) to the compiler runtime library, e.g. using: clang++ ... -nodefaultlibs $(clang++ ... -print-libgcc-file-name) in which case currently a program built like this linked to the gcc runtime unconditionally. The patch fixes it to use compiler-rt libraries instead when compiler-rt is the active runtime. Differential Revision: https://reviews.llvm.org/D25338 llvm-svn: 283572
* Update clang test to accomendate discriminator change in ↵Dehao Chen2016-10-072-4/+5
| | | | | | | | | | | | | | https://reviews.llvm.org/D25132 Summary: https://reviews.llvm.org/D25132 added discriminator even add -g0. This leads to test fail which is addressed in thie patch. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25133 llvm-svn: 283564
OpenPOWER on IntegriCloud