summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* parser: improve diagnostics for MS attributesSaleem Abdulrasool2015-06-152-6/+11
| | | | | | | | Switch to using BalancedDelimiterTracker to get better diagnostics for unbalanced delimiters. This still does not handle any of the attributes, simply improves the parsing. llvm-svn: 239758
* Wildcard out some SSA value names from the ACLE intrinsic test caseReid Kleckner2015-06-151-6/+6
| | | | llvm-svn: 239757
* [Sparc] Make soft-float emit an error.James Y Knight2015-06-152-49/+21
| | | | | | | | | | | | LLVM does not and has not ever supported a soft-float ABI mode on Sparc, so don't pretend that it does. Also switch the default from "soft-float" -- which was actually hard-float because soft-float is unimplemented -- to hard-float. Differential Revision: http://reviews.llvm.org/D10457 llvm-svn: 239755
* [modules] Better support for redefinitions of an entity from the same module.Richard Smith2015-06-1510-47/+73
| | | | | | | Support this across module save/reload and extend the 'missing import' diagnostics with a list of providing modules. llvm-svn: 239750
* This patch implements clang support for the ACLE special register intrinsicsLuke Cheeseman2015-06-1512-1/+578
| | | | | | | | | | | | | in section 10.1, __arm_{w,r}sr{,p,64}. This includes arm_acle.h definitions with builtins and codegen to support these, the intrinsics are implemented by generating read/write_register calls which get appropriately lowered in the backend based on the register string provided. SemaChecking is also implemented to fault invalid parameters. Differential Revision: http://reviews.llvm.org/D9697 llvm-svn: 239737
* clang-format: NFC. Move testing of selective formatting to a separate file.Daniel Jasper2015-06-153-402/+448
| | | | | | | This is a first step for splitting the huge FormatTest.cpp into separate files to make it easier to find specific tests. llvm-svn: 239730
* Fix spelling in comment.Douglas Katzman2015-06-151-1/+1
| | | | llvm-svn: 239727
* Revert r239721 - Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-152-4/+4
| | | | | | | | InitMCObjectFileInfo. NFC. It appears to cause sparc-little-endian.s to assert on Windows and Darwin. llvm-svn: 239724
* clang-format: [JS] Tweak behavior for multiline array initializer parametersDaniel Jasper2015-06-152-1/+9
| | | | | | | | | | | | | | | | | | | | | Before: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); After: var someVariable = SomeFuntion(aaaa, [ aaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccc ], aaaa); llvm-svn: 239722
* Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.Daniel Sanders2015-06-152-4/+4
| | | | | | | | | | | | | | | | | | | | | Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar trivial patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239721
* [analyzer] Remove ObjCContainersChecker size information when a ↵Devin Coughlin2015-06-152-1/+46
| | | | | | | | | | | | | CFMutableArrayRef escapes Update ObjCContainersChecker to be notified when pointers escape so it can remove size information for escaping CFMutableArrayRefs. When such pointers escape, un-analyzed code could mutate the array and cause the size information to be incorrect. rdar://problem/19406485 llvm-svn: 239709
* Add test for parsing the XOR operator in Intel syntax inline assembly.Michael Kuperstein2015-06-141-0/+2
| | | | | | | | | LLVM side of the patch was committed as r239695. Differential Revision: http://reviews.llvm.org/D10384 Patch by marina.yatsina@intel.com llvm-svn: 239696
* clang-format: [JS] Fix corner case in template string parsing.Daniel Jasper2015-06-142-1/+7
| | | | | | | | | | Before, these would not properly detected because of the char/string literal found when re-lexing after the first `: var x = `'`; // comment with matching quote ' var x = `"`; // comment with matching quote " llvm-svn: 239693
* Add some basic support for CloudABI on i686.Ed Schouten2015-06-131-0/+2
| | | | | | | | | | | Some people want to experiment with building i686 CloudABI binaries. I am not entirely sure this is a good idea, as I'd rather see Intel x32 support appear. As it only requires a two-line change, let's at least provide compiler to ease experimenting. llvm-svn: 239689
* Don't use std::errc.Rafael Espindola2015-06-131-1/+2
| | | | | | | | | | | | | | | | | | | | | As noted on Errc.h: // * std::errc is just marked with is_error_condition_enum. This means that // common patters like AnErrorCode == errc::no_such_file_or_directory take // 4 virtual calls instead of two comparisons. And on some libstdc++ those virtual functions conclude that ------------------------ int main() { std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory); return foo == std::errc::no_such_file_or_directory; } ------------------------- should exit with 0. llvm-svn: 239684
* Update for llvm api change.Rafael Espindola2015-06-131-14/+4
| | | | llvm-svn: 239670
* Add `-verify-ignore-unexpected` option to ignore unexpected diagnostics in ↵Eric Fiselier2015-06-138-14/+207
| | | | | | | | | | | | | | | | | | | | | VerifyDiagnosticsConsumer Summary: The goal of this patch is to make `-verify` easier to use when testing libc++. The `notes` attached to compile error diagnostics are numerous and relatively unstable when they reference libc++ header internals. This patch allows libc++ to write stable compilation failure tests by allowing unexpected diagnostic messages to be ignored where they are not relevant. This patch adds a new CC1 flag called `-verify-ignore-unexpected`. `-verify-ignore-unexpected` tells `VerifyDiagnosticsConsumer` to ignore *all* unexpected diagnostic messages. `-verify-ignore-unexpected=<LevelList>` can be used to only ignore certain diagnostic levels. `<LevelList>` is a comma separated list of diagnostic levels to ignore. The supported levels are `note`, `remark`, `warning` and `error`. Reviewers: bogner, grosser, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10138 llvm-svn: 239665
* Revert r239213: "clang-cl: Implement /GL in terms of -flto."Hans Wennborg2015-06-134-9/+3
| | | | | | | Reverting until it's easier to use this in a real-world build, e.g. when the linker can handle it. llvm-svn: 239656
* docs: grammar adjustments in clang manpageSaleem Abdulrasool2015-06-131-7/+7
| | | | | | | | Fix a few typos and run-on sentences in the clang POD documentation. Patch by Brian R. Gaeke! llvm-svn: 239652
* [CodeGen] Don't evaluate immediate inlineasm arguments using isICE().Ahmed Bougacha2015-06-132-1/+6
| | | | | | | | | | | Instead, just EvaluateAsInt(). Follow-up to r239549: rsmith points out that isICE() is expensive; seems like it's not the right concept anyway, as it fails on `static const' in C, and will actually trigger the assert below on: test/Sema/inline-asm-validate-x86.c llvm-svn: 239651
* [CodeGen] Use IRBuilder to create llvm.lifetime intrinsics.Alexey Samsonov2015-06-122-11/+10
| | | | | | | | | | | | | | | | | | | | Summary: In addition to easier syntax, IRBuilder makes sure to set correct debug locations for newly added instructions (bitcast and llvm.lifetime itself). This restores the original behavior, which was modified by r234581 (reapplied as r235553). Extend one of the tests to check for debug locations. Test Plan: regression test suite Reviewers: aadg, dblaikie Subscribers: cfe-commits, majnemer Differential Revision: http://reviews.llvm.org/D10418 llvm-svn: 239643
* [ms] Don't try to delay lookup for failures in SFINAE context (PR23823)Hans Wennborg2015-06-122-1/+12
| | | | | | | | | | | | | The underlying problem in PR23823 already existed before my recent change in r239558, but that change made it worse (failing not only for undeclared symbols, but also failed overload resolution). This makes Clang not try to delay the lookup in SFINAE context. I assume no current code is relying on SFINAE working with lookups that need to be delayed, because that never seems to have worked. Differential Revision: http://reviews.llvm.org/D10417 llvm-svn: 239639
* [CGCall] Fix potential invalid iterator decrement in ↵Alexey Samsonov2015-06-121-5/+4
| | | | | | | | | | | findDominatingStoreToReturnValue. If llvm.lifetime.end turns out to be the first instruction in the last basic block, we can decrement the iterator twice, going past rend. At the moment, this can never happen because llvm.lifetime.end always goes immediately after bitcast, but relying on this is very brittle. llvm-svn: 239638
* Quote the user provided string in the warning message and updateEric Christopher2015-06-122-3/+3
| | | | | | tests accordingly. llvm-svn: 239635
* Driver: only set -mlinker-version based on host if it's validTim Northover2015-06-121-1/+2
| | | | | | | | | | | | We were adding an extra "-mlinker-version" argument to the invocation based on a value inferred from "ld -v". This is set by the build systems to either a sane value or an empty string (e.g. for custom built ld), which we don't want to pass on. No test really possible because the value depends on both host system and how CMake was invoked. llvm-svn: 239633
* [MS ABI] Lock-in the derived memptr rep. for base-to-derived conversionsDavid Majnemer2015-06-122-4/+15
| | | | | | | | | We would get this right in the case where an explicit cast was formed but not when we were performing an implicit conversion. This fixes PR23828. llvm-svn: 239625
* Allow case-insensitive values for -mcpu for AArch64 target in line with GCC.Gabor Ballabas2015-06-123-3/+23
| | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -mcpu option for the AArch64 target. llvm-svn: 239619
* Use Clang version numbers for the Windows VERSIONINFO resource.Greg Bedwell2015-06-121-0/+13
| | | | | | | | When setting the VERSIONINFO resource to embed version information into exe and DLL files on Windows, override the default LLVM version number values with their clang equivalents. llvm-svn: 239617
* This patch makes the NEON intrinsics vget_lane_f16, vgetq_lane_f16,Luke Cheeseman2015-06-122-6/+31
| | | | | | | | vset_lane_f16 and vsetq_lane_f16 available in AArch32. Differential Revision: http://reviews.llvm.org/D10388 llvm-svn: 239610
* scan-build: Remove useless whitespace in File pathSylvestre Ledru2015-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Honggyu Kim Summary: This patch removes useless whitespace in File path in index.html Previously, a File directory path is copied and pasted as below: arch /arm /kernel /stacktrace.c It just removes the whitespace between directories and makes the copied string as below: arch/arm/kernel/stacktrace.c The output looks same in html format, but the copied directory path can be pasted as it looks. Reviewers: krememek, zaks.anna, sylvestre.ledru Reviewed By: sylvestre.ledru Subscribers: aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D10354 llvm-svn: 239609
* Allow ToolChain to decide if Clang is not the right C compiler.Douglas Katzman2015-06-122-4/+6
| | | | | | | | | Removed comment in Driver::ShouldUseClangCompiler implying that there was an opt-out ability at that point - there isn't. Differential Revision: http://reviews.llvm.org/D10246 llvm-svn: 239608
* push_back() loop -> append() for random access iterators.Benjamin Kramer2015-06-128-38/+13
| | | | | | | append will resize the vector to the optimal size. No functional change intended. llvm-svn: 239607
* [clang-format] Use in-class initializers to simplify constructor.Benjamin Kramer2015-06-121-17/+14
| | | | | | Sadly C++11 doesn't let us use initializers on bitfield members (DR1341). NFC. llvm-svn: 239606
* [clang-format] Reorder and pack ParenState members to minimize paddingBenjamin Kramer2015-06-121-36/+36
| | | | | | sizeof(ParenState) goes from 64 bytes to 52 bytes. NFC. llvm-svn: 239605
* [clang-format] Hoist vector allocation out of loop. NFC.Benjamin Kramer2015-06-121-2/+5
| | | | llvm-svn: 239604
* clang-format: Always add space before lambda-{Daniel Jasper2015-06-122-0/+2
| | | | | | | | | | | | Before: int c = []() -> int *{ return 2; }(); After: int c = []() -> int * { return 2; }(); Based on patch by James Dennett (http://reviews.llvm.org/D10410), thank you! llvm-svn: 239600
* clang-format: Understand C-style case in case label.Daniel Jasper2015-06-122-1/+2
| | | | | | | | | | | | Before: case (my_int) ONE: After: case (my_int)ONE: This fixed llvm.org/PR23760 llvm-svn: 239597
* clang-format: [JS] Support "export enum" declarations.Daniel Jasper2015-06-122-1/+7
| | | | llvm-svn: 239595
* clang-format: [JS] Add tests to ensure clang-format doesn't break codeDaniel Jasper2015-06-121-0/+12
| | | | | | | | by triggering automatic semicolon insertion changes. NFC intended. Patch by Martin Probst. llvm-svn: 239594
* clang-format: [JS] Fix regression caused by r239592.Daniel Jasper2015-06-122-1/+3
| | | | | | | | | | Without it, it would do: interface I { x: string; } var y; llvm-svn: 239593
* clang-format: [JS] fix incorrectly collapsed lines after exportDaniel Jasper2015-06-122-6/+11
| | | | | | | | | | | | | statement. When an exported function would follow a class declaration, it would not be recognized as a stand-alone function. That would then collapse the following line with the current one, e.g. class C {} export function f() {} var x; llvm-svn: 239592
* Wrap to 80 columns. No behavior change.Nico Weber2015-06-121-2/+3
| | | | llvm-svn: 239591
* Revert commit r239481 as it is dependent on reverted llvm commit r239480.Teresa Johnson2015-06-126-20/+1
| | | | llvm-svn: 239588
* Add a warning for unsupported elements of the target attribute.Eric Christopher2015-06-124-5/+19
| | | | | | | | | Since we're ignoring the tune= and fpmath= attributes go ahead and add a warning alerting people to the fact that we're going to ignore that part of it during code generation and tie it to the attribute warning set. llvm-svn: 239583
* Handle fpmath= in the target attribute.Eric Christopher2015-06-122-0/+8
| | | | | | | | | | Right now we're ignoring the fpmath attribute since there's no backend support for a feature like this and to do so would require checking the validity of the strings and doing general subtarget feature parsing of valid and invalid features with the target attribute feature. llvm-svn: 239582
* Handle -mno-<feature> in target attribute strings by replacing theEric Christopher2015-06-122-2/+8
| | | | | | | -mno- with a -<feature> to match how we handle this in the rest of the frontend. llvm-svn: 239581
* Add support for tune= to the target attribute support by ignoring it.Eric Christopher2015-06-122-0/+7
| | | | | | | We don't currently support the -mtune option in any useful way so ignoring the annotation is fine. llvm-svn: 239580
* Add support for the the target attribute.Eric Christopher2015-06-125-11/+84
| | | | | | | | | | | | | | | Modeled after the gcc attribute of the same name, this feature allows source level annotations to correspond to backend code generation. In llvm particular parlance, this allows the adding of subtarget features and changing the cpu for a particular function based on source level hints. This has been added into the existing support for function level attributes without particular verification for any target outside of whether or not the backend will support the features/cpu given (similar to section, etc). llvm-svn: 239579
* [modules] Apply name visibility rules to names found by ADL.Richard Smith2015-06-123-2/+11
| | | | llvm-svn: 239578
* [IRGen] Fix the MSVC2013 buildDavid Majnemer2015-06-121-1/+2
| | | | llvm-svn: 239576
OpenPOWER on IntegriCloud