summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [Clang][AVX512][Builtin] Adding support for VBROADCAST and ↵Michael Zuckerman2016-04-1311-3/+1049
| | | | | | | | | VPBROADCASTB/W/D/Q instruction set Differential Revision: http://reviews.llvm.org/D19012 llvm-svn: 266195
* Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and ↵Alexander Kornienko2016-04-133-13/+96
| | | | | | | | | | | | | | | | CXXMethodDecl::isUserProvided. Summary: Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corresponding to CXXMethodDecl::isUserProvided. Reviewers: aaron.ballman, alexfh Subscribers: klimek, cfe-commits Patch by Michael Miller! Differential Revision: http://reviews.llvm.org/D19038 llvm-svn: 266189
* [Clang][AVX512][Builtin] Adding supporting to intrinsics of ↵Michael Zuckerman2016-04-139-0/+278
| | | | | | | | cvt{b|d|q}2mask{128|256|512} and cvtmask2{b|d|q}{128|256|512} instruction set. Differential Revision: http://reviews.llvm.org/D19009 llvm-svn: 266188
* [modules] Add OpenCLImageTypes.def to module map to fix the modules build.Alexey Bader2016-04-131-0/+1
| | | | llvm-svn: 266187
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-1352-75/+393
| | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15120 It adds support for the __float128 keyword, literals and a target feature to enable it. This support is disabled by default on all targets and any target that has support for this type is free to add it. Based on feedback that I've received from target maintainers, this appears to be the right thing for most targets. I have not heard from the maintainers of X86 which I believe supports this type. I will subsequently investigate the impact of enabling this on X86. llvm-svn: 266186
* Try to use readability-identifier-naming check on Clang.Alexander Kornienko2016-04-131-1/+12
| | | | llvm-svn: 266184
* [clang-tidy] Disable misc-unused-parameters for clang.Alexander Kornienko2016-04-131-1/+1
| | | | llvm-svn: 266182
* [OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.Alexey Bader2016-04-1332-42/+42
| | | | | | | | | | Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header". This fixes the modules build. Differential revision: http://reviews.llvm.org/D18954 Reviewers: Richard Smith, Vassil Vassilev. llvm-svn: 266180
* constexpr -> const to appease MSVC bots.Richard Smith2016-04-131-1/+1
| | | | llvm-svn: 266178
* ASTWriterDecl.cpp: Prune a couple of \param(s), corresponding to r266160. ↵NAKAMURA Takumi2016-04-131-10/+0
| | | | | | [-Wdocumentation] llvm-svn: 266177
* [modules] Add some missing blockinfo records. No functionality change except ↵Richard Smith2016-04-131-0/+12
| | | | | | to llvm-bcanalyzer output. llvm-svn: 266176
* [PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st ↵Chuang-Yu Cheng2016-04-132-54/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | intrinsics and fix incorrect testcases with minor refactoring New added data types: vector double vec_vsx_ld (int, const double *); vector float vec_vsx_ld (int, const float *); vector bool short vec_vsx_ld (int, const vector bool short *); vector bool int vec_vsx_ld (int, const vector bool int *); vector signed int vec_vsx_ld (int, const signed int *); vector unsigned int vec_vsx_ld (int, const unsigned int *); void vec_vsx_st (vector double, int, double *); void vec_vsx_st (vector float, int, float *); void vec_vsx_st (vector bool short, int, vector bool short *); void vec_vsx_st (vector bool short, int, signed short *); void vec_vsx_st (vector bool short, int, unsigned short *); void vec_vsx_st (vector bool int, int, vector bool int *); void vec_vsx_st (vector bool int, int, signed int *); void vec_vsx_st (vector bool int, int, unsigned int *); Also fix testcases which use non-vector argument version of vec_vsx_ld or vec_vsx_st, but pass incorrect parameter. llvm-svn: 266166
* [modules] Refactor handling of cases where we write an offset to a prior ↵Richard Smith2016-04-133-29/+45
| | | | | | record into the bitstream and simplify a little, in preparation for doing this in more cases. llvm-svn: 266160
* [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.Devin Coughlin2016-04-132-14/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat a _Nonnull ivar that is nil as an invariant violation in a similar fashion to how a nil _Nonnull parameter is treated as a precondition violation. This avoids warning on defensive returns of nil on defensive internal checks, such as the following common idiom: @class InternalImplementation @interface PublicClass { InternalImplementation * _Nonnull _internal; } -(id _Nonnull)foo; @end @implementation PublicClass -(id _Nonnull)foo { if (!_internal) return nil; // no-warning return [_internal foo]; } @end rdar://problem/24485171 llvm-svn: 266157
* clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.NAKAMURA Takumi2016-04-131-1/+1
| | | | llvm-svn: 266154
* [ObjC] Pop all cleanups created in EmitObjCForCollectionStmt beforeAkira Hatanaka2016-04-122-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exiting the for-in loop. This commit fixes a bug where EmitObjCForCollectionStmt didn't pop cleanups for captures. For example, in the following for-in loop, a block which captures self is passed to foo1: for (id x in [self foo1:^{ use(self); }]) { use(x); break; } Previously, the code in EmitObjCForCollectionStmt wouldn't pop the cleanup for the captured self before exiting the loop, which caused code-gen to generate an IR in which objc_release was called twice on the captured self. This commit fixes the bug by entering a RunCleanupsScope before the loop condition is evaluated and forcing its cleanup before exiting the loop. rdar://problem/16865751 Differential Revision: http://reviews.llvm.org/D18618 llvm-svn: 266147
* ObjC class properties: add diagnostics for unimplemented class properties.Manman Ren2016-04-124-45/+76
| | | | | | rdar://24711047 llvm-svn: 266146
* [AMDGPU] Add debugger related target optionsKonstantin Zhuravlyov2016-04-123-0/+53
| | | | | | Differential Revision: http://reviews.llvm.org/D18748 llvm-svn: 266133
* Add a fixme for an old patch I had lying around that I'm not going to finish ↵David Blaikie2016-04-121-0/+5
| | | | | | any time so n llvm-svn: 266127
* Always use --eh-frame-hdr on FreeBSD, even for -staticEd Maste2016-04-122-1/+2
| | | | | | | | | | | | FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to use it more widely in the future), and it requires the EH frame segment in static binaries. This is the same as r203742 for NetBSD. Differential Revision: http://reviews.llvm.org/D19029 llvm-svn: 266123
* Add a couple of missing vsx load and store intrinsics.Eric Christopher2016-04-122-0/+20
| | | | | | Patch by Jing Yu! llvm-svn: 266122
* Pass -backend-option to LLVM when there is no target machine.Yaxun Liu2016-04-122-16/+27
| | | | | | | | Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR. Differential Revision: http://reviews.llvm.org/D17552 llvm-svn: 266117
* [modules] Extend r266113 to cope with submodules.Richard Smith2016-04-122-2/+4
| | | | llvm-svn: 266116
* [modules] When an incompatible module file is explicitly provided for a module,Richard Smith2016-04-122-2/+8
| | | | | | | | and we fall back to textual inclusion, don't require the module as a whole to be marked available; it's OK if some other file in the same module is missing, just as it would be if the header were explicitly marked textual. llvm-svn: 266113
* PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ↵Yaxun Liu2016-04-125-10/+183
| | | | | | | | | | | | ternary operator. Generates addrspacecast instead of bitcast for ternary operator when necessary, and diagnose ternary operator with incompatible second and third operands. https://llvm.org/bugs/show_bug.cgi?id=19957 Differential Revision: http://reviews.llvm.org/D17412 llvm-svn: 266111
* [analyzer] Nullability: Suppress return diagnostics in inlined functions.Devin Coughlin2016-04-122-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The nullability checker can sometimes miss detecting nullability precondition violations in inlined functions because the binding for the parameter that violated the precondition becomes dead before the return: int * _Nonnull callee(int * _Nonnull p2) { if (!p2) // p2 becomes dead here, so binding removed. return 0; // warning here because value stored in p2 is symbolic. else return p2; } int *caller(int * _Nonnull p1) { return callee(p1); } The fix, which is quite blunt, is to not warn about null returns in inlined methods/functions. This won’t lose much coverage for ObjC because the analyzer always analyzes each ObjC method at the top level in addition to inlined. It *will* lose coverage for C — but there aren’t that many codebases with C nullability annotations. rdar://problem/25615050 llvm-svn: 266109
* clang-cl: Remove -isystem, add -imsvc.Nico Weber2016-04-125-6/+14
| | | | | | | | | | | | | | | | | r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of the system include search path. The idea was to use this to point to a hermetic msvc install, but as it turns out this doesn't work: -isystem then adds the hermetic headers in front of clang's builtin headers, and clang's headers that are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all anymore. So revert that, and instead expose -imsvc which works as if the passed directory was part of %INCLUDE%: The header is treated as a system header, but it is searched after clang's lib/Header headers. Fixes half of PRPR26751. llvm-svn: 266108
* [OpenCL] Handle AddressSpaceConversion when target address space does not ↵Yaxun Liu2016-04-122-1/+22
| | | | | | | | | | | | | change. In codegen different address spaces may be mapped to the same address space for a target, e.g. in x86/x86-64 all address spaces are mapped to 0. Therefore AddressSpaceConversion should be translated by CreatePointerBitCastOrAddrSpaceCast instead of CreateAddrSpaceCast. Differential Revision: http://reviews.llvm.org/D18713 llvm-svn: 266107
* Stricter checks in the stack-protector codegen test.Evgeniy Stepanov2016-04-121-2/+2
| | | | llvm-svn: 266095
* Revert 266090, needs more testing first.Nico Weber2016-04-122-2/+1
| | | | llvm-svn: 266091
* clang-cl: Expose -nostdlibinc.Nico Weber2016-04-122-1/+2
| | | | llvm-svn: 266090
* [FileManager] Don't crash if reading from stdin and stat(".") failsDavid Majnemer2016-04-121-1/+1
| | | | | | | | | | | | | addAncestorsAsVirtualDirs("<stdin>") quickly returns without doing work because "<stdin>" has no parent_path. This violates the expectation that a subsequent call to getDirectoryFromFile("<stdin>") would succeed. Instead, it fails because it uses the "." if the file has no path component. Fix this by keeping the behavior between addAncestorsAsVirtualDirs and getDirectoryFromFile symmetric. llvm-svn: 266089
* Verify commit right by adding a blank line to ↵Yaxun Liu2016-04-121-0/+1
| | | | | | test/CodeGenOpenCL/address-spaces-conversions.cl. llvm-svn: 266083
* Moving clang-test-depends into the Clang tests folder and moving ↵Aaron Ballman2016-04-122-0/+2
| | | | | | vtables_blacklist into the Misc folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE. llvm-svn: 266079
* Remove unused diagnostics. NFC.Benjamin Kramer2016-04-122-5/+0
| | | | llvm-svn: 266057
* [OPENMP 4.0] Support for 'linear' clause in 'declare simd' directive.Alexey Bataev2016-04-1210-95/+358
| | | | | | | | | | The linear clause declares one or more list items to be private to a SIMD lane and to have a linear relationship with respect to the iteration space of a loop. 'linear' '(' <linear-list> [ ':' <linear-step> ] ')' When a linear-step expression is specified in a linear clause it must be either a constant integer expression or an integer-typed parameter that is specified in a uniform clause on the directive. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266056
* [OPENMP 4.0] Support for 'aligned' clause in 'declare simd' directive.Alexey Bataev2016-04-129-112/+266
| | | | | | | | | The aligned clause declares that the object to which each list item points is aligned to the number of bytes expressed in the optional parameter of the aligned clause. 'aligned' '(' <argument-list> [ ':' <alignment> ] ')' The optional parameter of the aligned clause, alignment, must be a constant positive integer expression. If no optional parameter is specified, implementation-defined default alignments for SIMD instructions on the target platforms are assumed. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266052
* [Clang][BuiltIn][avx512] Adding avx512 (shuf,sqrt{ss|sd},rsqrt ) builtin to ↵Michael Zuckerman2016-04-125-0/+954
| | | | | | clang llvm-svn: 266048
* [ASTMatchers]: fix crash in hasReturnValueMatthias Gehre2016-04-122-2/+5
| | | | | | | | | | | | | | | Summary: The crash was reproduced by the included test case. It was initially found through a crash of clang-tidy's misc-misplaced-widening-cast check. Reviewers: klimek, alexfh Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D18991 llvm-svn: 266043
* [OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.Alexey Bataev2016-04-1215-161/+282
| | | | | | | | | OpenMP 4.0 defines clause 'uniform' in 'declare simd' directive: 'uniform' '(' <argument-list> ')' The uniform clause declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop. The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses. llvm-svn: 266041
* Basic: fix profiling with GNU EABISaleem Abdulrasool2016-04-122-11/+25
| | | | | | | | | The GNU profiling support indicates that the interface is `_mcount` rather than `mcount`. Conditionalise the behaviour according to the `-meabi gnu` flag. Resolves PR27311 llvm-svn: 266039
* [analyzer] Fix assertion in ReturnVisitor for body-farm synthesized gettersDevin Coughlin2016-04-122-0/+16
| | | | | | | Don't emit a path note marking the return site if the return statement does not have a valid location. This fixes an assertion failure I introduced in r265839. llvm-svn: 266031
* Allow simultaneous safestack and stackprotector attributes.Evgeniy Stepanov2016-04-113-33/+36
| | | | | | | | | This is the clang part of http://reviews.llvm.org/D18846. SafeStack instrumentation pass adds stack protector canaries if both attributes are present on a function. StackProtector pass will step back if the function has a safestack attribute. llvm-svn: 266005
* libclang: fix two memory leaks (PR26292)Hans Wennborg2016-04-111-2/+3
| | | | llvm-svn: 265994
* Adjust tests to have consistent integer sizes.Richard Trieu2016-04-112-4/+14
| | | | | | | Add a triple to the run lines so that integers will the same sizes across runs. Also add a compile time check to ensure the assumptions about sizes are met. llvm-svn: 265991
* Lit C++11 Compatibility Patch #6Charles Li2016-04-1117-119/+510
| | | | | | | Updated the expected diagnostics of 17 OpenMP tests. The changes to each test are identical. llvm-svn: 265982
* Emit the module hash by default with -flto=thin.Mehdi Amini2016-04-111-1/+2
| | | | | | | | | | | Reviewers: tejohnson Subscribers: joker.eph, cfe-commits Differential Revision: http://reviews.llvm.org/D18947 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265977
* [Clang][AVX512][BuiltIn] Adding avx512 ( ↵Michael Zuckerman2016-04-115-1/+828
| | | | | | | | psll{d|q}512,psllv{16si|8di},psra{d|q}512,psrav{16si|8di},pternlog{d|q}{128|256|512} ) builtin to clang Differential Revision: http://reviews.llvm.org/D18926 llvm-svn: 265964
* Update getting started docsReid Kleckner2016-04-111-6/+6
| | | | | | | | | | | | compiler-rt is optional. We often get email from users with compiler-rt build errors who don't actually need compiler-rt. Marking it optional should help them avoid those potential problems. While I'm here, update a reference to the build directory and remove an obsolete reference to llvm-gcc. Nobody today is under the impression that Clang depends on GCC. llvm-svn: 265963
* [CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtinMichael Zuckerman2016-04-115-0/+375
| | | | | | Differential Revision: http://reviews.llvm.org/D17693 llvm-svn: 265952
OpenPOWER on IntegriCloud