summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Don't remove the break/continue scope of a for loop until after we'veDouglas Gregor2010-05-211-4/+2
| | | | | | | | emitted the increment expression. Fixes PR7189. If someone knows how to write a useful test for this, I'd be grateful. llvm-svn: 104335
* TypeVisitor doesn't visit Stmts.Nick Lewycky2010-05-211-2/+2
| | | | llvm-svn: 104332
* When generating the call arguments in a thunk to call the thunkee, doDouglas Gregor2010-05-212-3/+54
| | | | | | | | not make copies non-POD arguments or arguments passed by reference: just copy the pointers directly. This eliminates another source of the dreaded memcpy-of-non-PODs. Fixes PR7188. llvm-svn: 104327
* Changed test to use FileCheck.Fariborz Jahanian2010-05-211-5/+10
| | | | llvm-svn: 104319
* Teach the RecursiveASTVisitor to enter parts of the AST previously missed.Chandler Carruth2010-05-211-94/+184
| | | | | | | | | | | | | | | Factor its implementation to ease the addition of these custom edges to traverse. With this patch we get initializer expressions, block bodies, type source info, and function argument, result, and exception types. There are probably still some more missed edges. While we're here, clean up and flesh out a bunch of comments. Patch by Zhanyong Wan; I've done a cursory review, but further review appreciated. This is fast becoming one of the most important public APIs to the AST. llvm-svn: 104315
* Add braces to avoid an ambiguous else, fixing a GCC warning.Chandler Carruth2010-05-211-1/+2
| | | | llvm-svn: 104314
* Allocate space in a block record for implicit references to the Objective CJohn McCall2010-05-215-115/+131
| | | | | | | | | | 'self' variable arising from uses of the 'super' keyword. Also reorganize some code so that BlockInfo (now CGBlockInfo) can be opaque outside of CGBlocks.cpp. Fixes rdar://problem/8010633. llvm-svn: 104312
* When emitting an lvalue for an anonymous struct or union member duringJohn McCall2010-05-214-2/+62
| | | | | | | class initialization, drill down through an arbitrary number of anonymous records. llvm-svn: 104310
* Introduce a method to get from an anonymous struct or union record declarationJohn McCall2010-05-213-30/+17
| | | | | | to the associated object declaration. llvm-svn: 104309
* When instantiating anonymous structs/unions within a function, makeDouglas Gregor2010-05-212-1/+36
| | | | | | | | | sure that the anonymous struct/union record declaration gets instantiated before the variable declaration, and that it and its fields (recursively) get entries in the local instantiation map. Fixes PR7088. llvm-svn: 104305
* docs: Man page tweaks, to mention the integrated assembler and theDaniel Dunbar2010-05-211-6/+19
| | | | | | -integrated-as and -no-integrated-as options. llvm-svn: 104304
* Fix __crashreport_info__ declaration.Daniel Dunbar2010-05-201-1/+2
| | | | llvm-svn: 104301
* Fix a crasher in constructor-initializer reordering warnings (PR7179).Douglas Gregor2010-05-202-3/+11
| | | | llvm-svn: 104299
* make -Wc++-hex-floats be a member of -Wc++0x-compat,Chris Lattner2010-05-202-2/+4
| | | | | | thanks to doug for pointing this out! llvm-svn: 104297
* Generate objc_memmove_collectable write-barrier for Fariborz Jahanian2010-05-202-2/+17
| | | | | | classes whose base class have GC'able object pointers. llvm-svn: 104296
* Don't warn about use of hex floats in c++ mode by default,Chris Lattner2010-05-202-4/+4
| | | | | | | | | matching G++'s behavior. Warn when -pedantic or -Wc++-hex-floats is passed, and don't warn if -pedantic -Wno-c++-hex-floats are both passed. llvm-svn: 104295
* Be sure to apply initializers to members of anonymous structs and unionsJohn McCall2010-05-202-61/+110
| | | | | | | | recursively, e.g. so that members of anonymous unions inside anonymous structs still get initialized. Also generate default constructor calls for anonymous struct members when necessary. llvm-svn: 104292
* Improve parser recovery when a switch condition is invalid; fixesDouglas Gregor2010-05-202-3/+16
| | | | | | <rdar://problem/7971948>. llvm-svn: 104291
* Add a new failure kind, FK_Incomplete, to InitializationSequence, toDouglas Gregor2010-05-204-2/+18
| | | | | | | | | capture failures when we try to initialize an incomplete type. Previously, we would (ab)use FK_ConversionFailed, then occasionally dereference a null pointer when trying to diagnose the failure. Fixes <rdar://problem/7959007>. llvm-svn: 104286
* Driver: Switch to using the integrated assembler for standalone assembly jobsDaniel Dunbar2010-05-201-2/+18
| | | | | | (or -save-temps), when the integrated assembler is enabled. llvm-svn: 104282
* Adds support for generation of objc_memmove_collectable APIFariborz Jahanian2010-05-202-1/+53
| | | | | | in Objective-C++ mode. llvm-svn: 104281
* Driver: Add a tool definition for the Clang integrated assembler.Daniel Dunbar2010-05-202-0/+72
| | | | llvm-svn: 104280
* Reinstate r104117, Chandler Carruth's change that "[provides] a namingDouglas Gregor2010-05-204-12/+31
| | | | | | | class for UnresolvedLookupExprs, even when occuring on template names" along with a fix for an Objective-C++ crasher it introduced. llvm-svn: 104277
* More Objective-C++ GC tests.Fariborz Jahanian2010-05-2014-3/+33
| | | | llvm-svn: 104253
* clang -cc1as: Add -help, -version, and -mllvm support.Daniel Dunbar2010-05-202-1/+52
| | | | | | Also, fix output defaulting to match llvm-mc. llvm-svn: 104246
* Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts ↵Daniel Dunbar2010-05-2011-10/+498
| | | | | | approximately the same interface as 'llvm-mc'. llvm-svn: 104239
* Driver: Move some argument lookup utilities into driver::ArgList.Daniel Dunbar2010-05-203-72/+92
| | | | llvm-svn: 104237
* Copy construction of non-trivial properties must notFariborz Jahanian2010-05-202-8/+4
| | | | | | be turned into a setter call (fixes radar 8008649). llvm-svn: 104235
* Picky, pickyDouglas Gregor2010-05-201-1/+1
| | | | llvm-svn: 104230
* Fix a thinkoDouglas Gregor2010-05-201-1/+1
| | | | llvm-svn: 104229
* Assert that we do not try to memcpy a non-POD class type in C++. ThisDouglas Gregor2010-05-201-1/+7
| | | | | | | | | | | | | | particular issue was the cause of the Boost.Interprocess failures, and in general will lead to horrendous, hard-to-diagnose miscompiles. The assertion itself has survives self-host and a full Boost build, so we are close to eradicating this problem in C++. Note that the assertion is *not* turned on for Objective-C++, where we still have problems with introducing memcpy's of non-POD class types. That part of the assertion will go away as soon as we fix the known issues in Objective-C++. llvm-svn: 104227
* Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo.Abramo Bagnara2010-05-204-26/+46
| | | | llvm-svn: 104226
* Fix my inability to spell 'continue' and a case where message sends ↵David Chisnall2010-05-201-4/+7
| | | | | | returning non-pointer-sized things were generating invalid IR inside @try blocks. llvm-svn: 104222
* Renamed misleading getSourceRange -> getLocalSourceRange and ↵Abramo Bagnara2010-05-2016-47/+47
| | | | | | getFullSourceRange -> getSourceRange for TypeLoc. llvm-svn: 104220
* Rework our handling of binding a reference to a temporaryDouglas Gregor2010-05-202-19/+154
| | | | | | | | | | | | | | | | | | | | subobject. Previously, we could only properly bind to a base class subobject while extending the lifetime of the complete object (of a derived type); for non-static data member subobjects, we could memcpy (!) the result and bind to that, which is rather broken. Now, we pull apart the expression that we're binding to, to figure out which subobject we're accessing, then construct the temporary object (adding a destruction if needed) and, finally, dig out the subobject we actually meant to access. This fixes yet another instance where we were memcpy'ing rather than doing the right thing. However, note the FIXME in references.cpp: there's more work to be done for binding to subobjects, since the AST is incorrectly modeling some member accesses in base classes as lvalues when they are really rvalues. llvm-svn: 104219
* Whoops.John McCall2010-05-201-1/+1
| | | | llvm-svn: 104218
* Don't try to check jump scopes in invalid functions. FixesJohn McCall2010-05-201-1/+3
| | | | | | <rdar://problem/7995494>. llvm-svn: 104217
* When creating a this-adjustment thunk where the return value is of C++Douglas Gregor2010-05-202-6/+54
| | | | | | | | | class type (that uses a return slot), pass the return slot to the callee directly rather than allocating new storage and trying to copy the object. This appears to have been the cause of the remaining two Boost.Interprocess failures. llvm-svn: 104215
* Add libclang function 'clang_isFromMainFile()' (which just wraps ↵Ted Kremenek2010-05-204-0/+15
| | | | | | SourceManager::isFromMainFile()). llvm-svn: 104208
* Remove accidental commitDouglas Gregor2010-05-202-20/+2
| | | | llvm-svn: 104207
* Various small fixes for construction/destruction of Objective-C++Douglas Gregor2010-05-207-6/+75
| | | | | | | | | | instance variables: - Use isRecordType() rather than isa<RecordType>(), so that we see through typedefs in ivar types. - Mark the destructor as referenced - Perform C++ access control on the destructor llvm-svn: 104206
* Expose -fobjc-nonfragile-abi2 as a top-level clang driver option. Fixes ↵Ted Kremenek2010-05-201-0/+5
| | | | | | <rdar://problem/8007063>. llvm-svn: 104205
* Support implicitly closing on 'this' in a block. Fixed PR7165.John McCall2010-05-209-164/+284
| | | | | | (the codegen works here, too, but that's annoying to test without execution) llvm-svn: 104202
* just add a fixme for the StructuredArgs leak, it shouldn't affectChris Lattner2010-05-201-0/+1
| | | | | | c++'03 code and variadic support "needs work". llvm-svn: 104195
* switch TemplateArgumentListBuilder to hold its flat argument list in a ↵Chris Lattner2010-05-202-23/+12
| | | | | | | | | | | | | | | | | | | | | smallvector instead of new[]'d. This greatly reduces the number of new[]'s, and guess what, they were all leaked. This adds a fixme in this hunk: unsigned NumPackArgs = NumFlatArgs - PackBeginIndex; + // FIXME: NumPackArgs shouldn't be negative here??? if (NumPackArgs) - PackArgs = &FlatArgs[PackBeginIndex]; + PackArgs = FlatArgs.data()+PackBeginIndex; where test/SemaTemplate/variadic-class-template-2.cpp is accessing the vector out of range and NumPackArgs is negative. I assume variadic template args are completely hosed. llvm-svn: 104194
* fix the TemplateArgumentList copy constructor to notChris Lattner2010-05-203-8/+17
| | | | | | | be a copy constructor (since it isn't one semantically) and fix the ownership bits it sets to be correct! llvm-svn: 104192
* Clarify TemplateArgumentList ownership over its "flat" and Chris Lattner2010-05-202-15/+25
| | | | | | | "structure" arg lists, the first step to fixing some massive memory leaks. llvm-svn: 104191
* tweak to (hopefully) fix darwin[89] buildbots. Thanks to Doug for the ↵Jim Grosbach2010-05-191-1/+1
| | | | | | suggested modification. llvm-svn: 104188
* When a conditional operator is an rvalue of class type, we need toDouglas Gregor2010-05-192-2/+45
| | | | | | | | | | create a temporary copy of both the "true" and "false" results. Fixes the Boost.Interprocess failures. Daniel did all the hard work of tracking down the issue, I get to type up the trivial fix for this horrible miscompile. llvm-svn: 104184
* More tests for ObjC++ GC support.Fariborz Jahanian2010-05-196-0/+22
| | | | llvm-svn: 104176
OpenPOWER on IntegriCloud