summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove TranslateKind and centralize Decl -> CXCursorKind in GetCursorKind(). ↵Ted Kremenek2010-01-165-41/+41
| | | | | | This revealed a bunch of inconsistencies in how CXCursorKinds were being computed. llvm-svn: 93618
* Fix crash generating debug info for constructor for anonymous struct.Eli Friedman2010-01-161-0/+6
| | | | llvm-svn: 93601
* Make the AST explicitly represent the cast of the first operand of a Eli Friedman2010-01-161-0/+11
| | | | | | pointer-to-member operator. llvm-svn: 93592
* Generalize handling for unreachable code warnings to all binary operators.Mike Stump2010-01-151-4/+4
| | | | llvm-svn: 93584
* Refine location reporting for unreachable code warnings for comma expressions.Mike Stump2010-01-151-0/+56
| | | | llvm-svn: 93574
* Fix a couple bugs in copy assignment operator synthesis.Eli Friedman2010-01-151-7/+13
| | | | llvm-svn: 93546
* Add -cursor-at=file:line:column command line option to c-index-test,Douglas Gregor2010-01-151-14/+16
| | | | | | | | to directly check the results of clang_getCursor(). Also, start migrating some index-test tests over to c-index test [*] and some grep-using tests over to FileCheck. llvm-svn: 93537
* Do not do the block-specific rewrite when there is no block literals.Fariborz Jahanian2010-01-151-0/+8
| | | | | | Fixes radar 7546096. llvm-svn: 93519
* When determining whether a DeclRefExpr is value-dependent when itDouglas Gregor2010-01-151-0/+19
| | | | | | | | references a const variable of integral type, the initializer may be in a different declaration than the one that name-lookup saw. Find the initializer anyway. Fixes PR6045. llvm-svn: 93514
* When determining whether the type is the current instantiation, stripDouglas Gregor2010-01-151-0/+20
| | | | | | qualifiers. Fixes PR6021. llvm-svn: 93513
* Don't repeat lookup when instantiating resolved member expressions.John McCall2010-01-151-0/+24
| | | | | | | | | | Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit member accesses, which can arise from unqualified lookups and therefore may reference decls from enclosing class scopes. Fixes PR 5838. llvm-svn: 93510
* Don't suggest the developer use 'arc4random' instead of 'rand' when that ↵Ted Kremenek2010-01-151-0/+33
| | | | | | function is not available. Fixes PR 6012. llvm-svn: 93508
* Teach BugReporter to "escape" the occurance of '%' characters in diagnostic ↵Ted Kremenek2010-01-151-0/+10
| | | | | | messages when emitted results to the standard Diagnostics output. Fixes PR 6033. llvm-svn: 93507
* Add testcase for recent checkin.Mike Stump2010-01-151-0/+20
| | | | llvm-svn: 93503
* When performing qualified name lookup into the current instantiation,Douglas Gregor2010-01-151-0/+19
| | | | | | | | | | | | | do not look into base classes if there are any dependent base classes. Instead, note in the lookup result that we couldn't look into any dependent bases. Use that new result kind to detect when this case occurs, so that we can fall back to treating the type/value/etc. as a member of an unknown specialization. Fixes an issue where we were resolving lookup at template definition time and then missing an ambiguity at template instantiation time. llvm-svn: 93497
* Fix Release-Asserts for the time being.Mike Stump2010-01-151-352/+351
| | | | llvm-svn: 93493
* Patch to avoid duplicate declaration of byref structsFariborz Jahanian2010-01-141-0/+35
| | | | | | | for __block variables of same name declared in multiple scopes. Fixes radar 7540194 llvm-svn: 93474
* Forgot to commit theseAnton Korobeynikov2010-01-142-12/+12
| | | | llvm-svn: 93458
* Simplify test case. This test case also applies to PR 6013.Ted Kremenek2010-01-141-9/+5
| | | | llvm-svn: 93444
* Associate test case with Bugzilla PR.Ted Kremenek2010-01-141-7/+8
| | | | llvm-svn: 93440
* After dyn_cast'ing, it generally makes sense to check the *output* ofDouglas Gregor2010-01-141-0/+18
| | | | | | the dyn_cast against NULL rather than the *input*. Fixes PR6025. llvm-svn: 93435
* When qualified lookup into the current instantiation fails (because itDouglas Gregor2010-01-141-0/+53
| | | | | | | | finds nothing), and the current instantiation has dependent base classes, treat the qualified lookup as if it referred to an unknown specialization. Fixes PR6031. llvm-svn: 93433
* Fix pr6035.Zhongxing Xu2010-01-141-0/+11
| | | | llvm-svn: 93422
* Improve overload diagnostics some more by calling out qualifier mismatchesJohn McCall2010-01-141-2/+7
| | | | | | | for special diagnostics. Unfortunately, the non-overload diagnostics are not this good. llvm-svn: 93420
* Switch code-completion for ordinary names over to the new(ish)Douglas Gregor2010-01-141-1/+2
| | | | | | | | | | LookupVisibleDecls, unifying the name lookup mechanisms used by code completion and typo correction. Aside from the software-engineering improvements, this makes code-completion see through using directives and see ivars when performing unqualified name lookup in an Objective-C instance method. llvm-svn: 93397
* Improve the diagnostic for bad conversions in overload resolution to talkJohn McCall2010-01-142-4/+10
| | | | | | about 'object argument' vs. 'nth argument'. llvm-svn: 93395
* Fix a bug in rewrite whereby functions using blocks put extern "C" in wrong ↵Fariborz Jahanian2010-01-141-0/+31
| | | | | | | | place. Fixes radar 7284618. llvm-svn: 93382
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-1321-263/+266
| | | | | | | | the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) llvm-svn: 93370
* 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
OpenPOWER on IntegriCloud