summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Only suppress the "extern variable has an initializer" warning when the ↵Douglas Gregor2010-04-191-1/+2
| | | | | | extern entity being initialized is const. llvm-svn: 101821
* Disable the "'extern' variable has an initializer" warning in C++,Douglas Gregor2010-04-191-0/+2
| | | | | | | since it makes sense there to have const extern variables. Fixes PR6495. llvm-svn: 101818
* More tests for Objective-C-related name lookup weirdness. Yes, it'sDouglas Gregor2010-04-192-0/+37
| | | | | | weird; yes, it's what GCC does. Almost. llvm-svn: 101803
* Add a testcase for PR6501 (too many/too few arguments to a function call).Eric Christopher2010-04-191-0/+6
| | | | llvm-svn: 101800
* Make this test darwin10 specific.Fariborz Jahanian2010-04-191-1/+1
| | | | llvm-svn: 101797
* Temporarily XFAIL this test on windows.Eric Christopher2010-04-191-0/+2
| | | | llvm-svn: 101796
* Remove the argument number from the constant integer diagnostic.Eric Christopher2010-04-194-6/+6
| | | | | | Update all of the testcases accordingly. llvm-svn: 101795
* When searching for code-completion and typo-correction candidates,Douglas Gregor2010-04-191-0/+34
| | | | | | | | look from an Objective-C class or category to its implementation, to pick up synthesized ivars. Fixes a problem reported by David Chisnall. llvm-svn: 101792
* Force clang to produce legacy api for messagingFariborz Jahanian2010-04-191-0/+19
| | | | | | | in for pre-snowleoprd (NeXt runtime). Fixes radar 7866951 llvm-svn: 101791
* If a method is virtual and the class key function is in another file, emit ↵Rafael Espindola2010-04-191-0/+11
| | | | | | | | the method as available_externally. Fixes PR6747 llvm-svn: 101757
* Local static variables must be available module-wiseFariborz Jahanian2010-04-181-0/+21
| | | | | | | as they are accessible in static methods in a class local to the same function. Fixes PR6769. llvm-svn: 101756
* recommit r101568 to fix PR6766Nuno Lopes2010-04-182-3/+16
| | | | | | as a side-effect, remove two FIXMEs now fixed llvm-svn: 101726
* Make sure that we don't visit redeclarations of nested classes whileDouglas Gregor2010-04-181-0/+17
| | | | | | | | instantiating class members as part of an explicit instantiation. Addresses a compilation problem in Boost.Serialization. llvm-svn: 101725
* C++ [namespace.memdef]p3 only applies when the friend is not named viaDouglas Gregor2010-04-181-0/+12
| | | | | | | | | a qualified name. We weren't checking for an empty nested-name-specifier when dealing with friend class templates (although we were checking in the other places where we deal with this paragraph). Fixes a Boost.Serialization showstopper. llvm-svn: 101724
* tests: Don't force triple in x86-builtin-palignr test, this test should beDaniel Dunbar2010-04-181-1/+1
| | | | | | portable. llvm-svn: 101719
* When performing reference initialization for the purposes of overloadDouglas Gregor2010-04-181-3/+12
| | | | | | | | | | | resolution ([over.ics.ref]), we take some shortcuts required by the standard that effectively permit binding of a const volatile reference to an rvalue. We have to treat lightly here to avoid infinite recursion. Fixes PR6177. llvm-svn: 101712
* Fix the access checking of function and function template argument types,Chandler Carruth2010-04-181-0/+24
| | | | | | | return types, and default arguments. This fixes PR6855 along with several similar cases where we rejected valid code. llvm-svn: 101706
* When checking the copy constructor for the optional copy during aDouglas Gregor2010-04-182-5/+14
| | | | | | | | | reference binding to an rvalue of reference-compatible type, check parameters after the first for complete parameter types and build any required default function arguments. We're effectively simulating the type-checking for a call without building the call itself. llvm-svn: 101705
* In C++98/03, when binding a reference to an rvalue ofDouglas Gregor2010-04-182-0/+102
| | | | | | | | | | | | | | | | | reference-compatible type, the implementation is permitted to make a copy of the rvalue (or many such copies, even). However, even though we don't make that copy, we are required to check for the presence of a suitable copy constructor. With this change, we do. Note that in C++0x we are not allowed to make these copies, so we test both dialects separately. Also note the FIXME in one of the C++03 tests, where we are not instantiating default function arguments for the copy constructor we pick (but do not call). The fix is obvious; eliminating the infinite recursion it causes is not. Will address that next. llvm-svn: 101704
* Add testcase that I forgot for r101667 for gnu-keywords.Chandler Carruth2010-04-181-0/+12
| | | | llvm-svn: 101700
* Allow the 'ibaction' attribute to be attached to method declarations (and ↵Ted Kremenek2010-04-181-0/+15
| | | | | | not issue a warning). llvm-svn: 101699
* Do not consider explicit constructors when performing a copy to aDouglas Gregor2010-04-181-5/+8
| | | | | | | | | temporary object. This is blindingly obvious from reading C++ [over.match.ctor]p1, but somehow I'd missed it and it took DR152 to educate me. Adjust one test that was relying on this non-standard behavior. llvm-svn: 101688
* Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug ↵Anders Carlsson2010-04-171-4/+30
| | | | | | where assigning to a bit-field member would overwrite other parts of the struct. llvm-svn: 101681
* Improve our handling of user-defined conversions as part of overloadDouglas Gregor2010-04-176-11/+64
| | | | | | | | | | | | | | | | | resolution. There are two sources of problems involving user-defined conversions that this change eliminates, along with providing simpler interfaces for checking implicit conversions: - It eliminates a case of infinite recursion found in Boost. - It eliminates the search for the constructor needed to copy a temporary generated by an implicit conversion from overload resolution. Overload resolution assumes that, if it gets a value of the parameter's class type (or a derived class thereof), there is a way to copy if... even if there isn't. We now model this properly. llvm-svn: 101680
* Fix an assert when assigning a boolean value to a bitfield of type _Bool.Anders Carlsson2010-04-171-0/+16
| | | | llvm-svn: 101678
* Unnamed bit-fields in a union should be laid out with a type that doesn't ↵Anders Carlsson2010-04-171-3/+11
| | | | | | affect alignment. llvm-svn: 101673
* If a wide bit-field is inside a union its offset should always be 0.Anders Carlsson2010-04-171-0/+9
| | | | llvm-svn: 101668
* Fix a bug where we would sometimes incorrectly mark an vtable function as ↵Anders Carlsson2010-04-171-0/+39
| | | | | | unused. llvm-svn: 101643
* revert r101568, which miscompiles this testcase, distilled from ldecod:Chris Lattner2010-04-172-12/+3
| | | | | | | | | | void exit_picture() { char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"}; foo(yuv_types); } llvm-svn: 101623
* New test to verify that we see constant integers here.Eric Christopher2010-04-171-0/+8
| | | | llvm-svn: 101611
* Consolidate most of the integer constant expression builtin requirementEric Christopher2010-04-173-5/+5
| | | | | | | | checking into a single function and use that throughout. Remove some now unnecessary diagnostics and update tests with now more accurate diagnostics. llvm-svn: 101610
* emit warn_char_constant_too_large at most once per literal, fixing PR6852Chris Lattner2010-04-161-0/+6
| | | | llvm-svn: 101580
* make our existing "switch on bool" warning work for C. SinceChris Lattner2010-04-161-0/+10
| | | | | | | the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. llvm-svn: 101576
* If a non-noreturn virtual member function is guaranteed not to return,Douglas Gregor2010-04-161-0/+5
| | | | | | | do *not* suggest that the function could be attribute 'noreturn'; overridden functions may end up returning. llvm-svn: 101572
* fix PR6766: codegen of var initialized with wide charNuno Lopes2010-04-162-3/+12
| | | | llvm-svn: 101568
* Collapse the three separate initialization paths inDouglas Gregor2010-04-161-0/+19
| | | | | | | | | | | | | | | | | | TryStaticImplicitCast (for references, class types, and everything else, respectively) into a single invocation of InitializationSequence. One of the paths (for class types) was the only client of Sema::TryInitializationByConstructor, which I have eliminated. This also simplified the interface for much of the cast-checking logic, eliminating yet more code. I've kept the representation of C++ functional casts with <> 1 arguments the same, despite the fact that I hate it. That fix will come soon. To satisfy my paranoia, I've bootstrapped + tested Clang with these changes. llvm-svn: 101549
* Rework USR generation for symbols with no linkage. Many of the USRs are now ↵Ted Kremenek2010-04-161-2/+2
| | | | | | | | | | shortened, and we now include the file name that declares the symbol with no linkage in the USR. USRs for such symbols are generated only in restructed cases, e.g., anonymous enum declarations, typedefs, etc. llvm-svn: 101542
* add another test for the undef patch just for to have peace of mind :)Nuno Lopes2010-04-161-0/+3
| | | | | | this follows from C99 6.7.8p10: if it is a union, the first named member is initialized llvm-svn: 101539
* fix a bogus assertion exposed by a recent change: packing theChris Lattner2010-04-161-0/+5
| | | | | | | | | | | | | | | | | struct may cause it to shrink more than one byte. Before my recent changes we compiled the new test into: %0 = type { [6 x i8] } @x = global %0 { [6 x i8] undef }, align 2 ; <%0*> [#uses=0] which is obviously bogus. Now we compile it into: %0 = type <{ i32, i8, i8 }> @x = global %0 zeroinitializer, align 2 ; <%0*> [#uses=0] Where the last byte only is tail padding. llvm-svn: 101536
* emit padding as undef values, take 2Nuno Lopes2010-04-164-17/+44
| | | | | | merge also a few tests I had here for this feature, and FileCheck'ize one file llvm-svn: 101535
* Static analyzer: Don't crash when casting a symbolic region address to a ↵Ted Kremenek2010-04-161-0/+10
| | | | | | float. Fixes PR 6854. llvm-svn: 101499
* More work on wide bit-fields, WIP.Anders Carlsson2010-04-161-1/+19
| | | | llvm-svn: 101467
* Start working on handling wide bitfields in C++Anders Carlsson2010-04-161-0/+12
| | | | llvm-svn: 101464
* Only predefine the macro _GNU_SOURCE in C++ mode when we're on aDouglas Gregor2010-04-161-3/+3
| | | | | | | platform that typically uses glibc. Fixes a Boost.Thread compilation failure. llvm-svn: 101450
* Fix a bug in caret-line-pruning logic that only happens when we have aDouglas Gregor2010-04-161-3/+13
| | | | | | | | source line wider than the terminal where the associated fix-it line is longer than the caret line. Previously, we would crash in this case, which was rather unfortunate. Fixes <rdar://problem/7856226>. llvm-svn: 101426
* Audit uses of Sema::LookupSingleName for those lookups that areDouglas Gregor2010-04-152-0/+25
| | | | | | | | | | | intended for redeclarations, fixing those that need it. Fixes PR6831. This uncovered an issue where the C++ type-specifier-seq parsing logic would try to perform name lookup on an identifier after it already had a type-specifier, which could also lead to spurious ambiguity errors (as in PR6831, but with a different test case). llvm-svn: 101419
* Specify temporary file for -emit-llvm output in test case so that we don't ↵Ted Kremenek2010-04-151-1/+1
| | | | | | | | deposit the file in the original source directory. llvm-svn: 101402
* Improve the bit-field too wide error message.Anders Carlsson2010-04-152-3/+3
| | | | llvm-svn: 101384
* Diagnose attempts to throw an abstract class type.Douglas Gregor2010-04-151-0/+10
| | | | llvm-svn: 101381
* Fix PR 6844, a regression caused by the introduction of llvm_unreachable for ↵Ted Kremenek2010-04-151-0/+10
| | | | | | | | | | the default case in GRExprEngine::Visit (in r101129). Instead, enumerate all Stmt cases and have no 'default' case in the switch statement. When we encounter a Stmt we don't handle, we should explicitly add it to the switch statement. llvm-svn: 101378
OpenPOWER on IntegriCloud