summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* When instantiating a function-scoped enum, make sure that it and itsDouglas Gregor2010-03-011-0/+16
| | | | | | | enumeration constants get placed into the local instantiation hash table. Fixes PR6375. llvm-svn: 97471
* Robustify instantiation of templates when there are errors in theDouglas Gregor2010-03-011-0/+52
| | | | | | | | | template definition. Do this both by being more tolerant of errors in our asserts and by not dropping a variable declaration completely when its initializer is ill-formed. Fixes the crash-on-invalid in PR6375, but not the original issue. llvm-svn: 97463
* Don't infinite-loop if TryAnnotateCXXScopeToken fails to annotate but doesn'tJohn McCall2010-03-011-0/+4
| | | | | | | | | signal an error. This can happen even when the current token is '::' if this is a ::new or ::delete expression. This was an oversight in my recent parser refactor; fixes PR 5825. llvm-svn: 97462
* When looking for the instantiated declaration that corresponds to aDouglas Gregor2010-03-011-0/+17
| | | | | | | given declaration in a template, make sure that the context we're searching through is complete. Fixes PR6376. llvm-svn: 97444
* Don't warn about case-value conversions from a negative value to aDouglas Gregor2010-03-011-0/+7
| | | | | | | | larger unsigned value, since this is implementation-defined behavior. (We previously suppressed this warning when converting from a signed value to an unsigned value of the same size). llvm-svn: 97430
* Improve name mangling for dependently-scoped declaration references.Douglas Gregor2010-02-281-0/+19
| | | | llvm-svn: 97422
* Add name mangling for DeclRefExprs that refer to external namesDouglas Gregor2010-02-281-1/+20
| | | | llvm-svn: 97418
* Handle unused functions in construction vtables correctly.Anders Carlsson2010-02-281-0/+7
| | | | llvm-svn: 97406
* Warn about the deprecated string literal -> char* conversion. Fixes PR6428.Douglas Gregor2010-02-284-8/+9
| | | | llvm-svn: 97404
* Implement PR6423 by using one token of lookahead to disambiguate Chris Lattner2010-02-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | an *almost* always incorrect case. This only does the lookahead in the insanely unlikely case, so it shouldn't impact performance. On this testcase: struct foo { } typedef int x; Before: t.c:3:9: error: cannot combine with previous 'struct' declaration specifier typedef int x; ^ After: t.c:2:2: error: expected ';' after struct } ^ ; llvm-svn: 97403
* When laying out vtables for virtual bases in construction vtables, we need ↵Anders Carlsson2010-02-281-7/+14
| | | | | | to check if the vtable is a primary base in the layout class. llvm-svn: 97402
* Add another construction vtable test.Anders Carlsson2010-02-281-0/+43
| | | | llvm-svn: 97401
* Support constant-evaluation of __builtin_nans* as well as the correct constantJohn McCall2010-02-281-3/+42
| | | | | | | | evaluation of __builtin_nan*. Most of the work to make this work is in LLVM. Fixes <rdar://problem/7696712> and part of PR 5255. llvm-svn: 97383
* More improvements to construction vtables; we know handle vbase offsets ↵Anders Carlsson2010-02-281-0/+53
| | | | | | correctly (I hope). llvm-svn: 97361
* Add a simple construction vtable test.Anders Carlsson2010-02-271-0/+35
| | | | llvm-svn: 97344
* Use the real base offset when calculating vbase offsets.Anders Carlsson2010-02-271-0/+46
| | | | llvm-svn: 97338
* Figured out why the test was failing, this will hopefully fix it.Anders Carlsson2010-02-271-1/+0
| | | | llvm-svn: 97336
* Don't add this adjustments for pure virtual member functions.Anders Carlsson2010-02-271-1/+34
| | | | llvm-svn: 97334
* XFAIL this for now. I have no idea why this test is failing on some ↵Anders Carlsson2010-02-271-0/+1
| | | | | | machines. Looks like some sort of whitespace issue in FileCheck. llvm-svn: 97332
* Add another test.Anders Carlsson2010-02-271-0/+48
| | | | llvm-svn: 97329
* Finish up the changes to this adjustments.Anders Carlsson2010-02-271-0/+61
| | | | llvm-svn: 97328
* Fix crasher caused by setting a bit in a possibly empty bitvector whileTed Kremenek2010-02-272-0/+6
| | | | | | doing printf format string checking. This is a recent regression. llvm-svn: 97318
* Fix another vtable layout bug; we weren't looking hard enough for overriden ↵Anders Carlsson2010-02-271-0/+36
| | | | | | functions when determining if an overrider will ever be used. llvm-svn: 97306
* Handle vcall offset sharing between destructors.Anders Carlsson2010-02-271-0/+40
| | | | llvm-svn: 97304
* Fix a bug where we were generating an unnecessary vtable for a virtual base ↵Anders Carlsson2010-02-271-0/+30
| | | | | | that's already a primary virtual base. llvm-svn: 97303
* Add test case for inlining call analysis.Zhongxing Xu2010-02-271-0/+20
| | | | llvm-svn: 97300
* Robustify SourceManager::getLocation(), so that it returns anDouglas Gregor2010-02-271-1/+2
| | | | | | | | | end-of-line source location when given a column number beyond the length of the line, or an end-of-file source location when given a line number beyond the length of the file. Previously, we would return an invalid location. llvm-svn: 97299
* For printf format string checking, add support for positional format strings.Ted Kremenek2010-02-271-0/+13
| | | | | | Along the way, coelesce some of the diagnostics. llvm-svn: 97297
* Skip dependent virtual base classes; fixes PR6413.Douglas Gregor2010-02-271-0/+12
| | | | llvm-svn: 97291
* At sabre's request, drop the FP bounds diagnostics down to warnings and fileJohn McCall2010-02-261-8/+8
| | | | | | them under -Wbad-literal. They're still on by default. llvm-svn: 97284
* Prevent rewriter crash when variable type is missing.Fariborz Jahanian2010-02-261-0/+3
| | | | | | Fixes radar 7692183. llvm-svn: 97281
* Fix rewriting of byref variables in nested blocks.Fariborz Jahanian2010-02-261-0/+23
| | | | | | Fixes radar 7692350. llvm-svn: 97254
* fix rdar://7683173, rejecting an invalid conditionalChris Lattner2010-02-261-0/+7
| | | | llvm-svn: 97253
* For printf format string checking, move the tracking of the data argument ↵Ted Kremenek2010-02-261-2/+2
| | | | | | | | | index out of Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension). llvm-svn: 97248
* Rewriting of imported variable from outerFariborz Jahanian2010-02-261-0/+18
| | | | | | | blocks's argument in the inner block requires special treatment. Fixes radar 7692419. llvm-svn: 97244
* Fix an assertion-on-error during tentative constructor parsing byJohn McCall2010-02-268-10/+14
| | | | | | | | | | propagating error conditions out of the various annotate-me-a-snowflake routines. Generally (but not universally) removes redundant diagnostics as well as, you know, not crashing on bad code. On the other hand, I have just signed myself up to fix fiddly parser errors for the next week. Again. llvm-svn: 97221
* An explicit specialization is allowed following an explicitDouglas Gregor2010-02-261-0/+7
| | | | | | | instantiation so long as that explicit specialization was declared previously. Fixes PR6160. llvm-svn: 97210
* Implement semantic analysis for C++ [expr.new]p18-20, which describeDouglas Gregor2010-02-263-0/+200
| | | | | | | | | | how we find the operator delete that matches withe operator new we found in a C++ new-expression. This will also need CodeGen support. On a happy note, we're now a "nans" away from building tramp3d-v4. llvm-svn: 97209
* Support rewriting of property synthesis with retain/copyFariborz Jahanian2010-02-261-0/+22
| | | | | | attributes. Fixes radar 7214439. llvm-svn: 97203
* Commit Eli's fix for implicit conversions to array type. Fixes PR6264.Douglas Gregor2010-02-261-0/+12
| | | | llvm-svn: 97202
* Make sure to mark constructors, operator new, and operator delete asDouglas Gregor2010-02-261-0/+17
| | | | | | | | | used when we instantiate C++ new expressions, delete expressions, and object-construction expressions. Fixes PR6424, although we can't test all of it until we finish implementing lookup of "operator delete" for new expressions (!). llvm-svn: 97195
* When we decide to re-use an existing CXXConstructExpr node, make sureDouglas Gregor2010-02-261-0/+16
| | | | | | | | to mark the constructor as referenced. Fixes the narrow issue reported in PR6424, but there are a few other places that I'll fix before closing out that PR. llvm-svn: 97185
* When computing the composite pointer type for relational comparisons,Douglas Gregor2010-02-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | equality comparisons, and conditional operators, produce a composite pointer type with the appropriate additional "const" qualifiers if the pointer types would otherwise be incompatible. This is a small extension (also present in GCC and EDG in a slightly different form) that permits code like: void** i; void const** j; i == j; with the following extwarn: t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and 'void const **') uses non-standard composite pointer type 'void const *const *' [-pedantic] i == j; ~ ^ ~ Fixes PR6346, and I'll be filing a core issue about this with the C++ committee. llvm-svn: 97177
* Fux a bug where we were trying to add overriders for non-virtual bases of ↵Anders Carlsson2010-02-251-0/+29
| | | | | | virtual bases more than once. llvm-svn: 97173
* Allow us to compare derived-to-base conversions between a referenceDouglas Gregor2010-02-251-0/+13
| | | | | | | binding and a copy-construction. Fixes an overloading problem in the Clang-on-Clang build. llvm-svn: 97161
* Forgot to include nested protocols in collection, resulting inFariborz Jahanian2010-02-251-0/+30
| | | | | | bogus warning. Fixes radar 7682116. llvm-svn: 97157
* Don't try to finalize an ill-formed variable or one whose class type is ↵Douglas Gregor2010-02-251-0/+17
| | | | | | ill-formed. Fixes PR6421 llvm-svn: 97152
* When comparing two method overload candidates during overload diagnostics,John McCall2010-02-251-1/+2
| | | | | | | | | | | skip the object argument conversion if either of the candidates didn't initialize it. Fixes PR6421, which is such a very straightforward extension of PR6398 that I should have worked it into the last test case (and therefore caught it then). Ah well. llvm-svn: 97135
* Fix a really trivial crasher and begin fleshing out one of the namespace testChandler Carruth2010-02-251-1/+42
| | | | | | cases. llvm-svn: 97134
* Add a new conversion rank to classify conversions between complex and scalarChandler Carruth2010-02-252-12/+12
| | | | | | | | types. Rank these conversions below other conversions. This allows overload resolution when the only distinction is between a complex and scalar type. It also brings the complex overload resolutin in line with GCC's. llvm-svn: 97128
OpenPOWER on IntegriCloud