summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix the rececl chain for redeclarations of predefined declsBen Langmuir2014-08-181-0/+2
| | | | | | | | | Predefined decls like 'Protocol' in objc are not loaded from AST files, so we cannot rely on loading the canonical decl to complete the redecl chain for redeclarations of these decls. The broken redecl chain was non-circular, so looping over redecls() would hang. llvm-svn: 215929
* Store std::unique_ptr in InMemoryBuffers. NFC.Rafael Espindola2014-08-182-23/+27
| | | | llvm-svn: 215928
* return a std::unique_ptr from getMainBufferWithPrecompiledPreamble. NFC.Rafael Espindola2014-08-181-19/+22
| | | | llvm-svn: 215927
* Use std::unique_ptr to simplify this code a bit.Rafael Espindola2014-08-181-11/+7
| | | | llvm-svn: 215926
* Inline function into only use.Rafael Espindola2014-08-181-6/+2
| | | | llvm-svn: 215925
* Simplify ASTUnit::Parse a bit by passing a std::unique_ptr to it.Rafael Espindola2014-08-181-28/+19
| | | | llvm-svn: 215900
* [x32] Handle -m64/-m32 switches by Driver in x32 modePavel Chupin2014-08-181-4/+8
| | | | | | | | | | | | | | | | | Summary: Adding remaining 2 cases handling: * from x32 to 32 via -m32 * from x32 to 64 via -m64 Test Plan: linux-ld test updated Reviewers: chandlerc, atanasyan Subscribers: cfe-commits, zinovy.nis Differential Revision: http://reviews.llvm.org/D4930 llvm-svn: 215899
* Add the break in the switch case (even if there is llvm_unreachable. It will ↵Sylvestre Ledru2014-08-181-1/+1
| | | | | | silent coverity warning CID 1231654 llvm-svn: 215897
* Update the call to llvm::sys::fs::UniqueID to match the definition: ↵Sylvestre Ledru2014-08-181-1/+1
| | | | | | | | UniqueID(uint64_t Device, uint64_t File) Fixes CID 1095247 llvm-svn: 215896
* Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid ↵Craig Topper2014-08-178-24/+24
| | | | | | needing to mention the size. llvm-svn: 215869
* Use the pointer-like API of ErrorOr.Rafael Espindola2014-08-171-1/+1
| | | | | | Thanks to David Blaikie for the suggestion. llvm-svn: 215866
* Use std::unique_ptr in a few methods that take ownership.Rafael Espindola2014-08-173-10/+14
| | | | llvm-svn: 215864
* Update for llvm api changes.Rafael Espindola2014-08-172-2/+2
| | | | llvm-svn: 215856
* Convert a few ownership comments with std::unique_ptr.Rafael Espindola2014-08-172-9/+8
| | | | llvm-svn: 215853
* Fix assertion on asm register that are "%"Olivier Goffart2014-08-171-0/+2
| | | | | | | | | | | Name might be empty again after we removed the '%' prefix and Name[0] would assert. Found on code like register int foo asm("%" MACRO); where MACRO was supposed to be defined in a header file that was not found. llvm-svn: 215834
* Uniformed parsing of GNU attributes at line beginnning and added GNU ↵Abramo Bagnara2014-08-161-0/+3
| | | | | | attributes parsing FIXMEs. llvm-svn: 215814
* When loading a module with no local entities, still bump the size of theBen Langmuir2014-08-162-16/+28
| | | | | | | | | | | | | | | | | tables that correspond to ContinuousRangeMaps, since the keys to those maps need to be unique, or we may map to the wrong offset. This fixes a crash + malformed AST file seen when loading some modules that import Cocoa on Darwin, which is a module with no contents except imports of other modules. Unfortunately I have not been able to find a reduced test case that reproduces this problem. Also add an assert that we aren't mapping one key to multiple values in CRM. We ought to be able to say there are no duplicate keys at all, but there are a bunch of 0 -> 0 mappings that are showing up, probably coming from the source location table. llvm-svn: 215810
* Make sure that vtables referenced from delay-parsed templates get referenced.Nico Weber2014-08-151-12/+15
| | | | | | | | | | | | | | This fixes PR20671, see the bug for details. In short, ActOnTranslationUnit() calls DefineUsedVTables() and only then PerformPendingInstantiations(). But PerformPendingInstantiations() is what does delayed template parsing, so vtables only references from late-parsed templates weren't marked used. As a fix, move the SavePendingInstantiationsAndVTableUsesRAII in PerformPendingInstantiations() up above the delayed template parsing code. That way, vtables referenced from templates end up in the RAII object, and the call to DefineUsedVTables() in PerformPendingInstantiations() marks them used. llvm-svn: 215786
* Add a RAII class for saving and restoring instantiations and uses. No ↵Nico Weber2014-08-151-39/+18
| | | | | | behavior change. llvm-svn: 215780
* Wrap to 80 columns, no behavior change.Nico Weber2014-08-151-1/+2
| | | | llvm-svn: 215776
* DebugInfo: While loop backedge should be attribute to the start of the while ↵David Blaikie2014-08-151-0/+1
| | | | | | | | | | | | | statement. A little test case simplification - this could be simplified further, though there are certainly interesting connections to the if/else construct so I'm hesitant to remove that entirely though it does appear somewhat unrelated. (similar fix to r215766, related to PR19864) llvm-svn: 215768
* DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for ↵David Blaikie2014-08-151-0/+1
| | | | | | | | | | | | | | | loop, to the start of the loop. This avoids debuggers stepping to strange places (like the last statement in the loop body, or the first statement in the if). This is not the whole answer, though - similar bugs no doubt exist in other loops (patches to follow) and attributing exception handling code to the correct line is also tricky (based on the previous fix to PR19864, exception handling is still erroneously attributed to the 'if' line). llvm-svn: 215766
* Typo fix in comments: definintion -> definitionJames Dennett2014-08-151-1/+1
| | | | llvm-svn: 215764
* Add missing matchers to the dynamic registry.Samuel Benzaquen2014-08-151-0/+11
| | | | | | | | | | Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4910 llvm-svn: 215757
* MS ABI: Virtual member pointer thunks are not unnamed_addrReid Kleckner2014-08-151-0/+3
| | | | | | They can be compared for identity. llvm-svn: 215745
* R600: Add ldexp intrinsicMatt Arsenault2014-08-151-6/+16
| | | | llvm-svn: 215738
* Objective-C. Do not warn if user is using property-dox syntax to name aFariborz Jahanian2014-08-151-1/+5
| | | | | | | user provided setter name (as declared in @property attribute declaration). rdar://18022762 llvm-svn: 215736
* Move some code into a helper function. NFC.Rafael Espindola2014-08-151-45/+48
| | | | llvm-svn: 215731
* Add isDeleted() matcher for FunctionDecl nodes.Samuel Benzaquen2014-08-151-0/+1
| | | | | | | | | | Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4911 llvm-svn: 215714
* Const-correctness, return-after-else, and formatting updates. NFC.Aaron Ballman2014-08-151-12/+10
| | | | llvm-svn: 215706
* Adding const-qualifiers to auto declarations. NFC.Aaron Ballman2014-08-151-3/+3
| | | | llvm-svn: 215704
* arm_acle.h: Small cleanupYi Kong2014-08-151-4/+0
| | | | | | | | | Since __SIZEOF_LONG_LONG__ is always defined as 8 on ARM targets, there's no point in checking this. NFC. Patch by Moritz Roth. llvm-svn: 215697
* clang-format: Prefer breaking after return type over template paramDaniel Jasper2014-08-151-0/+2
| | | | | | | | | | | | | | Before: typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa aaaaaaaaaa< aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(bool *aaaaaaaaaaaaaaaaaa, bool *aa) {} After: typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa aaaaaaaaaa<aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( bool *aaaaaaaaaaaaaaaaaa, bool *aa) {} llvm-svn: 215693
* clang-format: [proto] Understand text-format nesting without :Daniel Jasper2014-08-151-4/+6
| | | | | | | | | | | | | | | | | Before: option (MyProto.options) = { field_c : "OK" msg_field{field_d : 123} }; After: option (MyProto.options) = { field_c : "OK" msg_field{field_d : 123} }; (Note that the colon after "msg_field" is optional). llvm-svn: 215692
* Make sure CallExpr::getLocStart doesn't segfaultKeno Fischer2014-08-151-2/+2
| | | | | | | | | | | | | | | | | Summary: When the CallExpr passed to Sema::ConvertArgumentsForCall has all default parameters, and the number of actual arguments passed is zero, this function will segfault in the call to Call->getLocStart() if the Callee has an invalid getLocStart(), the reason being that since ConvertArgumentsForCall has set the correct number of arguments, but has not filled them in yet, getLocStart() will try to access the first (not yet existent) argument and thus segfaults. This fixes that by making getLocStart return an invalid source location if the queried argument is NULL rather than segfaulting. Reviewers: rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4917 llvm-svn: 215686
* Limit our MSVC compat hack for nested names from dependent basesReid Kleckner2014-08-141-2/+7
| | | | | | | | | | | | | | | | | | | | Previously, any undeclared unqualified id starting a nested name specifier in a dependent context would have its lookup retried during template instantiation. Now we limit that retry hack to methods of a class with dependent bases. Free function templates in particular are no longer affected by this hack. Also, diagnose this as a Microsoft extension. This has the downside that template authors may see this warning *and* an error during instantiation time about this identifier. Fixing that will probably require formalizing some kind of "delayed" identifier, instead of our ad-hoc solutions of forming dependent AST nodes when lookup fails. Based on a patch by Kim Gräsman! Differential Revision: http://reviews.llvm.org/D4854 llvm-svn: 215683
* Use a switch statement for IsIntegratedAssemblerDefault().Brad Smith2014-08-141-7/+13
| | | | llvm-svn: 215678
* Thread safety analysis: add -Wthread-safety-verbose flag, which adds ↵DeLesley Hutchins2014-08-142-12/+65
| | | | | | additional notes that are helpful when compiling statistics on thread safety warnings. llvm-svn: 215677
* [modules] Turn off a broken optimization: we need to pick up implicit specialRichard Smith2014-08-141-2/+5
| | | | | | | members from all redefinitions of a class that have them, in case the special member is defined in one module but only declared in another. llvm-svn: 215675
* Don't Lex past EOF when lexing _PragmaReid Kleckner2014-08-141-1/+1
| | | | | | Fixes PR20662. llvm-svn: 215672
* Thread Safety Analysis: fix to improve handling of references to guardedDeLesley Hutchins2014-08-141-20/+34
| | | | | | data members and range based for loops. llvm-svn: 215671
* Use the big endian emulations for NetBSD/arm in EB mode.Joerg Sonnenberger2014-08-141-2/+17
| | | | llvm-svn: 215670
* [AVX512] Add FMA intrinsicsAdam Nemet2014-08-141-0/+66
| | | | | | Part of <rdar://problem/17688758> llvm-svn: 215666
* Use the proper post-order traversal in LiveVariables analysis,Artyom Skrobov2014-08-145-39/+69
| | | | | | | | | | | | | | | | to recover the performance after r214064. Also sorts out the naming for PostOrderCFGView, ReversePostOrderCFGView, BackwardDataflowWorklist and ForwardDataflowWorklist, to match the accepted terminology. Also unifies BackwardDataflowWorklist and ForwardDataflowWorklist to share the "worklist for prioritization, post-order traversal for fallback" logic, and to avoid repetitive sorting. Also cleans up comments in the affected area. llvm-svn: 215650
* Revert "CodeGen: When bitfields fall on natural boundaries, split them up"Justin Bogner2014-08-141-9/+2
| | | | | | | | | | | | | | | It fits better with LLVM's memory model to try to do this in the backend. Specifically, narrowing wide loads in the backends should be relatively straightforward and is generally valuable, whereas widening loads tends to be very constrained. Discussion here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140811/112581.html This reverts commit r215614. llvm-svn: 215648
* Delete support for AuroraUX.Rafael Espindola2014-08-148-225/+3
| | | | | | auroraux.org is not resolving. llvm-svn: 215644
* clang-format: Fix AlwaysBreakAfterDefinitionReturnType in Stroutrup styleDaniel Jasper2014-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | Before: template <class T> T *f(T &c) // Problem here: no line break before f { return NULL; } After: template <class T> T * f(T &c) { return NULL; } Patch by Marek Kurdej, thank you! llvm-svn: 215633
* clang-format: Support chained dereferenced assignments.Daniel Jasper2014-08-141-1/+2
| | | | | | | | | | Before: x = * a(x) = *a(y); After: x = *a(x) = *a(y); llvm-svn: 215632
* clang-format: Support breaking arguments of function type typedefs.Daniel Jasper2014-08-141-3/+4
| | | | | | | | | | | | | Before: typedef size_t (*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)( const aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: typedef size_t (*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)( const aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 215631
* Fix a crash when compiling blocks in OpenCL with multiplePekka Jaaskelainen2014-08-141-1/+7
| | | | | | address spaces. llvm-svn: 215629
OpenPOWER on IntegriCloud