summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't assume a random access iterator, instead just use CFG::iterator.Mike Stump2010-01-141-3/+3
| | | | | | Thanks Ted. llvm-svn: 93413
* Store the address points for constructor vtables directly in the VTT ↵Anders Carlsson2010-01-142-24/+99
| | | | | | builder, because that's the only time they're needed. llvm-svn: 93412
* Avoid snowballing errors into additional warnings. To do better, we'dMike Stump2010-01-141-2/+4
| | | | | | | | need an error term for the CFG. I suspect we'll always have to cope with getCFG returning 0, though, I'd love to see even that possibility removed. llvm-svn: 93411
* Add a DenseMapInfo specialization for BaseSubobject.Anders Carlsson2010-01-141-2/+37
| | | | llvm-svn: 93399
* When providing completions for a member access expression in C++,Douglas Gregor2010-01-141-8/+3
| | | | | | | provided nested-name-specifier results for base classes (only), rather than everything that could possibly be a nested-name-specifier. llvm-svn: 93398
* Switch code-completion for ordinary names over to the new(ish)Douglas Gregor2010-01-141-4/+80
| | | | | | | | | | 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-141-1/+1
| | | | | | about 'object argument' vs. 'nth argument'. llvm-svn: 93395
* Add the %ordinal format modifier for turning '1' into '1st'. Hard-coded forJohn McCall2010-01-141-0/+35
| | | | | | | English right now; would not be impossible to grab a special format string from the diagnostic pool and localize that way. llvm-svn: 93390
* Because CurLoc is the current source location as far as CGDebugInfo is ↵Devang Patel2010-01-141-1/+0
| | | | | | concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used. llvm-svn: 93389
* More refactoring of ResultBuilder::MaybeAddResult. No intendedDouglas Gregor2010-01-141-40/+39
| | | | | | functionality change. llvm-svn: 93386
* Emit human readable names for c/c++ functions. Avoid emitting linkage name ↵Devang Patel2010-01-143-15/+51
| | | | | | if it matches regular name. llvm-svn: 93383
* Fix a bug in rewrite whereby functions using blocks put extern "C" in wrong ↵Fariborz Jahanian2010-01-141-2/+38
| | | | | | | | place. Fixes radar 7284618. llvm-svn: 93382
* Refactor the "is this declaration interesting" logic inDouglas Gregor2010-01-141-33/+51
| | | | | | code-completion's ResultBuilder::MaybeAddResult for later reuse. llvm-svn: 93379
* Look through using declarations when determining whether one decl hides anotherDouglas Gregor2010-01-141-0/+3
| | | | llvm-svn: 93378
* Perform format-expansion on %select results.John McCall2010-01-131-5/+13
| | | | llvm-svn: 93377
* Banish the notion of a "rank" for code-completion results, since weDouglas Gregor2010-01-131-256/+197
| | | | | | are no longer using it for anything. No intended functionality change. llvm-svn: 93376
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-132-44/+46
| | | | | | | | 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-1/+1
| | | | | | | | | | | | 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-131-0/+6
| | | | llvm-svn: 93362
* Code-completion for @public, @protected, @private, @package.Douglas Gregor2010-01-133-1/+43
| | | | llvm-svn: 93361
* Fixes a rewrite bug rewriting a block call argument which has a trvialFariborz Jahanian2010-01-131-0/+7
| | | | | | constructor. Fixes radar 7537770. llvm-svn: 93358
* Whenever completing ordinary names for an Objective-C source, alsoDouglas Gregor2010-01-134-101/+173
| | | | | | | | | | | 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
* Add a BaseSubobject class to uniquely identify a base class subobject. Not ↵Anders Carlsson2010-01-131-0/+25
| | | | | | yet used. llvm-svn: 93345
* Add type source information for both kinds of typeof types.John McCall2010-01-136-18/+58
| | | | | | Patch by Enea Zaffanella. llvm-svn: 93344
* Predefine __weak attribute when doing objective-cFariborz Jahanian2010-01-133-8/+11
| | | | | | rewriting for any target. (refixes radar 7530235). llvm-svn: 93331
* Reimplement constructor declarator parsing to cope with template-idsDouglas Gregor2010-01-138-24/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-134-63/+157
| | | | | | | 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-135-7/+139
| | | | | | | This now rejects literal operators that don't meet the requirements. Templates are not yet checked for. llvm-svn: 93315
* Add a bunch more feature-checking macros for C++0x features. Some of these areAlexis Hunt2010-01-131-0/+10
| | | | | | | 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
* diagnose invalid values of -ftabstop, patch by Christian Adaker!Chris Lattner2010-01-132-4/+12
| | | | llvm-svn: 93288
* Add an unreachable code checker.Mike Stump2010-01-134-32/+77
| | | | llvm-svn: 93287
* cc1: Factor out CompilerInstance::ExecuteAction which has the majority of theDaniel Dunbar2010-01-131-0/+87
| | | | | | | | clang -cc1 logic for running an action against a set of options. - This should make it easier to build tools that have a clang -cc1 like interface, but aren't actually part of clang -cc1. llvm-svn: 93282
* Improve the reporting of non-viable overload candidates by noting the reasonJohn McCall2010-01-131-44/+107
| | | | | | | | 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
* Remove broken fix-it when a default function argument has beenDouglas Gregor2010-01-131-10/+10
| | | | | | | redefined. There's a FIXME with an apology about why we don't try to do better here. Fixes <rdar://problem/7513023>. llvm-svn: 93274
* When in objective-c methods, do the built-in name lookup afterFariborz Jahanian2010-01-122-6/+20
| | | | | | ivar name lookup. Fixes pr5986. llvm-svn: 93271
* Don't emit string-comparison or self-comparison warnings inDouglas Gregor2010-01-121-11/+13
| | | | | | | | | | 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
* use DiagRuntimeBehavior to silence the div/rem by zero warning whenChris Lattner2010-01-121-2/+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-123-6/+77
| | | | | | | | | | | | | | | | | | | | | | 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-122-15/+29
| | | | llvm-svn: 93256
* implement PR6007, diagnosing invalid attribute((section))Chris Lattner2010-01-121-5/+10
| | | | llvm-svn: 93255
* Fix the CodeGen half of PR5911 by changing reference initialization toChandler Carruth2010-01-122-12/+14
| | | | | | | 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/+4
| | | | | | win32 targets. Fixes radar 7530235. Daniel please review. llvm-svn: 93246
* Parse dependent template-ids in base clauses and memberDouglas Gregor2010-01-121-3/+4
| | | | | | | | | 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
* Improve on objective-c pointer recognitionFariborz Jahanian2010-01-121-2/+3
| | | | | | during rewrite. No functionality chang. llvm-svn: 93241
* When determining whether a given name is a template in a dependentDouglas Gregor2010-01-121-2/+3
| | | | | | | | 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
* So I was sitting around, trying vainly to think of something to commit, and thenJohn McCall2010-01-125-35/+42
| | | | | | | | I said to myself, self, why don't you go add a couple of parameters to a method and then fail to use them, and I thought that sounded like a pretty good idea, so I did it. llvm-svn: 93233
* Use horizontal-space markers in code-completion results rather thanDouglas Gregor2010-01-121-14/+21
| | | | | | embedding single space characters. <rdar://problem/7485503> llvm-svn: 93231
* Reorganize some of the code to note overload candidates. Improves theJohn McCall2010-01-121-39/+56
| | | | | | | 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-4/+4
| | | | | | Fixes radar 7522880. llvm-svn: 93219
* Name lookup should know better than to look into a class before it's definedDouglas Gregor2010-01-121-1/+3
| | | | llvm-svn: 93217
OpenPOWER on IntegriCloud