summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-137-41/+22
| | | | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases. llvm-svn: 203842
* [C++11] Replacing ObjCContainerDecl iterators classmeth_begin() and ↵Aaron Ballman2014-03-135-108/+52
| | | | | | classmeth_end() with iterator_range class_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203840
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-1315-167/+83
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203839
* CodeGen: use symbolic enumerators for memory orderTim Northover2014-03-131-5/+10
| | | | | | | It makes the code clearer and less error-prone to use our (already known) special values for the various memory order cases. llvm-svn: 203838
* CodeGen: make use of weaker failure orders on cmpxchg.Tim Northover2014-03-131-67/+151
| | | | | | | | | | | | This makes Clang take advantage of the recent IR addition of a "failure" memory ordering requirement. As with the "success" ordering, we try to emit just a single version if the expression is constant, but fall back to runtime detection (to allow optimisation across function-call boundaries). rdar://problem/15996804 llvm-svn: 203837
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-1312-32/+32
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators meth_begin() and meth_end() ↵Aaron Ballman2014-03-136-51/+22
| | | | | | with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203832
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-1312-130/+57
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Replacing UsingDecl iterators shadow_begin() and shadow_end() with ↵Aaron Ballman2014-03-132-9/+5
| | | | | | iterator_range shadows(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203825
* [analyzer] Warn when passing pointers to const but uninitialized memory.Jordan Rose2014-03-132-23/+113
| | | | | | | | | | | | | | | | | Passing a pointer to an uninitialized memory buffer is normally okay, but if the function is declared to take a pointer-to-const then it's very unlikely it will be modifying the buffer. In this case the analyzer should warn that there will likely be a read of uninitialized memory. This doesn't check all elements of an array, only the first one. It also doesn't yet check Objective-C methods, only C functions and C++ methods. This is controlled by a new check: alpha.core.CallAndMessageUnInitRefArg. Patch by Per Viberg! llvm-svn: 203822
* [C++11] Replacing ObjCImplementationDecl iterators init_begin() and ↵Aaron Ballman2014-03-131-4/+2
| | | | | | init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203820
* [C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with ↵Aaron Ballman2014-03-135-36/+20
| | | | | | iterator_range inits(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203819
* [C++11] Replacing CXXRecordDecl iterators capture_begin() and capture_end() ↵Aaron Ballman2014-03-131-10/+9
| | | | | | with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203817
* MS intrinsics: __interlockedbittestandset(64) (PR19054)Hans Wennborg2014-03-131-0/+22
| | | | llvm-svn: 203816
* [C++11] Replacing CXXRecordDecl iterators friend_begin() and friend_end() ↵Aaron Ballman2014-03-131-4/+1
| | | | | | with iterator_range friends(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203815
* [C++11] Replacing CXXRecordDecl iterators ctor_begin() and ctor_end() with ↵Aaron Ballman2014-03-132-18/+11
| | | | | | iterator_range ctors(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203814
* Prevent outputting HeaderFileInfos for files not used as headersBen Langmuir2014-03-132-4/+16
| | | | | | | | | | | When building an AST file, we don't want to output HeaderFileInfo structures for files that are not actually used as headers in the current context. This can lead to assuming that unrelated files have include counts of 0, defeating multiple-include prevention. This is accomplished by adding an IsValid bit to the HFI. llvm-svn: 203813
* [C++11] Replacing CXXRecordDecl iterators method_begin() and method_end() ↵Aaron Ballman2014-03-135-60/+28
| | | | | | with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203812
* [C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() ↵Aaron Ballman2014-03-1312-145/+86
| | | | | | with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203808
* 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
OpenPOWER on IntegriCloud