summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENCL] Fix wrongly vla error for OpenCL array.Xiuli Pan2016-06-072-2/+6
| | | | | | | | | | | | | | | | | Summary: OpenCL should support array with const value size length, those const varibale in global and constant address space and variable in constant address space. Fixed test case error. Reviewers: Anastasia, yaxunl, bader Subscribers: bader, cfe-commits Differential Revision: http://reviews.llvm.org/D20090 llvm-svn: 271978
* [analyzer] Reapply r271907 (2nd try).Devin Coughlin2016-06-079-0/+1040
| | | | | | | | | | | | | | Second try at reapplying "[analyzer] Add checker for correct usage of MPI API in C and C++." Special thanks to Dan Liew for helping test the fix for the template specialization compiler error with gcc. The original patch is by Alexander Droste! Differential Revision: http://reviews.llvm.org/D12761 llvm-svn: 271977
* Revert [Coverage] Fix an assertion failure if the definition of an unused ↵Igor Kudrin2016-06-071-31/+11
| | | | | | | | function spans multiple files. r271969 The test case fails on Windows. llvm-svn: 271976
* Revert "[OPENCL] Fix wrongly vla error for OpenCL array."Xiuli Pan2016-06-072-6/+2
| | | | | | | | Test case break on system-z. This reverts commit 9a7212e1e87f1396952d74f8c62314a775ccbb1c. llvm-svn: 271975
* [OPENCL] Fix wrongly vla error for OpenCL array.Xiuli Pan2016-06-072-2/+6
| | | | | | | | | | | | | Summary: OpenCL should support array with const value size length, those const varibale in global and constant address space and variable in constant address space. Reviewers: Anastasia, yaxunl, bader Subscribers: bader, cfe-commits Differential Revision: http://reviews.llvm.org/D20090 llvm-svn: 271971
* [Coverage] Fix an assertion failure if the definition of an unused function ↵Igor Kudrin2016-06-071-11/+31
| | | | | | | | | | | | | spans multiple files. We have an assertion failure if, for example, the definition of an unused inline function starts in one macro and ends in another. This patch fixes the issue by finding the common ancestor of the start and end locations of that function's body and changing the locations accordingly. Differential Revision: http://reviews.llvm.org/D20997 llvm-svn: 271969
* [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.Artem Belevich2016-06-061-14/+27
| | | | | | | | Fixes clang crash reported in PR27778. Differential Revision: http://reviews.llvm.org/D20985 llvm-svn: 271951
* Adding an AST matcher to ignore parenthesis in *types* (rather than ↵Aaron Ballman2016-06-061-0/+1
| | | | | | expressions). This is required for traversing certain types (like function pointer types). llvm-svn: 271927
* Revert "Reapply "[analyzer] Add checker for correct usage of MPI API in C ↵Devin Coughlin2016-06-069-1040/+0
| | | | | | | | and C++."" This reverts commit r271914. It is still breaking bots. llvm-svn: 271920
* Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++."Devin Coughlin2016-06-069-0/+1040
| | | | | | | | | Reapply r271907 with a fix for the compiler error with gcc about specializing clang::ento::ProgramStateTrait in a different namespace. Differential Revision: http://reviews.llvm.org/D12761 llvm-svn: 271914
* Revert "[analyzer] Add checker for correct usage of MPI API in C and C++."Devin Coughlin2016-06-069-1038/+0
| | | | | | | This reverts commit r271907. It broke a bunch of bots with compile errors about specializations in different namespaces. llvm-svn: 271909
* [analyzer] Add checker for correct usage of MPI API in C and C++.Devin Coughlin2016-06-069-0/+1038
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds a static analysis checker to check for the correct usage of the MPI API in C and C++. 3 path-sensitive checks are included: - Double nonblocking: Double request usage by nonblocking calls without intermediate wait. - Missing wait: Nonblocking call without matching wait. - Unmatched wait: Waiting for a request that was never used by a nonblocking call. Examples of how to use the checker can be found at https://github.com/0ax1/MPI-Checker Reviewers: zaks.anna A patch by Alexander Droste! Differential Revision: http://reviews.llvm.org/D12761 llvm-svn: 271907
* [mips] The default ABI depends on the CPU not the Arch on MTI and IMG vendor ↵Daniel Sanders2016-06-061-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | triples. Summary: 32-bit CPU's default to O32. 64-bit CPU's default to N64. The default CPU (mips32r2/mips64r2) still depends on the arch so there's no functional change when the CPU isn't specified but commands like: clang -target mips-mti-linux-gnu -mips64r2 will now default to a 64-bit ABI like our gcc toolchains do* instead of asserting in the backend**. Other vendors (including Triple::UnknownVendor) still derive the default ABI from the arch. * Although not the same one as our gcc toolchains, clang has historically defaulted to N64 where gcc defaults to N32. ** Mixing O32 and a 64-bit CPU causing assertions is a long-standing bug. Reviewers: atanasyan Subscribers: sdardis, cfe-commits Differential Revision: http://reviews.llvm.org/D21016 llvm-svn: 271884
* [clang-format] make header guard identification stricter (with Lexer).Eric Liu2016-06-061-23/+51
| | | | | | | | | | | | Summary: make header guard identification stricter with Lexer. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20959 llvm-svn: 271883
* [mips] The P5600 does not support N32/N64 since it's a 32-bit CPU.Daniel Sanders2016-06-061-1/+1
| | | | | | | | | | | | Summary: Reviewers: atanasyan Subscribers: cfe-commits, sdardis Differential Revision: http://reviews.llvm.org/D20963 llvm-svn: 271877
* [mips] Replace almost all Arch checks in MipsTargetInfo with ABI checks. NFC.Daniel Sanders2016-06-061-51/+65
| | | | | | | | | | | | | | Summary: setABI() is still tied to the Arch component of the Triple to preserve existing behaviour. Reviewers: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20961 llvm-svn: 271875
* [AVX512] Convert masked palignr builtins directly to native IR similar to ↵Craig Topper2016-06-061-5/+23
| | | | | | the other palignr builtins, but with a select to handle masking. llvm-svn: 271873
* Fixing problem with rsqrt28_sdMichael Zuckerman2016-06-051-1/+1
| | | | | | maskz_rsqrt28_sd mapped to mask_rsqrt28_sd and not to the maskz. llvm-svn: 271836
* [Clang][AVX512]Adding set4 intrinsicsMichael Zuckerman2016-06-051-0/+43
| | | | | | Differential Revision: http://reviews.llvm.org/D20866 llvm-svn: 271835
* [Clang][AVX512][Intrinsics] Adding two definitions _mm512_setzero and ↵Michael Zuckerman2016-06-051-0/+5
| | | | | | | | _mm512_setzero_epi32 Differential Revision: http://reviews.llvm.org/D20871 llvm-svn: 271832
* Add PIE magic for NetBSD. Add tests for the correct flags forJoerg Sonnenberger2016-06-041-9/+10
| | | | | | non-shared, PIE and shared output mode. llvm-svn: 271801
* [X86] Use unsigned types for vector arithmetic in intrinsics to avoid ↵Craig Topper2016-06-049-76/+88
| | | | | | | | undefined behavior for signed integer overflow. This is really only needed for addition, subtraction, and multiplication, but I did the bitwise ops too for overall consistency. Clang currently doesn't set NSW for signed vector operations so the undefined behavior shouldn't happen today. llvm-svn: 271778
* [AVX512] Remove space in -1 constants. NFCCraig Topper2016-06-045-16/+16
| | | | llvm-svn: 271777
* Sema: do not attempt to sizeof a dependent typeSaleem Abdulrasool2016-06-041-0/+5
| | | | | | | | | We would attempt to evaluate the sizeof a dependent type to check for an integral overflow. However, because the dependent type is not yet resolved, we cannot determine if the expression would overflow. Report a failure to perform a symbolic evaluation of a constant involving the dependent type. llvm-svn: 271762
* Revert commit r271708Taewook Oh2016-06-044-90/+10
| | | | llvm-svn: 271761
* [Modules] Improve diagnostics for LockFileManager errorsBruno Cardoso Lopes2016-06-041-1/+1
| | | | | | | | Uses error message now provided by LockFileManager in LLVM r271755. rdar://problem/26529101 llvm-svn: 271758
* PR27989: only enqueue binary operators into the data recursive int expressionRichard Smith2016-06-041-1/+3
| | | | | | evaluator if they are actually int expressions. llvm-svn: 271754
* CodeGen: correct assertionSaleem Abdulrasool2016-06-031-2/+3
| | | | | | | The assertion added earlier was overly strict. We need to strip the pointer casts (as when constructing the GV). Correct the types (Function or Variable). llvm-svn: 271750
* Use the name of the file on disk to issue a new diagnostic about ↵Taewook Oh2016-06-034-10/+90
| | | | | | | | | | | non-portable #include and #import paths. Differential Revision: http://reviews.llvm.org/D19843 Corresponding LLVM change: http://reviews.llvm.org/D19842 Patch by Eric Niebler llvm-svn: 271708
* Don't pass --build-id to ld by default.Rafael Espindola2016-06-031-4/+3
| | | | | | | | | | | | We now have a cmake option to change the default: ENABLE_LINKER_BUILD_ID. The reason is that build-id is fairly expensive, so we shouldn't impose it in the regular edit/build cycle. This is similar to gcc, that has an off by default --enable-linker-build-id option. llvm-svn: 271692
* RAS extensions are part of ARMv8.2.Sjoerd Meijer2016-06-031-0/+2
| | | | | | | | | | This patch enables +ras +noras to AArch64 in clang. Patch by: Roger Ferrer Ibanez and Oliver Stannard Differential Revision: http://reviews.llvm.org/D20283 llvm-svn: 271672
* [clang-format] skip empty lines and comments in the top of the code when ↵Eric Liu2016-06-031-8/+23
| | | | | | | | | | | | | | | | | inserting new headers. Summary: [clang-format] skip empty lines and comments in the top of the code when inserting new headers. Pair-programmed with @hokein Reviewers: djasper Subscribers: ioeric, cfe-commits, hokein, klimek Differential Revision: http://reviews.llvm.org/D20898 llvm-svn: 271664
* [mips] Slightly simplify MipsTargetInfo::setDataLayout(). NFC.Daniel Sanders2016-06-031-19/+15
| | | | | | | | | | | | Summary: Reviewers: atanasyan Subscribers: atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D20680 llvm-svn: 271647
* clangFrontend: Make intrinsics_gen optional for standalone build.NAKAMURA Takumi2016-06-021-1/+6
| | | | | FIXME: intrinsics_gen may be exported from llvm. llvm-svn: 271579
* This adds target support and tests for Cortex-A73Sjoerd Meijer2016-06-022-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D20864 llvm-svn: 271507
* [X86][AVX512] add intrinsics of Scalar FP to integerAsaf Badouh2016-06-021-0/+45
| | | | | | Differential Revision: http://reviews.llvm.org/D20861 llvm-svn: 271499
* [Clang][AVX512][INTRINSICS] adding round cvt and fix regular cvtps_phMichael Zuckerman2016-06-021-4/+36
| | | | | | Differential Revision: http://reviews.llvm.org/D20870 llvm-svn: 271498
* [asan] Added -fsanitize-address-use-after-scope flagVitaly Buka2016-06-024-18/+45
| | | | | | | | | | | | | | | | Summary: Also emit lifetime markers for -fsanitize-address-use-after-scope. Asan uses life-time markers for use-after-scope check. PR27453 Reviewers: kcc, eugenis, aizatsky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20759 llvm-svn: 271451
* FixIt: use getLocForEndOfToken to insert fix-it after a type name.Manman Ren2016-06-022-2/+2
| | | | | | | | | | | | | | | | Instead of setting DeclSpec's range end to point to the next token after the DeclSpec, we use getLocForEndOfToken to insert fix-it after a type name. Before this fix, fix-it will change ^(NSView view) to ^(*NSView view) This commit correctly updates the source to ^(NSView* view). rdar://21042144 Differential Revision: http://reviews.llvm.org/D20844 llvm-svn: 271448
* [X86][SSE] Replace (V)CVTTPS2DQ and VCVTTPD2DQ truncating (round to zero) ↵Simon Pilgrim2016-06-012-3/+3
| | | | | | | | | | | | f32/f64 to i32 with generic IR (clang) The 'cvtt' truncation (round to zero) conversions can be safely represented as generic __builtin_convertvector (fptosi) calls instead of x86 intrinsics. We already do this (implicitly) for the scalar equivalents. Note: I looked at updating _mm_cvttpd_epi32 as well but this still requires a lot more backend work to correctly lower (both for debug and optimized builds). Differential Revision: http://reviews.llvm.org/D20859 llvm-svn: 271436
* [Sema] Fix incorrect enum token namespaceEtienne Bergeron2016-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fix the scoping of enum literal. They were not resolving to the right type. It was not causing any problem as one is a copy of the other one. The literal in the switch are resolving to Sema.h:5527 ``` enum AccessResult { AR_accessible, AR_inaccessible, AR_dependent, AR_delayed }; ``` Instead of SemaAccess.cpp:27 ``` /// A copy of Sema's enum without AR_delayed. enum AccessResult { AR_accessible, AR_inaccessible, AR_dependent }; ``` This issue was found by a new clang-tidy check (still on-going). Reviewers: rsmith, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20773 llvm-svn: 271431
* [driver][arm] add armv7 and thumb include and lib pathsChih-Hung Hsieh2016-06-011-1/+51
| | | | | | | | | | | Add a new test android-ndk-standalone.cpp with new Android NDK release tree structure. Detect armv7 sub architecture and thumb mode, to add system include and link search paths. Differential Revision: http://reviews.llvm.org/D20600 llvm-svn: 271427
* ObjC lifetime: pull sugar off when the qualifiers conflict.Manman Ren2016-06-011-4/+6
| | | | | | | | | | | | It's possible to have multiple local ObjCLifetime qualifiers. When there is a conflict, we can't stop after we reach a type that is directly qualified. We need to keep pulling sugar off and removing the ObjCLifetime qualifers. rdar://25804796 Differential Revision: http://reviews.llvm.org/D20843 llvm-svn: 271409
* clang-format: [JS] no ASI on `import {x as\n y}`.Martin Probst2016-06-012-6/+6
| | | | | | | | | | | | Summary: ASI did not handle the ES6 `as` operator correctly. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20817 llvm-svn: 271401
* clang-format: [JS] Sort imported symbols.Martin Probst2016-06-012-24/+60
| | | | | | | | | | | | Summary: E.g. sort `import {b, a} from 'x';` into `import {a, b} from 'x';`. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20798 llvm-svn: 271400
* It seems we need to add SemaExpr.cpp to the /bigobj list; I am getting ↵Aaron Ballman2016-06-011-0/+4
| | | | | | consistent failures of hitting the section count limit. llvm-svn: 271399
* [Clang][Intrinsics][avx512] Continue Adding round cvt to clangMichael Zuckerman2016-06-011-1/+65
| | | | | | | And remove trailing spaces in intrinsic f test Differential Revision: http://reviews.llvm.org/D20810 llvm-svn: 271398
* Adding front-end support to several intrinsics (bit scanning, conversion and ↵Michael Zuckerman2016-06-013-0/+34
| | | | | | | | | | | | | | | | | | | state reading intrinsics) Adding LLVM front-end support to two intrinsics dealing with bit scan: _bit_scan_forward and _bit_scan_reverse. Their functionality is as described in Intel intrinsics guide: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_forward&expand=371,370 https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_reverse&expand=371,370 Furthermore, adding clang front-end support to these conversion intrinsics: _mm256_cvtsd_f64, _mm256_cvtsi256_si32 and _mm256_cvtss_f32. Finally, adding tests to all of the above, as well as to the state reading intrinsics _rdpmc and _rdtsc. Their functionality is also specified in the Intel intrinsics guide. Commit on behalf of Omer Paparo Bivas llvm-svn: 271387
* [Clang][Intrinsics][avx512] Adding round intrinsics fot max/min/sqrt ↵Michael Zuckerman2016-06-011-4/+133
| | | | | | | | instruction set to clang Differential Revision: http://reviews.llvm.org/D20812 llvm-svn: 271373
* [Clang][Intrinsics][avx512] Adding round roundscale to clangMichael Zuckerman2016-06-011-0/+36
| | | | | | Differential Revision: http://reviews.llvm.org/D20815 llvm-svn: 271368
OpenPOWER on IntegriCloud