summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Drive-by fix of incorrect diagnostic, and a test case for said diagnostic. ↵Sebastian Redl2012-02-111-2/+6
| | | | | | The double error is unfortunate, but I really don't see an alternative whose effort is worth it. llvm-svn: 150317
* Fix parsing new expressions using init lists. Probably still do the wrong ↵Sebastian Redl2012-02-113-84/+70
| | | | | | | | thing in cases involving array new. Show that many cases using initializer list constructors work, in that they parse and pass semantic analysis. llvm-svn: 150316
* [analyzer] Malloc Checker: reduce false negatives rate by assuming thatAnna Zaks2012-02-112-0/+16
| | | | | | | a pointer cannot escape through calls to system functions. Also, stop after reporting the first use-after-free. llvm-svn: 150315
* [analyzer] Malloc Checker: Report a leak when we are returning freedAnna Zaks2012-02-112-3/+15
| | | | | | | | | memory. (As per one test case, the existing checker thought that this could cause a lot of false positives - not sure if that's valid, to be verified.) llvm-svn: 150313
* [analyzer] Malloc checker: Leak bugs should be suppressed by sinks.Anna Zaks2012-02-111-9/+5
| | | | | | | Resolves a common false positive, where we were reporting a leak inside asserts llvm-svn: 150312
* [analyzer] MallocChecker: refactor/improve the symbol escape logic.Anna Zaks2012-02-111-11/+53
| | | | | | We use the same logic here as the RetainRelease checker. llvm-svn: 150311
* Implement core issue 5: a temporary created for copy-initialization has aRichard Smith2012-02-111-0/+23
| | | | | | | cv-unqualified type. This is essential in order to allow move-only objects of const-qualified types to be copy-initialized via a converting constructor. llvm-svn: 150309
* Make sure to try instantiating a templated type which is used in an _AtomicRichard Smith2012-02-112-1/+13
| | | | | | before complaining that it's incomplete. llvm-svn: 150308
* [analyzer] New checker for assignment of non-0/1 values to Boolean variables.Ryan Govostes2012-02-112-0/+122
| | | | llvm-svn: 150306
* Implement warning for non-wide string literals with an unexpected encoding. ↵Eli Friedman2012-02-112-4/+12
| | | | | | Downgrade error for non-wide character literals with an unexpected encoding to a warning for compatibility with gcc and older versions of clang. <rdar://problem/10837678>. llvm-svn: 150295
* Make sure Sema creates a field for 'this' captures. (Doug, please ↵Eli Friedman2012-02-111-0/+8
| | | | | | double-check that this is correct.) llvm-svn: 150292
* [libclang] For a reference of an implicit template instantiation just giveArgyrios Kyrtzidis2012-02-111-0/+19
| | | | | | | a reference for the instantiation decl. Also test that its location is correct after previous commit. llvm-svn: 150291
* Add simple semantic test for C++11 [expr.prim.lambda]p16, which covers ↵Douglas Gregor2012-02-101-0/+16
| | | | | | recursive capture. This is far more interesting for IRgen. llvm-svn: 150283
* Implement C++11 [expr.lambda.prim]p13, which prohibits lambdas inDouglas Gregor2012-02-101-0/+10
| | | | | | default arguments if in fact those lambdas capture any entity. llvm-svn: 150282
* Support all null pointer literals in format strings.David Blaikie2012-02-102-0/+4
| | | | llvm-svn: 150276
* Have the driver pass CPU and target feature information to cc1as.Jim Grosbach2012-02-101-1/+1
| | | | | | | | | | When creating the MCSubtargetInfo, the assembler driver uses the CPU and feature string to construct a more accurate model of what instructions are and are not legal. rdar://10840476 llvm-svn: 150273
* [libclang] Indexing API: fully index using decls and directives.Argyrios Kyrtzidis2012-02-101-0/+16
| | | | llvm-svn: 150268
* Enhance checking for null format string literal to take into account __null. ↵Ted Kremenek2012-02-101-0/+11
| | | | | | Fixes <rdar://problem/8269537>. llvm-svn: 150260
* Allow implicit capture of 'this' in a lambda even when the captureDouglas Gregor2012-02-102-3/+19
| | | | | | | | | | | | default is '=', and reword the warning about explicitly capturing 'this' in such lambdas to indicate that only explicit capture is banned. Introduce Fix-Its for this and other "save the programmer from themself" rules regarding what can be explicitly captured and what must be implicitly captured. llvm-svn: 150256
* Add test from [expr.prim.lambda]p12, which deals with odr-use andDouglas Gregor2012-02-101-0/+30
| | | | | | | | nested captures. We currently don't get odr-use correct in array bounds, so that bit is commented out while we sort out what we need to do. llvm-svn: 150255
* Don't introduce a lambda's operator() into the class until after weDouglas Gregor2012-02-101-0/+9
| | | | | | | | have finished parsing the body, so that name lookup will never find anything within the closure type. Then, add this operator() and the conversion function (if available) before completing the class. llvm-svn: 150252
* PR11684, core issue 1417:Richard Smith2012-02-1010-37/+66
| | | | | | | | | | | | | | o Correct the handling of the restrictions on usage of cv-qualified and ref-qualified function types. o Fix a bug where such types were rejected in template type parameter default arguments, due to such arguments not being treated as a template type arg context. o Remove the ExtWarn for usage of such types as template arguments; that was a standard defect, not a GCC extension. o Improve the wording and unify the code for diagnosing cv-qualifiers with the code for diagnosing ref-qualifiers. llvm-svn: 150244
* Test cleanup: prefer static_assert to handmade alternative.Richard Smith2012-02-101-5/+2
| | | | llvm-svn: 150243
* Loosen the test from r150238 a bit to make some of our bots happy.Evgeniy Stepanov2012-02-101-4/+4
| | | | llvm-svn: 150242
* Track whether a function type has a trailing return type as type sugar. Use thisRichard Smith2012-02-103-0/+40
| | | | | | | | | | | to pretty-print such function types better, and to fix a case where we were not instantiating templates in lexical order. In passing, move the Variadic bit from Type's bitfields to FunctionProtoType to get the Type bitfields down to 32 bits. Also ensure that we always substitute the return type of a function when substituting explicitly-specified arguments, since that can cause us to bail out with a SFINAE error before we hit a hard error in parameter substitution. llvm-svn: 150241
* --lies.Richard Smith2012-02-101-2/+0
| | | | llvm-svn: 150240
* Add a lambda example from the working draft.Douglas Gregor2012-02-101-0/+9
| | | | llvm-svn: 150239
* Fix function prolog codegen whe coerce-to type is a struct.Evgeniy Stepanov2012-02-101-0/+12
| | | | | | | | | | This changes function prolog in such a way as to avoid out-of-bounds stack store in the case when coerce-to type has a larger storage size than the real argument type. Fixes PR11905. llvm-svn: 150238
* Add various tests for captures and the reaching scope of the lambdaDouglas Gregor2012-02-103-0/+79
| | | | | | | expression. Implement C++11 [expr.prim.lambda]p12's requirement that capturing a variable will odr-use it. llvm-svn: 150237
* Implement the conversion to a function pointer for lambda expressions,Douglas Gregor2012-02-102-3/+25
| | | | | | per C++ [expr.prim.lambda]p6. llvm-svn: 150236
* Update to new resolution for DR1458. When taking the address of an object ofRichard Smith2012-02-101-3/+4
| | | | | | | incomplete class type which has an overloaded operator&, it's now just unspecified whether the overloaded operator or the builtin is used. llvm-svn: 150234
* Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is ↵Ted Kremenek2012-02-102-30/+8
| | | | | | | | | used so profusely in many APIs and large codebases that this made the deprecated warning trigger happy to the point of not being useful. llvm-svn: 150223
* Make sure we convert struct layout pragmas to attributes for class templates ↵Eli Friedman2012-02-101-0/+10
| | | | | | the same way we do for non-template classes. <rdar://problem/10791194>. llvm-svn: 150221
* [analyzer] MallocChecker: add a list of false positives based on runningAnna Zaks2012-02-101-0/+82
| | | | | | the checker over postgres and sqlite. llvm-svn: 150216
* [analyzer] MallocChecker Cleanup - harden against crashes, fix an errorAnna Zaks2012-02-102-8/+20
| | | | | | (use of return instead of continue), wording. llvm-svn: 150215
* Switching to using dyn_cast_or_null, and fixing line endings in the test case.Aaron Ballman2012-02-091-6/+6
| | | | llvm-svn: 150209
* [analyzer] Proactively avoid inlining vararg functions and blocks until we ↵Ted Kremenek2012-02-091-0/+29
| | | | | | properly support them. llvm-svn: 150207
* objc: If a method is not implemented in the category implementation butFariborz Jahanian2012-02-091-0/+23
| | | | | | | | has been declared in its primary class, superclass, or in one of their protocols, no need to issue unimplemented method. // rdar://10823023 llvm-svn: 150206
* Make sure a variable with a C++ direct initializer triggers jump scope ↵Eli Friedman2012-02-091-0/+12
| | | | | | checking. Fixes PR10620 / <rdar://problem/9958362> . llvm-svn: 150204
* Class objects passed by value follow the same rules as structure objects.Akira Hatanaka2012-02-091-0/+15
| | | | | | | Double fields of by-value class objects should be passed in floating point registers. llvm-svn: 150200
* Fix bugs in function MipsABIInfo::returnAggregateInRegs. Functions returningAkira Hatanaka2012-02-091-0/+31
| | | | | | class objects follow the same rules as those returning struct objects. llvm-svn: 150196
* Don't allow deduction of a lambda result type from an initializerDouglas Gregor2012-02-091-0/+1
| | | | | | list; it is not an expression. llvm-svn: 150194
* [libclang] Add a libclang test I neglected to commit.Argyrios Kyrtzidis2012-02-092-0/+15
| | | | llvm-svn: 150193
* [PCH] Add a PCH test.Argyrios Kyrtzidis2012-02-091-0/+35
| | | | llvm-svn: 150192
* Tests for C++ [expr.prim.lambda]p5. We already implement all of theseDouglas Gregor2012-02-091-3/+57
| | | | | | semantics. llvm-svn: 150190
* Implement return type deduction for lambdas per C++11Douglas Gregor2012-02-092-6/+50
| | | | | | | | | [expr.prim.lambda]p4, including the current suggested resolution of core isue 975, which allows multiple return statements so long as the types match. ExtWarn when user code is actually making use of this extension. llvm-svn: 150168
* Remove the "unsupported" error for lambda expressions. It's annoying,Douglas Gregor2012-02-0913-104/+90
| | | | | | and rapidly becoming untrue. llvm-svn: 150165
* Add a test for the non-aggregaticity of lambda types per C++11Douglas Gregor2012-02-091-0/+7
| | | | | | [expr.prim.lambda]. llvm-svn: 150164
* Implement C++ [expr.prim.lambda]p2, which bans lambda expressions inDouglas Gregor2012-02-091-0/+48
| | | | | | | unevaluated operands. Be certain that we're marking everything referenced within a capture initializer as odr-used. llvm-svn: 150163
* Don't cache the artificial type for the this pointer, there's noEric Christopher2012-02-091-0/+29
| | | | | | | | | | | difference in the qual type. This is a workaround for the fact that the type isn't artificial but the this decl is, however, we don't have any way of representing it in the current metadata. For now, however, just don't cache the full type. Fixes rdar://10831526 and probably a couple of others. llvm-svn: 150159
OpenPOWER on IntegriCloud