summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert r184205 and associated patches while investigating issue with broken ↵Stephen Lin2013-06-1910-135/+208
| | | | | | | | buildbot (possible interaction with LTO) <rdar://problem/14209661> llvm-svn: 184384
* Remove dead code.Eli Friedman2013-06-191-10/+0
| | | | llvm-svn: 184379
* Improve diagnostic for redeclaring static member function. Fixes PR16382.Eli Friedman2013-06-191-1/+1
| | | | llvm-svn: 184378
* Fix for PR 16367, display the name of a function in a diagnostic instead ofRichard Trieu2013-06-191-1/+1
| | | | | | showing "(null)". llvm-svn: 184377
* Debug Info: PR14763/r183329 - specify that non-trivial pass-by-value ↵David Blaikie2013-06-191-0/+3
| | | | | | | | | | parameters are stored indirectly This is to fix the location information for such parameters to refer to the object accessible through the pointer rather than to the pointer parameter itself. llvm-svn: 184367
* Fixed long-standing issue with incorrect length calculation of multi-line ↵Alexander Kornienko2013-06-191-5/+5
| | | | | | | | | | | | | | | | | | | | | comments. Summary: A trailing block comment having multiple lines would cause extremely high penalties if the summary length of its lines is more than the column limit. Fixed by always considering only the last line of a multi-line block comment. Removed a long-standing FIXME from relevant tests and added a motivating test modelled after problem cases from real code. Reviewers: klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1010 llvm-svn: 184340
* Delete dead code. (Array element types are always complete in C.)Eli Friedman2013-06-191-7/+0
| | | | llvm-svn: 184332
* Enhancements for the DynTypedNodeSamuel Benzaquen2013-06-192-0/+57
| | | | | | | | | | Added ASTNodeKind as a standalone way to represent node kinds and their hierarchy. This change is to support ongoing work on D815. Reviewers: klimek CC: cfe-commits llvm-svn: 184331
* Corrections to r184205 ('this'-return optimization) due to the wrong version ↵Stephen Lin2013-06-195-89/+75
| | | | | | | | | of the patch being committed originally. 1) Removed useless return value of CGCXXABI::EmitConstructorCall and CGCXXABI::EmitVirtualDestructorCall and implementations 2) Corrected last portion of CodeGenCXX/constructor-destructor-return-this to correctly test for non-'this'-return of virtual destructor calls llvm-svn: 184330
* documentation parsing: patch to make @class work forFariborz Jahanian2013-06-191-3/+21
| | | | | | | class templates; and similarly, @function works for function templates. // rdar://14124702 llvm-svn: 184329
* Revert "Adds support for openSUSE ARM v5/v7 triples."Renato Golin2013-06-191-2/+0
| | | | | | This reverts commit 312e51ca484976c2b1254952ff23d5162ca8edc2. llvm-svn: 184324
* Adds support for openSUSE ARM v5/v7 triples.Renato Golin2013-06-191-0/+2
| | | | | | | | Now, with a comma. Patch by İsmail Dönmez llvm-svn: 184323
* [CodeGen] Move EHScopeStack into its own headerReid Kleckner2013-06-193-463/+498
| | | | | | | CGCleanup.h isn't meant to be included by all of CodeGen according to John. llvm-svn: 184321
* [Windows] Fix __declspec(property) when the getter returns a refReid Kleckner2013-06-191-1/+2
| | | | | | | | This fixes an issue when parsing atlbase.h. Patch by Will Wilson! llvm-svn: 184319
* Completely revamp node binding for AST matchers.Manuel Klimek2013-06-192-100/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for the backwards references to bound nodes, which will expose a lot more about how matches occur. Main changes: - instead of building the tree of bound nodes, we build a "set" of bound nodes and explode all possible match combinations while running through the matchers; this will allow us to also implement matchers that filter down the current set of matches, like "equalsBoundNode" - take the set of bound nodes at the start of the match into consideration when doing memoization; as part of that, reevaluated that memoization gives us benefits that are large enough (it still does - the effect on common match patterns is up to an order of magnitude) - reset the bound nodes when a node does not match, thus never leaking information from partial sub-matcher matches for failing matchers Effects: - we can now correctly "explode" combinatorial matches, for example: allOf(forEachDescendant(...bind("a")), forEachDescendant(...bind("b"))) will now trigger matches for all combinations of matching "a" and "b"s. - we now never expose bound nodes from partial matches in matchers that did not match in the end - this fixes a long-standing issue FIXMEs: - rename BoundNodesTreeBuilder to BoundNodesBuilder or BoundNodesSetBuilder, as we don't build a tree any more; this is out of scope for this change, though - we're seeing some performance regressions (around 10%), but I expect some performance tuning will get that back, and it's easily worth the increase in expressiveness for now llvm-svn: 184313
* Don't depend on PathV1.h including set.Rafael Espindola2013-06-191-0/+1
| | | | llvm-svn: 184310
* [ms-cxxabi] Emit and install appropriately mangled vbtablesReid Kleckner2013-06-1911-26/+499
| | | | | | | | | | | | | | | | | | | | | | | | | In Itanium, dynamic classes have one vtable with several different address points for dynamic base classes that can't share vtables. In the MS C++ ABI, each vbtable that can't be shared gets its own symbol, similar to how ctor vtables work in Itanium. However, instead of mangling the subobject offset into the symbol, the unique portions of the inheritance path are mangled into the symbol to make it unique. This patch implements the MSVC 2012 scheme for forming unique vbtable symbol names. MSVC 2010 use the same mangling with a different subset of the path. Implementing that mangling and possibly others is TODO. Each vbtable is an array of i32 offsets from the vbptr that points to it to another virtual base subobject. The first entry of a vbtable always points to the base of the current subobject, implying that it is the same no matter which parent class contains it. Reviewers: rjmccall Differential Revision: http://llvm-reviews.chandlerc.com/D636 llvm-svn: 184309
* [Driver] Don't forward source file input args to gccReid Kleckner2013-06-191-1/+4
| | | | | | | | | | | | | | | | | | | gcc's inputs are already added by the InputInfoList passed to Action::ConstructJob. Fixes a regression from r183989. This was manifesting when targetting mingw as an extra input argument to gcc when assembling. It presumably affects other situations where clang calls gcc. Prior to r183989, forwardToGCC() was returning false because the INPUT option defined in OptParser.td had the DriverOption flag set on it. LLVM's Option library does not set this flag for INPUT. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D999 llvm-svn: 184308
* Revert r184302 on Renato's behalf - it broke the bots and he's asked me to ↵James Molloy2013-06-191-2/+0
| | | | | | revert as he's unavailable. llvm-svn: 184307
* Split long strings on word boundaries.Alexander Kornienko2013-06-191-0/+5
| | | | | | | | | | | | Summary: Split strings at word boundaries, when there are no spaces and slashes. Reviewers: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1003 llvm-svn: 184304
* Adds support for openSUSE ARM v5/v7 triples.Renato Golin2013-06-191-0/+2
| | | | | | Patch by İsmail Dönmez llvm-svn: 184302
* Fix pr16354.Rafael Espindola2013-06-191-1/+21
| | | | | | | | | | | We now reject things like struct ABC { static double a; }; register double ABC::a = 1.0; llvm-svn: 184300
* Silence 'set but not used' warning when building in release mode using gcc.Andy Gibbs2013-06-191-0/+1
| | | | llvm-svn: 184299
* Use llvm::sys::fs::can_execute.Rafael Espindola2013-06-191-5/+10
| | | | llvm-svn: 184297
* Fix a crash in the static analyzer (bug #16307)Pavel Labath2013-06-192-2/+28
| | | | | | | | | | | | | | | Summary: When processing a call to a function, which got passed less arguments than it expects, the analyzer would crash. I've also added a test for that and a analyzer warning which detects these cases. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D994 llvm-svn: 184288
* Fix a warning. [-Wunused-variable]NAKAMURA Takumi2013-06-191-2/+2
| | | | llvm-svn: 184284
* Revert r184249, "doc. parsing: Allow parameter name "..." for variadic ↵NAKAMURA Takumi2013-06-191-15/+1
| | | | | | | | | | | functions/methods." It crashes in the case; /// Without any "param"s in the description. int printf(const char *format, ...); llvm-svn: 184283
* Delete dead code.Eli Friedman2013-06-191-37/+0
| | | | llvm-svn: 184277
* Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4Manman Ren2013-06-193-1/+22
| | | | | | | | These options will add a module flag with name "Dwarf Version". The behavior flag is currently set to Warning, so when two values disagree, a warning will be emitted. llvm-svn: 184276
* Add some comments to r184252.Adrian Prantl2013-06-181-0/+5
| | | | | | rdar://problem/14101097 llvm-svn: 184259
* [analyzer] Do not create a CompoundVal for lvalue InitListExprs.Anna Zaks2013-06-181-4/+7
| | | | | | These should be treated like scalars. This fixes a crash reported in radar://14164698. llvm-svn: 184257
* [analyzer] Do not report uninitialized value warnings inside swap functions.Anna Zaks2013-06-182-0/+17
| | | | | | | | | | This silences warnings that could occur when one is swapping partially initialized structs. We suppress not only the assignments of uninitialized members, but any values inside swap because swap could potentially be used as a subroutine to swap class members. This silences a warning from std::try::function::swap() on partially initialized objects. llvm-svn: 184256
* Emit forward decls for structs with declarations only when we areAdrian Prantl2013-06-181-1/+1
| | | | | | | | | | limiting debug info. FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info. rdar://problem/14101097 llvm-svn: 184252
* Introduce a new mangling for protocol-qualified ObjC types in C++. This allowsEli Friedman2013-06-182-38/+16
| | | | | | | | | | | | to provide proper overloading, and also prevents mangling conflicts with template arguments of protocol-qualified type. This is a non-backward-compatible mangling change, but per discussion with John, the benefits outweigh this cost. Fixes <rdar://problem/14074822>. llvm-svn: 184250
* doc. parsing: Allow parameter name "..." for variadic functions/methods.Fariborz Jahanian2013-06-181-1/+15
| | | | | | // rdar://14124644 llvm-svn: 184249
* Make sure the assembler-with-cpp hack for "#" works with multiple "#"s inEli Friedman2013-06-181-0/+2
| | | | | | succession. Fixes PR16363. llvm-svn: 184240
* When declaring an ObjC interface decl with a @compatibility_alias alias ↵Argyrios Kyrtzidis2013-06-181-1/+36
| | | | | | | | | | | | | | | | | | name, change the class name to the "real" one. If we have something like @class NewImage; @compatibility_alias OldImage NewImage; @class OldImage; the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage"). In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"), instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants. Fixes crash of rdar://14112291. llvm-svn: 184238
* Use llvm::sys::fs::can_write.Rafael Espindola2013-06-182-2/+4
| | | | llvm-svn: 184234
* [multiprecision-builtins] Added missing builtin __builtin_{add,sub}cb for ↵Michael Gottesman2013-06-181-0/+4
| | | | | | | | | | | | | | {add,sub} with carry for bytes. I have had several people ask me about why this builtin was not available in clang (since it seems like a logical conclusion). This patch implements said builtins. Relevant tests are included as well. I also updated the Clang language extension reference. rdar://14192664. llvm-svn: 184227
* DR14, DR101, and part of DR1: fix handling of extern "C" declarations inRichard Smith2013-06-181-34/+40
| | | | | | | namespaces, by treating them just like we treat extern "C" declarations in function scope. llvm-svn: 184223
* Use llvm::sys::fs::GetUniqueID.Rafael Espindola2013-06-181-15/+22
| | | | llvm-svn: 184218
* Correctly compute the index of the first string format argument when decidingEli Friedman2013-06-181-1/+1
| | | | | | whether to emit a -Wformat-security warning. <rdar://problem/14178260>. llvm-svn: 184214
* PR14503: Don't assert if a constexpr constructor temploid instantiates to aRichard Smith2013-06-181-0/+5
| | | | | | | constructor that does not initialize all members, and that constructor is used to initialize a global. llvm-svn: 184211
* Objective-C: Fixes a typo correction bug where aFariborz Jahanian2013-06-182-3/+5
| | | | | | | selector would be correted to identical selector name in certain corner cases. // rdar://7853549 llvm-svn: 184208
* CodeGen: Have 'this'-returning constructors and destructors to take ↵Stephen Lin2013-06-189-175/+116
| | | | | | | | | | advantage of the new backend 'returned' attribute. The backend will now use the generic 'returned' attribute to form tail calls where possible, as well as avoid save-restores of 'this' in some cases (specifically the cases that matter for the ARM C++ ABI). This patch also reverts a prior front-end only partial implementation of these optimizations, since it's no longer required. llvm-svn: 184205
* Objective-C [qoi]: privide typo correction for selectorsFariborz Jahanian2013-06-182-15/+39
| | | | | | | | in addition of receiver having static type, but also when receiver has dynamic type (of 'id' variety) as well as when receiver is of 'Class' type vareity. // rdar://7853549 llvm-svn: 184195
* Update to pass in pointers intead of references.Bill Wendling2013-06-181-1/+1
| | | | llvm-svn: 184176
* size_t on Darwin AAPCS targets is "unsigned long". <rdar://problem/14136459>Bob Wilson2013-06-181-0/+3
| | | | | | | | Some embedded targets use ARM's AAPCS with iOS header files that define size_t as unsigned long, which conflicts with the usual AAPCS definition of size_t as unsigned int. llvm-svn: 184171
* contextual conversion fix: C++98 compatibility warning.Larisse Voufo2013-06-181-2/+3
| | | | llvm-svn: 184167
* Add support for -fpcc-struct-return. Patch by Arthur O'Dwyer!John McCall2013-06-183-22/+68
| | | | llvm-svn: 184166
OpenPOWER on IntegriCloud