summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't report ambiguities in the user-defined conversion if we weren't supposedJohn McCall2010-01-131-0/+16
| | | | | | | | | | | | to be considering user-defined conversions in the first place. Doug, please review; I'm not sure what we should be doing if we see a real ambiguity in selecting a copy constructor when otherwise suppressing user-defined conversions. Fixes PR6014. llvm-svn: 93365
* Don't a.k.a. through the primary typedef of an anonymous tag decl.John McCall2010-01-132-0/+14
| | | | llvm-svn: 93362
* Code-completion for @public, @protected, @private, @package.Douglas Gregor2010-01-131-1/+14
| | | | llvm-svn: 93361
* Fixes a rewrite bug rewriting a block call argument which has a trvialFariborz Jahanian2010-01-131-0/+21
| | | | | | constructor. Fixes radar 7537770. llvm-svn: 93358
* Whenever completing ordinary names for an Objective-C source, alsoDouglas Gregor2010-01-132-1/+36
| | | | | | | | | | | provide completions for @ keywords. Previously, we only provided @-completions after an @ was actually typed, which is useful but probably not the common case. Also, make sure a few Objective-C 2.0 completions only show up when Objective-C 2.0 support is enabled (the default). llvm-svn: 93354
* Fix Release-Asserts.Mike Stump2010-01-131-25/+21
| | | | llvm-svn: 93353
* Fix for Release-Assert.Mike Stump2010-01-131-1/+1
| | | | llvm-svn: 93348
* Fix for Release-Asserts.Mike Stump2010-01-131-14/+14
| | | | llvm-svn: 93347
* Fix Release-Asserts.Mike Stump2010-01-131-44/+42
| | | | llvm-svn: 93346
* Fix for Release-Asserts.Mike Stump2010-01-131-18/+17
| | | | llvm-svn: 93340
* Reimplement constructor declarator parsing to cope with template-idsDouglas Gregor2010-01-134-7/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that name constructors, the endless joys of out-of-line constructor definitions, and various other corner cases that the previous hack never imagined. Fixes PR5688 and tightens up semantic analysis for constructor names. Additionally, fixed a problem where we wouldn't properly enter the declarator scope of a parenthesized declarator. We were entering the scope, then leaving it when we saw the ")"; now, we re-enter the declarator scope before parsing the parameter list. Note that we are forced to perform some tentative parsing within a class (call it C) to tell the difference between C(int); // constructor and C (f)(int); // member function which is rather unfortunate. And, although it isn't necessary for correctness, we use the same tentative-parsing mechanism for out-of-line constructors to improve diagnostics in icky cases like: C::C C::f(int); // error: C::C refers to the constructor name, but // we complain nicely and recover by treating it as // a type. llvm-svn: 93322
* Record some basic information about bad conversion sequences. Use thatJohn McCall2010-01-132-2/+27
| | | | | | | information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. llvm-svn: 93316
* Implement semantic checking for C++ literal operators.Alexis Hunt2010-01-132-3/+46
| | | | | | | This now rejects literal operators that don't meet the requirements. Templates are not yet checked for. llvm-svn: 93315
* Update test function names so as not to use potential keywords.Alexis Hunt2010-01-131-5/+5
| | | | llvm-svn: 93314
* Add a bunch more feature-checking macros for C++0x features. Some of these areAlexis Hunt2010-01-131-0/+101
| | | | | | | disabled with the intent that users can start with them now and not have to change a thing to have them work when we implement the features. llvm-svn: 93312
* Add an unreachable code checker.Mike Stump2010-01-131-0/+41
| | | | llvm-svn: 93287
* Improve the reporting of non-viable overload candidates by noting the reasonJohn McCall2010-01-1321-25/+25
| | | | | | | | why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. llvm-svn: 93277
* When in objective-c methods, do the built-in name lookup afterFariborz Jahanian2010-01-121-0/+40
| | | | | | ivar name lookup. Fixes pr5986. llvm-svn: 93271
* Don't emit string-comparison or self-comparison warnings inDouglas Gregor2010-01-122-0/+9
| | | | | | | | | | unevaluated contexts, because they only matter for code that will actually be evaluated at runtime. As part of this, I had to extend PartialDiagnostic to support fix-it hints. llvm-svn: 93266
* testcase for -ftabstop, patch by Christian Adaker!Chris Lattner2010-01-121-0/+30
| | | | llvm-svn: 93260
* use DiagRuntimeBehavior to silence the div/rem by zero warning whenChris Lattner2010-01-123-3/+4
| | | | | | not in an evaluated context. This removes some bogus warnings. llvm-svn: 93258
* Improve recovery for template-ids whose template-name doesn't actuallyDouglas Gregor2010-01-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | name a template, when they occur in a base-specifier. This is one of the (few) places where we know for sure that an identifier followed by a '<' must be a template name, so we can diagnose and recover well: test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing 'template' keyword prior to dependent template name 'T::apply' struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ... ^ template test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown template name 'vector' struct X2 : vector<T> { }; // expected-error{{unknown template name 'vector'}} ^ 2 diagnostics generated. llvm-svn: 93257
* implement PR6004, warning about divide and remainder by zero.Chris Lattner2010-01-125-10/+20
| | | | llvm-svn: 93256
* implement PR6007, diagnosing invalid attribute((section))Chris Lattner2010-01-121-0/+5
| | | | llvm-svn: 93255
* Fix the CodeGen half of PR5911 by changing reference initialization toChandler Carruth2010-01-121-0/+7
| | | | | | | correctly look through arrays to see cv-qualifiers. Also enhances the routine for doing this to preserve more type sugaring for diagnostics. llvm-svn: 93252
* Define __weak attribute for objective-c pointers inFariborz Jahanian2010-01-121-0/+13
| | | | | | win32 targets. Fixes radar 7530235. Daniel please review. llvm-svn: 93246
* Parse dependent template-ids in base clauses and memberDouglas Gregor2010-01-121-0/+6
| | | | | | | | | initializers. This isn't actually in the C++ grammar (in any version), but that's clearly an oversight: both GCC and EDG support this syntax, and it's used within Boost code. I'll file a core issue proposing precisely the change made here. Fixes PR6008. llvm-svn: 93243
* When determining whether a given name is a template in a dependentDouglas Gregor2010-01-121-0/+17
| | | | | | | | context, do not attempt typo correction. This harms performance (as Abramo noted) and can cause some amusing errors, as in this new testcase. llvm-svn: 93240
* Fix tests for r93231.Benjamin Kramer2010-01-122-2/+2
| | | | llvm-svn: 93238
* Use horizontal-space markers in code-completion results rather thanDouglas Gregor2010-01-123-19/+19
| | | | | | embedding single space characters. <rdar://problem/7485503> llvm-svn: 93231
* Reorganize some of the code to note overload candidates. Improves theJohn McCall2010-01-121-0/+10
| | | | | | | fidelity with which we note them as functions/constructors and templates thereof. Also will be helpful when reporting bad conversions (next). llvm-svn: 93224
* Fix rewriting of MacOS sjlj based eh.Fariborz Jahanian2010-01-121-0/+20
| | | | | | Fixes radar 7522880. llvm-svn: 93219
* Chris thinks these diagnostics are better now. :)John McCall2010-01-121-1/+0
| | | | llvm-svn: 93216
* Introduce a specific representation for the ambiguous implicit conversionJohn McCall2010-01-123-11/+18
| | | | | | | sequence. Lots of small relevant changes. Fixes some serious problems with ambiguous conversions; also possibly improves associated diagnostics. llvm-svn: 93214
* Fix rewriting for forward class declaration.Fariborz Jahanian2010-01-111-0/+8
| | | | | | (fixes radar 6969189). llvm-svn: 93201
* When performing name lookup into a scope, check that its entity isDouglas Gregor2010-01-111-0/+8
| | | | | | non-NULL before looking at the entity itself. llvm-svn: 93199
* C++0x [dcl.typedef]p4, take 3, where we actually figure out what "thatDouglas Gregor2010-01-111-3/+6
| | | | | | | is not also a typedef-name" actually means. For anyone keeping score, that's John: 2, Doug: 0. llvm-svn: 93196
* Use isa<ElaboratedType> rather than getAs<ElaboratedType>, since theDouglas Gregor2010-01-111-1/+5
| | | | | | | latter may (eventually) perform multiple levels of desugaring (thus breaking the newly-added tests) and the former is faster. Thanks, John! llvm-svn: 93192
* Add test case from PR5763Douglas Gregor2010-01-111-0/+7
| | | | llvm-svn: 93190
* Allow redefinitions of typedef-names within class scope when the typeDouglas Gregor2010-01-111-1/+0
| | | | | | | | | they redefine is a class-name but not a typedef-name, per C++0x [dcl.typedef]p4. The code in the test was valid C++98 and is valid C++0x, but an unintended consequence of DR56 made it ill-formed in C++03 (which we were luck enough to implement). Fixes PR5455. llvm-svn: 93188
* Fix a problem related to rewrite of anonymous unions.Fariborz Jahanian2010-01-111-0/+30
| | | | | | (fixes radar 6948022) llvm-svn: 93186
* When resolving a single function template specialization to aDouglas Gregor2010-01-111-0/+33
| | | | | | | function, be sure to adjust the resulting argument type to a pointer (if necessary). Fixes PR5910 and PR5949. llvm-svn: 93178
* Test case for naming of conversion function template specializationsDouglas Gregor2010-01-111-0/+78
| | | | llvm-svn: 93177
* When computing surrogates for calls to a value of object type, lookDouglas Gregor2010-01-111-4/+11
| | | | | | for all visible conversion functions. llvm-svn: 93173
* Tighten up the "cannot return array or function type" diagnostic toDouglas Gregor2010-01-112-2/+2
| | | | | | | say either "array type" or "function type", whichever it is. No reason to make the user guess. llvm-svn: 93164
* Fixup rewrite of ivars accessed via an explicit objectFariborz Jahanian2010-01-111-1/+6
| | | | | | in a function. Fixes radar 7522803. llvm-svn: 93159
* Make Clang complain about taking the address of an unqualified member ↵Sebastian Redl2010-01-111-1/+13
| | | | | | function. Fixes PR5985. llvm-svn: 93150
* Enhance ScanReachableSymbols::scan(). Now another OSAtomic test case passes.Zhongxing Xu2010-01-112-106/+8
| | | | | | The old test case has a little mistake. llvm-svn: 93148
* Enhance SVals::getAsRegion: get the region that is converted to an integer.Zhongxing Xu2010-01-112-9/+8
| | | | | | This with previous patch fixes a OSAtomic test case. llvm-svn: 93146
* Switch RegionStore over to using <BaseRegion+raw offset> to storeTed Kremenek2010-01-111-0/+20
| | | | | | | | | | | | | | value bindings. Along with a small change to OSAtomicChecker, this resolves <rdar://problem/7527292> and resolves some long-standing issues with how values can be bound to the same physical address by not have the same "key". This change is only a beginning; logically RegionStore needs to better handle loads from addresses where the stored value is larger/smaller/different type than the loaded value. We handle these cases in an approximate fashion now (via CastRetrievedVal and help in SimpleSValuator), but it could be made much smarter. llvm-svn: 93137
OpenPOWER on IntegriCloud