summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify code. No functionality change.Rafael Espindola2014-03-131-5/+5
| | | | llvm-svn: 203804
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-1332-496/+343
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* Remove an unnecessary check for FormatTok not being null.Alexander Kornienko2014-03-131-1/+2
| | | | | | | | | | | | | | | | | Summary: This check hints clang analyzer, that FormatTok may be null, and it reports a null pointer dereference error: http://buildd-clang.debian.net/scan-build/report-827c64.html#Path28 Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D3040 llvm-svn: 203800
* clang-format: Prevent ObjC code from confusing the braced-init detectionDaniel Jasper2014-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This was leading to bad formatting, e.g.: Before: f(^{ @autoreleasepool { if (a) { g(); } } }); After: f(^{ @autoreleasepool { if (a) { g(); } } }); llvm-svn: 203777
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-131-19/+19
| | | | | | class. llvm-svn: 203769
* De-virtualize a method. It's called through template magic and doesn't ↵Craig Topper2014-03-131-1/+1
| | | | | | override anything. llvm-svn: 203764
* Remove unreachable PragmaCaptured method. It's not a real PPCallback.Craig Topper2014-03-131-10/+0
| | | | llvm-svn: 203759
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-1313-192/+178
| | | | | | class. llvm-svn: 203758
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-132-9/+9
| | | | | | class. llvm-svn: 203746
* Always use --eh-frame-hdr on NetBSD, even for -static.Joerg Sonnenberger2014-03-131-1/+1
| | | | llvm-svn: 203742
* PR18275: If a member function of a class template is declared with aRichard Smith2014-03-131-0/+11
| | | | | | | | | | | | | | | const-qualified parameter type and the defined with a non-const-qualified parameter type, the parameter is not const inside its body. Ensure that the type we use when instantiating the body is the right one. Patch by suyog sarda! This is still rather unsatisfactory; it seems like it might be better to instantiate at least the function parameters, and maybe the complete function declaration, when we instantiate the definition for such a member function (instead of reusing the declaration from inside the instantiated class definition). llvm-svn: 203741
* Only allow streaming exactly type 'bool' to a DiagnosticBuilder, not anythingRichard Smith2014-03-123-5/+5
| | | | | | | that implicitly converts to 'bool' (such as pointers, and the first operand of ?:). Clean up issues found by this. Patch by Stephan Tolksdorf! llvm-svn: 203735
* Fix crash if delayed template parsing meets an erroneous trailing return type.Richard Smith2014-03-122-24/+28
| | | | | | | Based on a patch and test by Stephan Tolksdorf! Refactoring and fixing adjacent brokenness by me. llvm-svn: 203733
* MS intrinsics: implement the __movs and __stos intrinsics (PR19054)Hans Wennborg2014-03-121-0/+54
| | | | llvm-svn: 203722
* MS intrinsics: implement __readgs{byte,word,dword,qword} (PR19054)Hans Wennborg2014-03-121-4/+27
| | | | llvm-svn: 203715
* MS intrinsics: don't declare __readeflags and __writeeflags in Intrin.hHans Wennborg2014-03-121-2/+0
| | | | | | | | They're already defined in ia32intrin.h, and this would cause including Intrin.h in 64-bit mode to fail because of conflicting types. Update ms-intrin.cpp to also run in 64-bit mode to catch things like this. llvm-svn: 203714
* Revert "CodeGen: Use a binary format for instrumentation based profiling"Justin Bogner2014-03-124-52/+179
| | | | | | | | | I've clearly done something wrong with how to get this to link correctly. Reverting for now. This reverts commit r203711. llvm-svn: 203712
* CodeGen: Use a binary format for instrumentation based profilingJustin Bogner2014-03-124-179/+52
| | | | | | | | This updates CodeGenPGO to use the ProfileDataReader introduced to llvm in r203703 and the new API for writing out the profile introduced to compiler-rt in r203710. llvm-svn: 203711
* Dont unconditionally add gcc4.2 include paths on FreeBSD.Roman Divacky2014-03-121-5/+0
| | | | | | Newer FreeBSD doesnt ship with gcc and defaults to using libc++. llvm-svn: 203700
* Objective-C. Issue diagnostics on mismatched methods when their selector is usedFariborz Jahanian2014-03-121-1/+54
| | | | | | in an @selector expression. // rdar://15794055 llvm-svn: 203693
* PR19113: Emit 'vtable' TBAA metadata when loading a vptr in a ↵Richard Smith2014-03-121-2/+1
| | | | | | pointer-to-member-function call. llvm-svn: 203691
* CodeGen: Move hot/cold logic out of PGOProfileDataJustin Bogner2014-03-122-39/+21
| | | | llvm-svn: 203689
* DR1346: a parenthesized braced-init-list cannot be used as the initializer whenRichard Smith2014-03-123-3/+12
| | | | | | performing auto type deduction. llvm-svn: 203683
* Don't recompute inlining threshold - use new overload provided by LLVMEli Bendersky2014-03-121-10/+3
| | | | | | Follow-up on LLVM r203669 llvm-svn: 203673
* Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg2014-03-123-5/+7
| | | | | | This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
* ARM: Correct alignment of structs passed as byval pointerOliver Stannard2014-03-121-1/+1
| | | | | | | | | | When a struct has bitfields overlapping with other members (as required by the AAPCS), clang uses a packed struct to represent this. If such a struct is large enough for clang to pass it as a byval pointer (>64 bytes), we need to set the alignment of the argument to match the original type. llvm-svn: 203660
* clang-format: Fix crasher.Daniel Jasper2014-03-121-3/+2
| | | | | | | | | | Caused by unknown tokens (e.g. "\n") not properly updating the state. Example: const char* c = STRINGIFY( \na : b); llvm-svn: 203645
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-1217-599/+570
| | | | | | class. llvm-svn: 203643
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-127-41/+41
| | | | | | class. llvm-svn: 203641
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-1219-151/+158
| | | | | | class. llvm-svn: 203640
* Lex: reduce buffer size, add a testSaleem Abdulrasool2014-03-121-1/+1
| | | | | | | Reduce the stack usage as hopefully include paths are usually not too long. Add a test case for the path normalisation behaviour. llvm-svn: 203632
* Add an option -fmodules-validate-system-headersBen Langmuir2014-03-123-3/+11
| | | | | | | | When enabled, always validate the system headers when loading a module. The end result of this is that when these headers change, we will notice and rebuild the module. llvm-svn: 203630
* 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
OpenPOWER on IntegriCloud