summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow GNU-style attributes on lambda expressions.Aaron Ballman2014-03-121-3/+12
| | | | llvm-svn: 203628
* lex: improve include handling on Linux for WindowsSaleem Abdulrasool2014-03-111-10/+22
| | | | | | | | | | Normalise the path separator character on non-windows platforms. Although this would work on Windows as well (most newer versions of Windows support either '/' or '\' as a path separator character), it could potentially cause problems with full UNC paths. This change enables the use of the Windows SDK on Linux which will not accept '\' as a path separator. llvm-svn: 203614
* Driver: Support -gmlt as an alias for -gline-tables-onlyDavid Blaikie2014-03-111-1/+2
| | | | llvm-svn: 203603
* Objective-C. Prevent an assertion crash due to buggy codeFariborz Jahanian2014-03-111-4/+12
| | | | | | as it can commonly happen. // rdar://16261494 llvm-svn: 203598
* PGO: Scale large counters down to 32-bitsDuncan P. N. Exon Smith2014-03-111-12/+42
| | | | | | | | | PGO counters are 64-bit and branch weights are 32-bit. Scale them down when necessary, instead of just taking the lower 32 bits. <rdar://problem/16276448> llvm-svn: 203592
* Remove trailing whitespace introduced in r203028.Bob Wilson2014-03-111-2/+2
| | | | llvm-svn: 203588
* Objective-C. Diagose use of undefined protocolsFariborz Jahanian2014-03-111-1/+22
| | | | | | | when a class adopts a protocol that inherits from undefined protocols. // rdar://16111182 llvm-svn: 203586
* [analyzer] Check all conditions in a chained if against each other.Jordan Rose2014-03-111-0/+24
| | | | | | | | | | | | Like the binary operator check of r201702, this actually checks the condition of every if in a chain against every other condition, an O(N^2) operation. In most cases N should be small enough to make this practical, and checking all cases like this makes it much more likely to catch a copy-paste error within the same series of branches. Part of IdenticalExprChecker; patch by Daniel Fahlgren! llvm-svn: 203585
* Gracefully handle an attribute specifier following a lambda introducer when ↵Aaron Ballman2014-03-111-6/+18
| | | | | | the parameter list wasn't present. llvm-svn: 203565
* Sema: demote invalid atomic ordering message to warning.Tim Northover2014-03-111-3/+3
| | | | | | | | | | | | | | Someone could write: if (0) { __c11_atomic_load(ptr, memory_order_release); } or the equivalent, which is perfectly valid, so we shouldn't outright reject invalid orderings on purely static grounds. rdar://problem/16242991 llvm-svn: 203564
* clang-format: Avoid unnecessary break before lambda return type.Daniel Jasper2014-03-111-1/+2
| | | | | | | | | | | | | | | | | Before: auto aaaaaaaa = [](int i, // break int j) -> int { return fffffffffffffffffffffffffffffffffffffff(i * j); }; After: auto aaaaaaaa = [](int i, // break int j) -> int { return fffffffffffffffffffffffffffffffffffffff(i * j); }; llvm-svn: 203562
* Sema: produce error when invalid ordering is passed to atomic builtinTim Northover2014-03-112-21/+47
| | | | | | | | | This is a conservative check, because it's valid for the expression to be non-constant, and in cases like that we just don't know whether it's valid. rdar://problem/16242991 llvm-svn: 203561
* Update for IR: add a second AtomicOrdering to cmpxchg insts.Tim Northover2014-03-113-7/+13
| | | | | | rdar://problem/15996804 llvm-svn: 203560
* clang-format: Fix another false positive in the lambda detection.Daniel Jasper2014-03-111-2/+2
| | | | | | | | | | Before: int i = (*b)[a] -> f(); After: int i = (*b)[a]->f(); llvm-svn: 203557
* clang-format: Fix incorrect lambda recognition exposed by r203452.Daniel Jasper2014-03-111-1/+2
| | | | | | | | | | Before: int i = a[a][a] -> f(); After: int i = a[a][a]->f(); llvm-svn: 203556
* clang-format: Detect weird macro lambda usage.Daniel Jasper2014-03-111-1/+5
| | | | | | | | | | | | | | Before: void f() { MACRO((const AA & a) { return 1; }); } After: void f() { MACRO((const AA &a) { return 1; }); } llvm-svn: 203551
* Revert C++11ification in r203534 and r203536. Apparently our toolchains aren'tRichard Smith2014-03-113-19/+23
| | | | | | ready for this yet. llvm-svn: 203548
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-112-35/+35
| | | | | | class. llvm-svn: 203547
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-114-67/+62
| | | | | | class. llvm-svn: 203543
* [HeaderSearch] Fix issue where if a headermap entry maps the filename to a ↵Argyrios Kyrtzidis2014-03-111-10/+28
| | | | | | | | | | framework import (non-absolute path) then we fail to find it if it is re-included later on. rdar://16285490 llvm-svn: 203542
* De-virtualize a method since it doesn't override anything and isn't ↵Craig Topper2014-03-111-2/+1
| | | | | | overridden itself. llvm-svn: 203538
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-112-365/+364
| | | | | | class. llvm-svn: 203537
* Speculative workaround for apparent libstdc++ bug exposed by r203534.Richard Smith2014-03-111-0/+3
| | | | llvm-svn: 203536
* Move the warning about unused relational comparison from -Wunused-value toRichard Trieu2014-03-112-11/+31
| | | | | | | -Wunused-comparison. Also, newly warn on unused result from overloaded relational comparisons, now also in -Wunused-comparison. llvm-svn: 203535
* If a visibility update record is found for a DeclContext after that Decl hasRichard Smith2014-03-113-22/+19
| | | | | | | already been loaded, apply that update record to the Decl immediately, rather than adding it to a pending list and never applying it. llvm-svn: 203534
* If a module map is found in a relative -I path, convert the filenames within itRichard Smith2014-03-111-26/+58
| | | | | | | | to absolute paths when building the includes file for the module. Without this, the module build would fail, because the relative paths we were using are not necessarily relative to a directory in our include path. llvm-svn: 203528
* Objective-C IRGen. Fixes several regressions caused by changes madeFariborz Jahanian2014-03-111-5/+31
| | | | | | to setting of ObjC linkages. //rdar://16206443 llvm-svn: 203521
* Thread safety analysis: move smart pointer checks from -Wthread-safety-betaDeLesley Hutchins2014-03-101-27/+19
| | | | | | to -Wthread-safety. llvm-svn: 203510
* [analyzer] Eliminate memory leak in BugReporter::emitReport()Anton Yartsev2014-03-101-2/+5
| | | | llvm-svn: 203507
* RTTI symbols for visible local types may need weak linkage.John McCall2014-03-101-1/+1
| | | | | | | | | | | Previously, we would always emit them with internal linkage, but with hidden visibility when the function was hidden, which is an illegal combination, which could lead LLVM to actually emit them as strong hidden symbols with hilarious results. rdar://16265084 llvm-svn: 203503
* IRGen: __c11/__atomic compare-and-exchange should respect the standardDavid Majnemer2014-03-101-10/+36
| | | | | | | | | | | | | | | Summary: 'Expected' should only be modified if the operation fails. This fixes PR18899. Reviewers: chandlerc, rsmith, rjmccall CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2922 llvm-svn: 203493
* [C++11] Avoid implicit conversion of ArrayRef to std::vector and use move ↵Benjamin Kramer2014-03-105-20/+15
| | | | | | semantics where appropriate. llvm-svn: 203477
* [C++11] Replacing DeclBase iterators specific_attr_begin() and ↵Aaron Ballman2014-03-1012-140/+62
| | | | | | specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203474
* Add loc() to the dynamic registry.Samuel Benzaquen2014-03-102-6/+17
| | | | | | | | | | | | | | | | | | Summary: Add loc() to the dynamic registry. Other fixes: - Fix the polymorphic variant value to accept an exact match, even if there are other possible conversions. - Fix specifiesTypeLoc() to not crash on an empty NestedNameSpecifierLoc. Reviewers: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2928 llvm-svn: 203467
* clang-format: Add spaces between lambdas and comments.Daniel Jasper2014-03-101-1/+2
| | | | | | | | | | | | | | | | | | Before: void f() { bar([]() {}// Does not respect SpacesBeforeTrailingComments ); } After: void f() { bar([]() {} // Does not respect SpacesBeforeTrailingComments ); } This fixes llvm.org/PR19017. llvm-svn: 203466
* Reverting llvm::distance changes to use std::distance with iterators ↵Aaron Ballman2014-03-105-15/+11
| | | | | | | | instead, per post-commit review feedback. Replacing llvm::copy changes with SmallVector range-based construction which is a considerably cleaner approach. llvm-svn: 203461
* Preserve hanging indent when breaking line comments.Alexander Kornienko2014-03-101-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If we need to break the second line here: // something: aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa aaaaa aaaaaa aaaaa aaaaa aaaaa with the patch it will be turned to // something: aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa instead of // something: aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa aaaaa aaaaaa aaaaa aaaaa // aaaaa Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2988 llvm-svn: 203458
* Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacrosRobert Lytton2014-03-102-15/+5
| | | | llvm-svn: 203455
* clang-format: Add spaces around trailing/lambda return types.Daniel Jasper2014-03-102-1/+5
| | | | | | | | | | Before: int c = []()->int { return 2; }(); After: int c = []() -> int { return 2; }(); llvm-svn: 203452
* When a type's definition is instantiated, the definition becomes visible, evenRichard Smith2014-03-101-2/+13
| | | | | | | | | if the type's declaration was previously instantiated in an unimported module. (For an imported type definition, this already worked, because the source location is set to the location of the definition, but for locally-instantiated type definitions, it did not.) llvm-svn: 203425
* Remove trailing whitespace.Bob Wilson2014-03-091-1/+1
| | | | llvm-svn: 203422
* Tab to spaces. No functionality change.Nick Lewycky2014-03-091-1/+1
| | | | llvm-svn: 203417
* Fix uninitialized value in AttributedTypeLoc.Logan Chien2014-03-091-3/+10
| | | | | | | | | | | Clang might crash while reading the precompiled headers if we don't initialize the AttrEnumOperandLoc properly. This commit fixes the combination of string attribute operand and enum operand. Besides, this commit also adds several assertions to avoid unexpected operand kind. llvm-svn: 203416
* [C++11] Use std::unique_ptr for ownership in a vector.Ahmed Charles2014-03-091-24/+14
| | | | | | Also change to using range-based for loops. No functional change intended. llvm-svn: 203396
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-0925-25/+25
| | | | llvm-svn: 203389
* [C++11] Remove the remaining uses of OwningPtr.Ahmed Charles2014-03-093-6/+4
| | | | | | Replace OwningArrayPtr with std::unique_ptr<T[]>. llvm-svn: 203388
* [-Wunreachable-code] Handle Objective-C bool literals in 'isConfigurationValue'.Ted Kremenek2014-03-092-25/+64
| | | | | | | This includes special casing 'YES' and 'NO', which are constants defined as macros. llvm-svn: 203380
* Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s ↵David Blaikie2014-03-092-2/+2
| | | | | | operator== llvm-svn: 203373
* [Sema] Fix assertion hit with #pragma weak.Argyrios Kyrtzidis2014-03-091-0/+2
| | | | | | rdar://16264844 llvm-svn: 203372
* [libclang] Don't pad the main buffer for the preamble.Argyrios Kyrtzidis2014-03-091-40/+6
| | | | | | | | | Padding does not seem to be useful currently, and it leads to bogus location if an error points to the end of the file. rdar://15836513 llvm-svn: 203370
OpenPOWER on IntegriCloud