summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Split out -Wconversion warnings about constant precision into theirJohn McCall2010-11-094-23/+32
| | | | | | | | | | | own subcategory, -Wconstant-conversion, which is on by default. Tweak the constant folder to give better results in the invalid case of a negative shift amount. Implements rdar://problem/6792488 llvm-svn: 118636
* Test moved to its correct place.Fariborz Jahanian2010-11-091-0/+12
| | | | llvm-svn: 118635
* Restore patch reversed in r118475. FixesFariborz Jahanian2010-11-092-1/+4
| | | | | | // rdar://8632525 llvm-svn: 118634
* Attempt to resolve overloaded functions in comma expressions andDouglas Gregor2010-11-091-0/+14
| | | | | | conditional operators. Fixes PR7863. llvm-svn: 118631
* Issues good diagnostic when @end is missing.Fariborz Jahanian2010-11-091-0/+10
| | | | | | // rdar://8283484 llvm-svn: 118629
* fix PR8380, a crash on invalid due to an illogical DeclSpec SourceRange ↵Chris Lattner2010-11-091-0/+11
| | | | | | being constructed. llvm-svn: 118625
* Revert the fix for PR8013.Douglas Gregor2010-11-092-12/+2
| | | | | | | | | | | | | That bug concerned the well-formedness of code such as (&ovl)(a, b, c). GCC rejects the code, while EDG accepts it. On further study of the standard, I see no support for EDG's position: in particular, C++ [over.over] does not list this as a context where we can take the address of an overloaded function, C++ [over.call.func] does not reference the address-of operator at any point, and C++ [expr.call] claims that the function argument in a call is either a function lvalue or a pointer-to-function; (&ovl) is neither. llvm-svn: 118620
* Use the right calling convention when mangling names in the Microsoft C++Charles Davis2010-11-091-5/+3
| | | | | | | | mangler. Now member functions and pointers thereof have their calling convention mangled as __thiscall if they have the default CC (even though, they technically still have the __cdecl CC). llvm-svn: 118598
* Handle overload resolution when calling an overloaded function setDouglas Gregor2010-11-092-2/+12
| | | | | | with, e.g., (&f)(a, b, c). Fixes PR8013. llvm-svn: 118508
* Make #pragma unused work for static local variables.Douglas Gregor2010-11-091-0/+6
| | | | llvm-svn: 118500
* ntroduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-093-3/+9
| | | | | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. Take 2: this time, adjusted tests appropriately and used a "simple" approach to the spelling location. llvm-svn: 118495
* Revert r118492, which didn't update all of its tests accordinglyDouglas Gregor2010-11-091-8/+1
| | | | llvm-svn: 118494
* Introduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-1/+8
| | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. llvm-svn: 118492
* Teach code completion not to include out-of-line declarations andDouglas Gregor2010-11-091-2/+4
| | | | | | | definitions in its results. The original declarations will be visible wherever they are declared. llvm-svn: 118484
* Fix the test for Release.Argyrios Kyrtzidis2010-11-091-1/+1
| | | | llvm-svn: 118483
* Add __nullptr as a C++0x nullptr literal, available in C++98Douglas Gregor2010-11-091-0/+3
| | | | llvm-svn: 118482
* Fix source locations in unnamed bitfield diagnostic, from JakubDouglas Gregor2010-11-091-0/+4
| | | | | | Wieczorek! Fixes PR8025. llvm-svn: 118481
* Remove this test for now.Fariborz Jahanian2010-11-091-3/+0
| | | | llvm-svn: 118476
* Reverse patch for // rdar://8632525. It mightFariborz Jahanian2010-11-091-1/+1
| | | | | | has broken a build. llvm-svn: 118475
* Remove space from rdar URIs.Fariborz Jahanian2010-11-0912-14/+14
| | | | llvm-svn: 118474
* Teach AttrNonNullChecker about transparent unions. Fixes crash reported in ↵Ted Kremenek2010-11-091-0/+14
| | | | | | <rdar://problem/8642434>. llvm-svn: 118473
* Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.Argyrios Kyrtzidis2010-11-091-1/+14
| | | | | | Fixes rdar://8644873 & http://llvm.org/PR8567. llvm-svn: 118468
* When re-using a vtable slot for the nearest overridden method, just becauseJohn McCall2010-11-091-0/+19
| | | | | | | | | | | | there's no return adjustment from the overridden to the overrider doesn't mean there isn't a return adjustment from the overrider to the final overrider. This matters if we're emitting a virtual this-adjustment thunk because the overrider virtually inherits from the class providing the nearest overridden method. Do the appropriate return adjustment in this case. Fixes PR7611. llvm-svn: 118466
* Don't lose track of previous-declarations when instantiating a class template.Nick Lewycky2010-11-081-0/+18
| | | | | | Fixes PR8001. llvm-svn: 118454
* Provide a precise builtin declaration for objc_msgSendFariborz Jahanian2010-11-082-1/+4
| | | | | | to avoid a bogus warning. Fixes //rdar: //8632525 llvm-svn: 118451
* Add CursorVisitor::VisitBinaryOperator() to explicitly handle the case where ↵Ted Kremenek2010-11-081-0/+1982
| | | | | | | | | we can blow out the stack due to deeply nested BinaryOperators. This is done by turning the explicit recursion into being data recursive. Fixes: <rdar://problem/8289205> llvm-svn: 118444
* If an instance method messages is sending to an expression of type Class,Douglas Gregor2010-11-081-0/+26
| | | | | | | | and we statically can compute a bound on the actual type (e.g., because it's a send to the the magic "class" instance method), code complete as if we were performing a class message send to that class. llvm-svn: 118443
* Document Clang's support for attributes on individual enumerators andJohn McCall2010-11-083-0/+6
| | | | | | | tweak the documentation for deprecation-with-message. Provide __has_feature tests for both. rdar://problem/8605692 llvm-svn: 118435
* When building a compound literal, check that the base element of the array ↵Argyrios Kyrtzidis2010-11-081-0/+14
| | | | | | | | is complete. Fixes rdar://8620582 & http://llvm.org/PR7905 llvm-svn: 118428
* Fixes a rewrite bug, rewriting nested property usage Fariborz Jahanian2010-11-081-0/+52
| | | | | | inside blocks. Fixes //rdar: //8608293. llvm-svn: 118425
* Improve our handling of C++ [class.copy]p3, which specifies that aDouglas Gregor2010-11-081-3/+20
| | | | | | | | | constructor template will not be used to copy a class object to a value of its own type. We were eliminating all constructor templates whose specializations look like a copy constructor, which eliminated important candidates. Fixes PR8182. llvm-svn: 118418
* When attempting reference binding to an overloaded function, alsoDouglas Gregor2010-11-081-0/+29
| | | | | | | consider that we might be trying to bind a reference to a class type, which involves a constructor call. Fixes PR7425. llvm-svn: 118407
* Add missing test case for PR8230Douglas Gregor2010-11-081-0/+57
| | | | llvm-svn: 118402
* Properly diagnose invalid casts to function references. Patch byDouglas Gregor2010-11-085-16/+12
| | | | | | Faisal Vali, tweaked by me. Fixes PR8230. llvm-svn: 118400
* test/CodeGenCXX/rtti-linkage.cpp: Get rid of sort(1) to remove XFAIL: win32.NAKAMURA Takumi2010-11-081-41/+36
| | | | | | On the certain system, bogus SORT.EXE is picked up. Its sort-order is incompatible to POSIX. llvm-svn: 118391
* Remove broken support for variadic templates, along with the variousDouglas Gregor2010-11-074-34/+0
| | | | | | | | | | | | | abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. llvm-svn: 118385
* Use ld directly on linux. Changes from the previous try:Rafael Espindola2010-11-072-6/+3
| | | | | | | | | | | | | | | | | *) Try to detect as much as possible from the system itself, not the distro. This should make it easier to port to a new distro and more likely to work on a unknown one. *) The distro enum now doesn't include the arch. Just use the existing host detection support in LLVM. *) Correctly handle --sysroot. A small regression is that now clang will pass bitcode file to the linker. This is necessary for the gold plugin support to work. It might be better to detect this at configure/cmake time, but doing it in c++ first is a lot easier. llvm-svn: 118382
* A union cannot contain static data members or data members of reference type.Anders Carlsson2010-11-072-1/+9
| | | | llvm-svn: 118381
* ARM EH uses a different personality function in C.John McCall2010-11-071-0/+19
| | | | llvm-svn: 118366
* Don't warn when matching %p to nullptr.Anders Carlsson2010-11-061-0/+9
| | | | llvm-svn: 118344
* Simplify the logic for emitting guard variables for template staticJohn McCall2010-11-061-11/+59
| | | | | | | | | data members by delaying the emission of the initializer until after linkage and visibility have been set on the global. Also, don't emit a guard unless the variable actually ends up with vague linkage, and don't use thread-safe statics in any case. llvm-svn: 118336
* When determining which template partial specialization is more specialized,Argyrios Kyrtzidis2010-11-051-0/+27
| | | | | | 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-051-0/+21
| | | | | | | | 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
* Read/write from/to PCH the diagnostic mappings that the user set so that ↵Argyrios Kyrtzidis2010-11-051-0/+19
| | | | | | | | e.g. #pragma clang diagnostic can be used in a PCH. Fixes rdar://8435969. llvm-svn: 118303
* Teach clang_getCursorReferenced() that aDouglas Gregor2010-11-053-6/+9
| | | | | | | | 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
* Proper rewriting of block envokation with Fariborz Jahanian2010-11-051-0/+6
| | | | | | | qualified ObjC pointer types in its argument list. // rdar: //8608902 llvm-svn: 118286
* Expressions of type std::nullptr_t can be used as sentinels.Anders Carlsson2010-11-051-0/+9
| | | | llvm-svn: 118276
* Implement [over.ics.rank]p4: A conversion that does not convert an ↵Anders Carlsson2010-11-051-2/+17
| | | | | | std::nullptr_t to bool is better than one than does. llvm-svn: 118269
* 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-041-0/+18
| | | | | | check that the TargetNestedNameDecl is the same first. llvm-svn: 118239
OpenPOWER on IntegriCloud