summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [CLANG] [AVX512] [BUILTIN] Adding PSLL{V|W|Wi}{128|256|512} builtinMichael Zuckerman2016-02-287-1/+496
| | | | | | Differential Revision: http://reviews.llvm.org/D17685 llvm-svn: 262177
* Workaround doxygen bug https://bugzilla.gnome.org/show_bug.cgi?id=506243Alexander Kornienko2016-02-272-2/+2
| | | | llvm-svn: 262138
* Correcting indentation for an RST code block.Aaron Ballman2016-02-271-3/+4
| | | | llvm-svn: 262136
* AMDGPU: Add builtins for recently added intrinsicsMatt Arsenault2016-02-273-0/+41
| | | | llvm-svn: 262126
* AMDGPU: Fix broken/confusing predefined macroMatt Arsenault2016-02-272-1/+19
| | | | | | amdgcn should not be defining __R600__ llvm-svn: 262124
* AMDGPU: Fix inconsistent register name for flat_scratchMatt Arsenault2016-02-272-2/+17
| | | | llvm-svn: 262123
* Add __builtin_canonicalizeMatt Arsenault2016-02-274-0/+35
| | | | llvm-svn: 262122
* Fix bug in using shadow decl checking: a using shadow decl should not conflictRichard Smith2016-02-272-0/+29
| | | | | | | | | | | | | | | with a prior UsingDecl -- those should not even really be found by the lookup here, except that we use the same lookup results for two different checks, and the other check needs them. This happens to work in *almost all* cases, because either the lookup results list the UsingDecl first (and the NonTag result gets replaced by something else) or because the problematic declaration is a function (which causes us to use different logic to detect conflicts). This can also be triggered from a state only reachable through modules (where the name lookup results can contain multiple UsingDecls in the same scope). llvm-svn: 262105
* [OpenMP] Fix parsing of delete map clause modifier in C++ mode.Samuel Antao2016-02-274-8/+34
| | | | | | | | | | | | Summary: The map modifier 'delete' is parser in c++ mode as a delete keyword, which requires special handling in the map clause parsing. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17629 llvm-svn: 262094
* [CMake] Only configure Native target in stage 1, configure all in other stagesChris Bieneman2016-02-262-1/+2
| | | | | | This patch causes the 3-stage build pipeline to only build a host compiler in the first stage, and to build all targets for subsequent stages. The host target is determined via the Native target specifier added in r262070. llvm-svn: 262071
* [CMake] Add BINUTILS_INCDIR to the default passthrough list for multi-stage ↵Chris Bieneman2016-02-261-0/+1
| | | | | | | | | | | | builds This is needed to build the gold plugin in multi-stage builds. Patch by Mike Edwards Differential Revision: http://reviews.llvm.org/D17655 llvm-svn: 262065
* [dllexport] Sort out emission order of delayed exported classesReid Kleckner2016-02-266-0/+47
| | | | | | | | | | | | | | | | Relands r260194 with a fix. If we have a template that transitions from an extern template to an explicitly instantiated dllexport template, we would add that class to the delayed exported class list without flushing it. For explicit instantiations, we can just flush the list of delayed classes immediately. We don't have to worry about the bug fixed in r260194 in this case because explicit instantiations can only occur at file and namespace scope. Fixes PR26490. llvm-svn: 262056
* Fix Clang tests that used CHECK-NEXT-NOT and CHECK-DAG-NOT.Paul Robinson2016-02-265-20/+20
| | | | | | | | FileCheck actually doesn't support combo suffixes. Differential Revision: http://reviews.llvm.org/D17589 llvm-svn: 262052
* SemaCXX: Support templates in availability attributesDuncan P. N. Exon Smith2016-02-263-1/+65
| | | | | | | | | | | | | | | | | | | If the availability context is `FunctionTemplateDecl`, we should look through it to the `FunctionDecl`. This prevents a diagnostic in the following case: class C __attribute__((unavailable)); template <class T> void foo(C&) __attribute__((unavailable)); This adds tests for availability in templates in many other cases, but that was the only case that failed before this patch. I added a feature `__has_feature(attribute_availability_in_templates)` so users can test for this. rdar://problem/24561029 llvm-svn: 262050
* Minor tweak to match the overall style.Sunil Srivastava2016-02-261-2/+2
| | | | llvm-svn: 262042
* Basic: fix __USER_LABEL_PREFIX__ on CygwinSaleem Abdulrasool2016-02-262-0/+8
| | | | | | | | Adjust the user label prefix for cygwin x86_64. Resolves PR26744. llvm-svn: 262030
* Reduce false positives in printf/scanf format checkerAndy Gibbs2016-02-263-36/+176
| | | | | | | | | | | | | | | Summary: The printf/scanf format checker is a little over-zealous in handling the conditional operator. This patch reduces work by not checking code-paths that are never used and reduces false positives regarding uncovered arguments, for example in the code fragment: printf(minimal ? "%i\n" : "%i: %s\n", code, msg); Reviewers: rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15636 llvm-svn: 262025
* Fixing an issue with the code block so that it does not appear as a list.Aaron Ballman2016-02-261-9/+5
| | | | llvm-svn: 262013
* Giving this attribute documentation group a heading; fixes a documentation ↵Aaron Ballman2016-02-261-3/+7
| | | | | | generation error. llvm-svn: 262012
* Test commit.Vassil Vassilev2016-02-261-5/+5
| | | | llvm-svn: 261999
* [Driver] Disable frame pointer elimination by default if target isAkira Hatanaka2016-02-262-0/+4
| | | | | | | | x86_64-pc-win32-macho. rdar://problem/24470634 llvm-svn: 261976
* [MSVC Compat] Don't evaluate member base expressions w/o side effectsDavid Majnemer2016-02-262-3/+31
| | | | | | | | | | | | A member expression's base doesn't always have an impact on what the member decl would evaluate to. In such a case, the base is used as a poor man's scope qualifier. This fixes PR26738. Differential Revision: http://reviews.llvm.org/D17619 llvm-svn: 261975
* [analyzer] Prune some incorrect \param doc comment annotations.Devin Coughlin2016-02-262-15/+15
| | | | llvm-svn: 261970
* Checkers/CheckObjCDealloc.cpp: Prune "\param". [-Wdocumentation]NAKAMURA Takumi2016-02-261-1/+1
| | | | llvm-svn: 261963
* OpenMPClause.h: Fix typo in \param. [-Wdocumentation]NAKAMURA Takumi2016-02-261-1/+1
| | | | llvm-svn: 261962
* [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttrXiuli Pan2016-02-2612-24/+117
| | | | | | | | | | | | | | | Summary: OpenCL access qualifiers are now not only used for image types, refine it to avoid misleading, Add semacheck for OpenCL access qualifier as well as test caees. Reviewers: pekka.jaaskelainen, Anastasia, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D16040 llvm-svn: 261961
* Make vtables_blacklist dependency conditional on existence of clang target.Peter Collingbourne2016-02-261-1/+3
| | | | llvm-svn: 261960
* [analyzer] Shorten ObjcSuperDeallocChecker diagnostics.Devin Coughlin2016-02-262-24/+37
| | | | | | | | | Change "use of 'self' after it has been freed with call to [super dealloc]" to "use of 'self' after it has been deallocated" and "use of instance variable '_ivar' after the instance has been freed with call to [super dealloc]" to "use of instance variable '_ivar' after 'self' has been deallocated". llvm-svn: 261945
* [analyzer] Fix a memory error in r261935 caught by the Windows bots.Devin Coughlin2016-02-261-2/+2
| | | | | | It was using a temporary StringRef after its underlying storage was freed. llvm-svn: 261944
* [analyzer] Warn on use of 'self' after call to to [super dealloc].Devin Coughlin2016-02-252-43/+200
| | | | | | | | | | | | Referring to 'self' after a call to [super dealloc] is a use-after-free in Objective-C because NSObject's -dealloc frees the memory pointed to by self. This patch extends the ObjCSuperDeallocChecker to catch this error. rdar://problem/6953275 Differential Revision: http://reviews.llvm.org/D17528 llvm-svn: 261935
* [analyzer] Reapply r261917 with a fix.Devin Coughlin2016-02-255-214/+1286
| | | | | | | | This reapplies "[analyzer] Make ObjCDeallocChecker path sensitive." (r261917) with a fix for an error on some bots about specializing a template from another namespace. llvm-svn: 261929
* Revert "[analyzer] Make ObjCDeallocChecker path sensitive."Devin Coughlin2016-02-255-1282/+214
| | | | | | This reverts commit r261917. It broke the bots. llvm-svn: 261921
* [analyzer] Make ObjCDeallocChecker path sensitive.Devin Coughlin2016-02-255-214/+1282
| | | | | | | | | | | | | | Convert the ObjCDeallocChecker to be path sensitive. The primary motivation for this change is to prevent false positives when -dealloc calls helper invalidation methods to release instance variables, but it additionally improves precision when -dealloc contains control flow. It also reduces the need for pattern matching. The check for missing -dealloc methods remains AST-based. Part of rdar://problem/6927496 Differential Revision: http://reviews.llvm.org/D17511 llvm-svn: 261917
* [CMake] Fixing install-clang-headers dependencies to depend on generating ↵Chris Bieneman2016-02-251-1/+1
| | | | | | the headers. llvm-svn: 261911
* Add FieldNames to __NSConstantString_tagBen Langmuir2016-02-251-1/+7
| | | | | | | | Since consumers of the AST may expect fields to be named. Patch by Brad King! llvm-svn: 261887
* Replace a compiler-specific approach to determining the presence of a ↵Aaron Ballman2016-02-251-25/+14
| | | | | | getDecl() member function with one that does not require compiler-specific workarounds; NFC. llvm-svn: 261872
* [Sema] Remove assert in TreeTransform<Derived>::TransformObjCObjectType.Akira Hatanaka2016-02-252-1/+9
| | | | | | | | | | | | | The assert isn't correct since TypeLoc::ObjCObjectTypeLoc doesn't indicate whether the type is a dependent type. The function returns false for a type like "<SomeProtocol>" which is a synonym for "id<SomeProtocol>". rdar://problem/23838912 Differential Revision: http://reviews.llvm.org/D17355 llvm-svn: 261829
* [OPENMP 4.5] Codegen for member decls in 'lastprivate' clause.Alexey Bataev2016-02-2511-45/+419
| | | | | | | | | OpenMP 4.5 allows to privatize non-static member decls in non-static member functions. Patch captures such decls by reference in general (for bitfields, by value) and then operates with this capture. For bitfields, at the end of codegen for lastprivates original bitfield is updated with the value of captured copy. llvm-svn: 261824
* Twek fix for PR24473 (r261506) - Preserve the template arguments as writtenFaisal Vali2016-02-251-1/+4
| | | | | | | | | | | | (within the DeclRefExpr Node) when creating AST nodes that reference specializations of static data member templates. While we pass the template args through for all non-instance members, they should only be relevant (i.e. non-null) for variable template ids (assertion added for that assumption) Also preserve the FoundDecl that refers to the canonical Decl (the primary VarTemplateDecl for a variable template specialization) that we are referencing in our DeclRefExpr. Not sure why this was not being done for non-variable template-ids. No functionality change - so no tests added. Thanks to Richard Smith for drawing my attention to this! llvm-svn: 261823
* [OPENMP 4.5] Support fielddecls in 'shared' clause.Alexey Bataev2016-02-252-42/+47
| | | | | | | | OpenMP 4.5 allows to use non-static data members of current class in non-static member functions in different kind of clauses. Patch adds support for data members in 'shared' clause. llvm-svn: 261820
* [OpenCL] Add Sema checks for typesXiuli Pan2016-02-257-4/+46
| | | | | | | | | | | | | | Summary: Add Sema checks for opencl type: image, pipe.... This patch is partitioned from http://reviews.llvm.org/D16047 Reviewers: Anastasia, yaxunl Subscribers: pekka.jaaskelainen, cfe-commits Differential Revision: http://reviews.llvm.org/D17437 llvm-svn: 261818
* Fix assertion failure on MaybeODRUseExprs.Manman Ren2016-02-242-0/+12
| | | | | | | | | | | | | | | | | | In VisitNonTypeTemplateParamDecl, before SubstExpr with the default argument, we should create a ConstantEvaluated ExpressionEvaluationContext. Without this, it is possible to use a PotentiallyEvaluated ExpressionEvaluationContext; and MaybeODRUseExprs will not be cleared when popping the context, causing assertion failure. This is similar to how we handle the context before SubstExpr with the default argument, in SubstDefaultTemplateArgument. Part of PR13986. rdar://24480205 Differential Revision: http://reviews.llvm.org/D17576 llvm-svn: 261803
* Minor cleanup of Sema::CheckEnableIf. NFC.George Burgess IV2016-02-241-23/+16
| | | | llvm-svn: 261798
* Revert "Don't convert a char to a const char *"David Majnemer2016-02-241-1/+1
| | | | | | | | This reverts commit r261780. It turns out the original code was just fine. An overload for ltrim which takes char was added but the Doxygen docs haven't seemed to pick it up. llvm-svn: 261784
* Fix build by using hasFlag instead of hasArg.Peter Collingbourne2016-02-241-2/+2
| | | | llvm-svn: 261782
* PR26237: Fix iterator invalidation bug that occurs if serializingRichard Smith2016-02-241-11/+11
| | | | | | | | | | | | specializations of a template manages to trigger deserialization of more specializations of the same template. No test case provided: this is hard to reliably test due to standard library differences. Patch by Vassil Vassilev! llvm-svn: 261781
* Don't convert a char to a const char *David Majnemer2016-02-241-1/+1
| | | | | | This fixes PR26728. llvm-svn: 261780
* [CUDA] Mark all CUDA device-side function defs, decls, and calls as convergent.Justin Lebar2016-02-243-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is important for e.g. the following case: void sync() { __syncthreads(); } void foo() { do_something(); sync(); do_something_else(): } Without this change, if the optimizer does not inline sync() (which it won't because __syncthreads is also marked as noduplicate, for now anyway), it is free to perform optimizations on sync() that it would not be able to perform on __syncthreads(), because sync() is not marked as convergent. Similarly, we need a notion of convergent calls, since in the case when we can't statically determine a call's target(s), we need to know whether it's safe to perform optimizations around the call. This change is conservative; the optimizer will remove these attrs where it can, see r260318, r260319. Reviewers: majnemer Subscribers: cfe-commits, jhen, echristo, tra Differential Revision: http://reviews.llvm.org/D17056 llvm-svn: 261779
* [CUDA] do not allow attribute-based overloading for __global__ functions.Artem Belevich2016-02-242-1/+14
| | | | | | | | __global__ functions are present on both host and device side, so providing __host__ or __device__ overloads is not going to do anything useful. llvm-svn: 261778
* [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and ↵Justin Lebar2016-02-242-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | blockDim to uint3 and dim3. Summary: This lets you write, e.g. uint3 a = threadIdx; uint3 b = blockIdx; dim3 c = gridDim; dim3 d = blockDim; which is legal in nvcc, but was not legal in clang. The fact that e.g. the type of threadIdx is not actually uint3 is still observable, but now you have to try to observe it. Reviewers: tra Subscribers: echristo, cfe-commits Differential Revision: http://reviews.llvm.org/D17561 llvm-svn: 261777
OpenPOWER on IntegriCloud