summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug where we were recursing on friend decls for friendCraig Silverstein2010-11-061-0/+6
| | | | | | | | functions, but not for friend types. Reviewed by wan llvm-svn: 118323
* Add PPCallbacks for #if/#ifdef/etc.Craig Silverstein2010-11-062-16/+111
| | | | | | | | | | | The callback info for #if/#elif is not great -- ideally it would give us a list of tokens in the #if, or even better, a little parse tree. But that's a lot more work. Instead, clients can retokenize using Lexer::LexFromRawLexer(). Reviewed by nlewycky. llvm-svn: 118318
* When determining which template partial specialization is more specialized,Argyrios Kyrtzidis2010-11-052-2/+35
| | | | | | make sure to setup the instantiation stack. Fixes rdar://8620775 & http://llvm.org/PR8234 llvm-svn: 118314
* When searching for an instantiated declaration requires instantiationDouglas Gregor2010-11-052-0/+23
| | | | | | | | of its parent context, be sure to update the parent-context pointer after instantiation. Fixes two anonymous-union instantiation issues in <rdar://problem/8635664>. llvm-svn: 118313
* Check for an invalid field earlier in a constructor's initializationDouglas Gregor2010-11-051-3/+3
| | | | | | | | | | | of that field. Otherwise, we can end up building and later trying to instantiate a dependent member initializer that will fail at instantiation time. Unfortunately, I've only managed to trigger this bug with very large sources, so there's no test case :( llvm-svn: 118306
* Don't write an empty DIAG_USER_MAPPINGS record.Argyrios Kyrtzidis2010-11-051-1/+2
| | | | llvm-svn: 118305
* Read/write from/to PCH the diagnostic mappings that the user set so that ↵Argyrios Kyrtzidis2010-11-057-1/+72
| | | | | | | | e.g. #pragma clang diagnostic can be used in a PCH. Fixes rdar://8435969. llvm-svn: 118303
* Initialize the array with the "C++ way".Argyrios Kyrtzidis2010-11-051-3/+1
| | | | llvm-svn: 118302
* Teach clang_getCursorReferenced() that aDouglas Gregor2010-11-054-6/+21
| | | | | | | | CXXConstructorExpr/CXXTemporaryObjectExpr references the constructor it calls. Then, tweak clang_getCursor() to prefer such a call over a type reference to the type being called. llvm-svn: 118297
* Put class into an anonymous namespace.Benjamin Kramer2010-11-051-0/+2
| | | | llvm-svn: 118293
* Proper rewriting of block envokation with Fariborz Jahanian2010-11-052-1/+19
| | | | | | | qualified ObjC pointer types in its argument list. // rdar: //8608902 llvm-svn: 118286
* libclang: Enable requesting a larger stack for several libclang entry pointsDaniel Dunbar2010-11-051-1/+2
| | | | | | using "safety" threads. llvm-svn: 118278
* Expressions of type std::nullptr_t can be used as sentinels.Anders Carlsson2010-11-052-0/+13
| | | | llvm-svn: 118276
* libclang: Add some support for running certain entry points in a "safety"Daniel Dunbar2010-11-053-4/+43
| | | | | | | thread, primarily to get a larger stack. - Yes, I feel dirty. llvm-svn: 118274
* Fix 80-col violas.Daniel Dunbar2010-11-051-9/+11
| | | | llvm-svn: 118273
* Implement [over.ics.rank]p4: A conversion that does not convert an ↵Anders Carlsson2010-11-052-2/+18
| | | | | | std::nullptr_t to bool is better than one than does. llvm-svn: 118269
* Adjust return type of thread_runner.Benjamin Kramer2010-11-041-2/+1
| | | | llvm-svn: 118259
* Use the real keyword location when rebuilding an elaborated type instead ofJohn McCall2010-11-042-7/+11
| | | | | | making something up. Fixes PR8129. llvm-svn: 118258
* Pass a -I flag when compiling nullptr.cpp so the typeinfo header can be ↵Anders Carlsson2010-11-041-1/+1
| | | | | | found. This should fix the errors seen on the bot. llvm-svn: 118246
* Don't be so eager to replace UsingDecls in a DeclContext's lookup table;Argyrios Kyrtzidis2010-11-042-0/+22
| | | | | | check that the TargetNestedNameDecl is the same first. llvm-svn: 118239
* std::nullptr_t is a fundamental type for RTTI purposes.Anders Carlsson2010-11-044-58/+106
| | | | llvm-svn: 118238
* Mangle std::nullptr_t as specified by the Itanium C++ ABI.Anders Carlsson2010-11-042-3/+7
| | | | llvm-svn: 118236
* Don't instantiate members not belonging in the semantic context of the template.Argyrios Kyrtzidis2010-11-042-0/+25
| | | | | | | | | | | | | | | e.g. for: template <int i> class A { class B *g; }; 'class B' has the template as lexical context but semantically it is introduced in namespace scope. Fixes rdar://8611125 & http://llvm.org/PR8505 llvm-svn: 118235
* It's OK to use nullptr in relational operators if the other side is a null ↵Anders Carlsson2010-11-042-6/+11
| | | | | | pointer constant. llvm-svn: 118234
* c-index-test: Switch to using clang_executeOnThread instead of mucking aboutDaniel Dunbar2010-11-041-27/+1
| | | | | | with system specific stuff. llvm-svn: 118224
* libclang: Add clang_executeOnThread, for use in c-index-test (and only there,Daniel Dunbar2010-11-044-0/+10
| | | | | | preferably). Good thing c-index-test is written in C!!!! llvm-svn: 118223
* add a comment to my last commitDouglas Gregor2010-11-041-0/+1
| | | | llvm-svn: 118212
* When canonicalizing nested-name-specifiers involving dependent namesDouglas Gregor2010-11-042-3/+44
| | | | | | | | | or dependent specializations, rip apart the dependent name/dependent specialization to recanonicalize its pieces, because nested-name-specifiers store "dependent-type::identifier" differently than types do. Fixes PR7419. llvm-svn: 118211
* Fixes a rewriting bug when type in a block argument typeFariborz Jahanian2010-11-032-3/+11
| | | | | | is a objc qualified class type. // rdar: //8608902 llvm-svn: 118208
* Patch to rewrite objc qualified types which occur inFariborz Jahanian2010-11-032-7/+77
| | | | | | | block pointer type arguments. Partial fix for // rdar: //8608902 llvm-svn: 118205
* Implement -working-directory.Argyrios Kyrtzidis2010-11-0338-104/+398
| | | | | | | | | | | | | | | | | | | When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. llvm-svn: 118203
* Fix an assertion.Argyrios Kyrtzidis2010-11-031-1/+1
| | | | llvm-svn: 118202
* Make this error less specific but also less likely to cause confusion. FixesNick Lewycky2010-11-035-11/+15
| | | | | | PR7702. llvm-svn: 118181
* When producing overload candidates for binary built-in operators, keepDouglas Gregor2010-11-032-123/+278
| | | | | | | | | the sets of available conversions for the first and second arguments separate. This is apparently the indent of C++ [over.built], and reduces the number of overload candidates generated, eliminating some ambiguities. Fixes PR8477. llvm-svn: 118178
* Some fixes for synthesized ivar metadata (GNU runtime).David Chisnall2010-11-032-12/+20
| | | | llvm-svn: 118172
* Added cursor visitor that takes a block as an argument. Tested compilingDavid Chisnall2010-11-033-0/+59
| | | | | | | libclang with both clang -fblocks and gcc (no blocks support). Only exposed in the header to compilers that do have blocks support. llvm-svn: 118170
* fix test case.Zhongxing Xu2010-11-031-473/+457
| | | | llvm-svn: 118166
* Do not add elidable CXXConstructExpr as block-level expr.Zhongxing Xu2010-11-031-1/+2
| | | | llvm-svn: 118165
* Added generating destructors for temporary objects. Two cases I know of, ↵Marcin Swiderski2010-11-033-31/+891
| | | | | | | | | that are not handled properly: 1. For statement: const C& c = C(0) ?: C(1) destructors generated for condition will not differ from those generated for case without prolonged lifetime of temporary, 2. There will be no destructor for constant reference member bound to temporary at the exit from constructor. llvm-svn: 118158
* Revert while I debug test failures :-(Rafael Espindola2010-11-035-490/+20
| | | | llvm-svn: 118150
* Switch clang to run ld directly on linux. I tested this on all the linuxRafael Espindola2010-11-035-20/+490
| | | | | | | | | | | | | | | | | | | | | | distros listed by running gcc main.o -o main g++ main.o -o main gcc main.o -o main -static g++ main.o -o main -static gcc f.o -o f.so -shared g++ f.o -o f.so -shared and comparing the ld line with the one created by clang. I also added -m32/m64 in distros that support it. While I tested many distros, there will always be more. If you are hit by this it should be somewhat easy to add your distro. If you are in a hurry, do revert this, but please inform how to detect you distro and the ld command lines produced by the above gcc invocations. Most distros have some patches on gcc :-( llvm-svn: 118149
* When setting a tied check if it's already tied. If it's tied to another ↵Anders Carlsson2010-11-032-2/+18
| | | | | | constraint it's invalid. Fixes PR3905. llvm-svn: 118146
* A number in an input constraint can't point to a read-write ('+') ↵Anders Carlsson2010-11-032-0/+10
| | | | | | constraint. Fixes PR3904. llvm-svn: 118145
* Provide an error when a non-identifier name (such as an operator) is used as aAlexis Hunt2010-11-033-1/+16
| | | | | | | | parameter name. Fixes PR8012. llvm-svn: 118138
* Improve source-location information for CXXConstructExpr nodes, byDouglas Gregor2010-11-034-5/+77
| | | | | | | | | ensuring that they cover all of their child nodes. There's still a clang_getCursor()-related issue with CXXFunctionalCastExprs with CXXConstructExprs as children (see FIXME in the test case); I'll look at that separately. llvm-svn: 118132
* Don't add Decls with an invalid location to DeclsInContainer.Ted Kremenek2010-11-021-1/+2
| | | | llvm-svn: 118111
* Hack to workaround deficiency in ObjC ASTs. Functions and variables may be ↵Ted Kremenek2010-11-022-28/+172
| | | | | | | | | | | declared within an @implementation, but we have no way to record that information in the AST. This may cause CursorVisitor to miss these Decls when doing a AST walk. Fixes <rdar://problem/8595462>. llvm-svn: 118109
* Tests for inline asm constraints, generic and x86.John Thompson2010-11-022-0/+657
| | | | llvm-svn: 118108
* Add link to LLVM releases page.Daniel Dunbar2010-11-021-0/+6
| | | | llvm-svn: 118095
* Fixes an assertion violation when bind to temporaryFariborz Jahanian2010-11-023-3/+30
| | | | | | | expression is a dependent expression. // rdar: // 8620524 and PR7851 llvm-svn: 118066
OpenPOWER on IntegriCloud