summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* objc-arc: desugar certain type and improve on diagnostic forFariborz Jahanian2011-10-293-8/+10
| | | | | | | ownership qualifier cast which won't work. // rdar://10244607 llvm-svn: 143258
* Add test missed from r143234.Richard Smith2011-10-291-0/+32
| | | | llvm-svn: 143257
* Fix assertion in constant expression evaluation. The LHS of a floating-pointRichard Smith2011-10-281-0/+2
| | | | | | binary operator isn't an rvalue if it's an assignment operator. llvm-svn: 143250
* Give __STDC_VERSION__ the value 201001L when we're in C1x mode. TheDouglas Gregor2011-10-281-0/+9
| | | | | | | committee hasn't set a value for __STDC_VERSION__ yet, so this is a placeholder. But at least it's > 199901L. llvm-svn: 143245
* [ARC] Do not transfer ARC ownership if the cast is going to result in r-value,Argyrios Kyrtzidis2011-10-281-0/+8
| | | | | | in which case the ownership is redundant. Thanks to John for the suggestion. llvm-svn: 143240
* Initial support for C++11 constexpr function invocation substitution. UsingRichard Smith2011-10-281-1/+52
| | | | | | | | | | constexpr function arguments outside of their function (passing or returning them by reference) does not work correctly yet. Calling constexpr function templates does not work yet, since the bodies are not instantiated until the end of the translation unit. llvm-svn: 143234
* In case of template specialization, do not try to delay emitting debug info ↵Devang Patel2011-10-281-0/+15
| | | | | | for concrete type in -flimit-debug-info mode. This fixes some of the failures from bs15503.exp tests in gdb testsuite. llvm-svn: 143227
* Fix this on the bots and make the test more complete by enabling optimizations.Rafael Espindola2011-10-281-3/+2
| | | | llvm-svn: 143223
* Fix PR9614 for functions with the always_inline attribute. Try to keepRafael Espindola2011-10-281-9/+17
| | | | | | the common case (-O0, no always_inline) fast. llvm-svn: 143222
* objective-c arc: type-casting of an objc pointer toFariborz Jahanian2011-10-283-6/+44
| | | | | | | an rvalue retainable object type with life-time qualifier has no effect and wil be diagnosed as error. // rdar://10244607 llvm-svn: 143219
* [analyzer] ObjC message sends to nil receivers that return structs are now ↵Ted Kremenek2011-10-282-18/+12
| | | | | | okay (compiler zeroes out the data). Fixes <rdar://problem/9151319>. llvm-svn: 143215
* Reinstate r142844 (reverted in r142872) now that lvalue-to-rvalue conversionsRichard Smith2011-10-282-0/+28
| | | | | | | | | | are present in all the necessary places: In constant expression evaluation, evaluate lvalues as lvalues and rvalues as rvalues. Remove special case for caching reference initialization and fix a cyclic initialization crash in the process. llvm-svn: 143204
* Fix test for LLVM change r143186.Nick Lewycky2011-10-281-3/+2
| | | | llvm-svn: 143187
* Add (hopefully) the last missing lvalue-to-rvalue conversion. Add an assertionRichard Smith2011-10-281-0/+49
| | | | | | to catch some future implicit lvalue-to-rvalue casts of inappropriate kinds. llvm-svn: 143182
* Be sure to build a dependent expression when we seeJohn McCall2011-10-281-0/+11
| | | | | | a binary operator involving a dependently-typed overload set. llvm-svn: 143172
* Fix for PR9751 to change the behavior of -Wformat warnings. If the formatRichard Trieu2011-10-283-0/+153
| | | | | | | | | | | string is part of the function call, then there is no difference. If the format string is not, the warning will point to the call site and a note will point to where the format string is. Fix-it hints for strings are moved to the note if a note is emitted. This will prevent changes to format strings that may be used in multiple places. llvm-svn: 143168
* Add missing lvalue-to-rvalue conversion to vector splat casts.Richard Smith2011-10-271-0/+10
| | | | llvm-svn: 143166
* Fix some cases where a CK_IntegralCast was being used to convert an lvalue to anRichard Smith2011-10-271-0/+28
| | | | | | | | | rvalue. An assertion to catch this is in ImpCastExprToType will follow, but vector operations currently trip over this (due to omitting the usual arithmetic conversions). Also add an assert to catch missing lvalue-to-rvalue conversions on the LHS of ->. llvm-svn: 143155
* Mark these tests as requiring use of the shell.Ted Kremenek2011-10-272-0/+2
| | | | llvm-svn: 143150
* objc: fix an ir-gen crash caused by recent Fariborz Jahanian2011-10-271-0/+48
| | | | | | property refactoring. // rdar://10327068 llvm-svn: 143139
* Annotate imprecise FP division with fpaccuracy metadataPeter Collingbourne2011-10-271-0/+25
| | | | | | | | | The OpenCL single precision division operation is only required to be accurate to 2.5ulp. Annotate the fdiv instruction with metadata which signals to the backend that an imprecise divide instruction may be used. llvm-svn: 143136
* Move ASTUnit's handling of temporary files and the preamble file into a ↵Ted Kremenek2011-10-272-2/+2
| | | | | | lazily-created static DenseMap. This DenseMap is cleared (and the files erased) via an atexit routine in the case an ASTUnit is not destroyed. Fixes <rdar://problem/10293367>. llvm-svn: 143115
* Make the loading of information attached to an IdentifierInfo from anDouglas Gregor2011-10-271-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. llvm-svn: 143100
* Teach format string analysis that "%zu" means size_t.Hans Wennborg2011-10-271-0/+15
| | | | | | | | The code had it backwards, thinking size_t was signed, and using that for "%zd". Also let the analysis get the types for (u)intmax_t while we are at it. llvm-svn: 143099
* Move these test from checking assembly to checking LLVM IR. Should fix falloutNick Lewycky2011-10-276-28/+16
| | | | | | from r143097. llvm-svn: 143098
* Fix crash on an @interface nested inside @implementation, rdar://10336158Argyrios Kyrtzidis2011-10-271-0/+13
| | | | llvm-svn: 143085
* Do not warn when weak-import attribute is applied to enumFariborz Jahanian2011-10-261-0/+8
| | | | | | | decl. in Darwin due to certain projects requirement. // rdar://10277579 llvm-svn: 143082
* Disalbe more Microsoft-specific stuff.Douglas Gregor2011-10-261-1/+1
| | | | llvm-svn: 143077
* Objective-c: fix an ir-gen crash where objc messag returns a _ComplexFariborz Jahanian2011-10-261-0/+16
| | | | | | | value and ABI requires return slot to be passed as first argument to message sent. // rdar://10331109 llvm-svn: 143053
* Fix this tests on the bots.Rafael Espindola2011-10-261-2/+2
| | | | llvm-svn: 143052
* Fix pr9614 by not emitting an available_externally function when it callsRafael Espindola2011-10-261-0/+15
| | | | | | | | | itself via an asm label. available_externally functions are supposed to correspond to an external function, and that is not the case in the examples in pr9614. llvm-svn: 143049
* Try to appease the Windows buildersDouglas Gregor2011-10-261-1/+1
| | | | llvm-svn: 143048
* Eliminate a hang while loading a sequence of redeclarable entities. InDouglas Gregor2011-10-262-0/+42
| | | | | | | | | | | essence, the redeclaration chain for a class could end up in an inconsistent state while deserializing multiple declarations in that chain, where the circular linked list was not, in fact, circular. Since only two redeclarations of the same entity will get loaded when we're in this state, restore circularity when both have been loaded. Fixes <rdar://problem/10324940> / PR11195. llvm-svn: 143037
* Disable on Windows, for real.Douglas Gregor2011-10-261-2/+1
| | | | llvm-svn: 143027
* Compute the promoted integer type of fixed-width enums correctly. Found by ↵Eli Friedman2011-10-261-0/+9
| | | | | | inspection. llvm-svn: 143021
* Correctly perform integral promotions on wchar_t/char16_t/char32_t in C++. ↵Eli Friedman2011-10-261-0/+16
| | | | | | <rdar://problem/10309088>. llvm-svn: 143019
* Fix crash due to missing array-to-pointer decay when instantiating an unresolvedRichard Smith2011-10-261-0/+10
| | | | | | member expression. Refactoring to follow. llvm-svn: 143017
* UnresolvedMemberExprs need lvalue-to-rvalue conversions during templateRichard Smith2011-10-261-0/+15
| | | | | | instantiations too. llvm-svn: 143016
* Turn off delayed template parsing for this testDouglas Gregor2011-10-251-1/+1
| | | | llvm-svn: 142951
* Handle redundant 'typename' on base class specifications.David Blaikie2011-10-251-0/+3
| | | | llvm-svn: 142937
* Fix erroneous name-specifiers prior to decltypes better/correctly as per ↵David Blaikie2011-10-251-2/+2
| | | | | | Doug's feedback. llvm-svn: 142935
* Restore r142914 and r142915, now with missing file and apparentJohn McCall2011-10-255-8/+8
| | | | | | GCC compiler workaround. llvm-svn: 142931
* Fix cases where the optional nested-name-specifier erroneously preceeded a ↵David Blaikie2011-10-251-0/+4
| | | | | | decltype-specification when specifying a base type. llvm-svn: 142928
* Support the use of decltype for specifying base types. Fixes PR11216.David Blaikie2011-10-251-0/+33
| | | | llvm-svn: 142926
* Revert r142914 and r142915, due to possibly missing file.NAKAMURA Takumi2011-10-255-8/+8
| | | | | | r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." llvm-svn: 142921
* Introduce a placeholder type for "pseudo object"John McCall2011-10-255-8/+8
| | | | | | | | | | | | | | | expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. llvm-svn: 142914
* Don't forget the lvalue-to-rvalue conversion on the LHS when instantiating aRichard Smith2011-10-251-0/+7
| | | | | | | dependent ->, where the member being referred to is an anonymous struct or union. This path was missed by the fix in r142890. llvm-svn: 142910
* Relax restriction of assigning to 'self' in ARC when a method is attributed ↵Ted Kremenek2011-10-251-0/+10
| | | | | | with ns_consumes_self. Fixes <rdar://problem/10274056>. llvm-svn: 142909
* Tweak printf format string parsing to accept 'hh' conversion specifier to ↵Ted Kremenek2011-10-251-0/+6
| | | | | | accept any char, not just signed char. Fixes <rdar://problem/10303638>. llvm-svn: 142908
* Undo unnecessary changeDouglas Gregor2011-10-251-1/+1
| | | | llvm-svn: 142907
OpenPOWER on IntegriCloud