Commit Graph

4600 Commits

Author SHA1 Message Date
Abramo Bagnara 52d6350dd2 Don't insert in lexical context implicit definitions of static member instances.
llvm-svn: 105465
2010-06-04 09:35:39 +00:00
Douglas Gregor 2e87ca218f When checking for equality of template parameter lists, a template
type parameter pack is distinct from a template type parameter.

llvm-svn: 105464
2010-06-04 08:34:32 +00:00
John McCall b1cd7dac3d Delay checking for mutable const fields until we're checking the field.
Allows this check to work properly for instantiated fields and removes
an unnecessary GetTypeForDeclarator call.

llvm-svn: 105463
2010-06-04 08:34:12 +00:00
John McCall ec6f4e9017 More refactoring.
llvm-svn: 105458
2010-06-04 02:29:22 +00:00
John McCall 4a2429aa5a Remove a couple of unnecessary uses of IsStandardConversion.
llvm-svn: 105445
2010-06-04 00:29:51 +00:00
Eli Friedman 91a3d27ec0 Make sure to check the accessibility of and mark the destructor for the
operand of a throw expression.  Fixes PR7281.

llvm-svn: 105408
2010-06-03 20:39:03 +00:00
Anders Carlsson a2f74f3c98 Add all final overriders to the map.
llvm-svn: 105374
2010-06-03 01:00:02 +00:00
Daniel Dunbar f7ced25a2a Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric!
llvm-svn: 105327
2010-06-02 15:46:52 +00:00
Douglas Gregor 876cec2898 typeid() produces type information for the cv-unqualified version of
the type. Thanks to Anders for the bug report!

llvm-svn: 105314
2010-06-02 06:16:02 +00:00
John McCall 75b960e5ee Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home.  This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI).  So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.

llvm-svn: 105268
2010-06-01 09:23:16 +00:00
Ted Kremenek 305a0a7416 Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface.
Fixes <rdar://problem/8026215>.

llvm-svn: 105256
2010-05-31 21:43:10 +00:00
Alexis Hunt ed05325dbe Convert DeclNodes to use TableGen.
The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

llvm-svn: 105165
2010-05-30 07:21:58 +00:00
Douglas Gregor 6ed3eb8a48 Teach code-completion for calls to be more careful with a
potentially-NULL "function" argument.

llvm-svn: 105152
2010-05-30 06:10:08 +00:00
Douglas Gregor 7aa6b229fe Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.

llvm-svn: 105128
2010-05-30 01:49:25 +00:00
John McCall f7bcc81213 Copy source information for the inner type of an elaborated type; fixes some
valgrind problems.

llvm-svn: 105062
2010-05-28 23:32:21 +00:00
Daniel Dunbar a688566f0a Sema: Fix comment, apparently #pragma options align=power is just the same as
align=native, at least for the platforms we support.

llvm-svn: 105000
2010-05-28 20:08:00 +00:00
Daniel Dunbar 5794c6fa43 Sema: Just ignore '#pragma options align=power' for now, this is no worse than
what we used to be doing, and makes sure that paired '#pragma options
align=reset' won't fail.

llvm-svn: 104998
2010-05-28 19:43:33 +00:00
John McCall f24d7bbbcd A more minimal fix for PR6762.
llvm-svn: 104991
2010-05-28 18:45:08 +00:00
John McCall 61d8258fa3 Roll back r104941.
llvm-svn: 104990
2010-05-28 18:25:28 +00:00
John McCall f9c94093f9 Disable exception-spec compatibility checking under -fno-exceptions.
Fixes PR7243.

llvm-svn: 104942
2010-05-28 08:37:35 +00:00
John McCall 2177a9b65a Add a new attribute on records, __attribute__((adl_invisible)), and define
the x86-64 __va_list_tag with this attribute.  The attribute causes the
affected type to behave like a fundamental type when considered by ADL.

(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)

Fixes PR6762.

llvm-svn: 104941
2010-05-28 08:20:36 +00:00
John McCall 0af3d3b0f4 Optimize and complete associated-class-and-namespace collection from
a type.

llvm-svn: 104938
2010-05-28 06:08:54 +00:00
Douglas Gregor ed2540d205 When we complain about a member being inaccessible due to a constraint
along an access path, add another note pointing at the member we
actually found.

llvm-svn: 104937
2010-05-28 04:34:55 +00:00
John McCall 4583186b8b When filtering out previous declarations of friend functions, consider the
lookup context, not the direct semantic context.  Fixes PR7230.

llvm-svn: 104917
2010-05-28 01:41:47 +00:00
Douglas Gregor d37c59dae7 Don't put method bodies into code completions unless code patterns are
turned on.

llvm-svn: 104909
2010-05-28 00:57:46 +00:00
Douglas Gregor 70febae768 Do not produce types as valid code completions when we're in an
expression context in C/Objective-C, or when we're in an
@interface/@implementation/@protocol in Objective-C(++).

llvm-svn: 104908
2010-05-28 00:49:12 +00:00
Douglas Gregor f4c33349b5 Make -code-completion-patterns only cover multi-line code
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.

llvm-svn: 104905
2010-05-28 00:22:41 +00:00
Douglas Gregor a817a19bc6 Implement a code-completion hook for the receiver of an Objective-C
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened before.

llvm-svn: 104895
2010-05-27 23:06:34 +00:00
Douglas Gregor fd42e9542c Tweak the fix-it for a copy constructor declared to take its argument
by-value. We now only prepend a space if it is needed. 

llvm-svn: 104889
2010-05-27 21:28:21 +00:00
Daniel Dunbar 9c84d4a8a0 Parse/Sema: Add support for '#pragma options align=packed', which, it should be
noted, is not the same as __attribute__((packed)). That would be ridiculous!

llvm-svn: 104865
2010-05-27 18:42:17 +00:00
Daniel Dunbar 663e8094ae Parse/Sema: Add support for '#pragma options align=native'.
llvm-svn: 104864
2010-05-27 18:42:09 +00:00
John McCall bf8c519a0d Require a complete type when performing the qualified lookup during
instantiation of a dependent elaborated type specifier.  Fixes PR 7199.

llvm-svn: 104822
2010-05-27 06:40:31 +00:00
Daniel Dunbar 6da1098b4b Sema: Add initial support for '#pragma options align=mac68k'.
- Docs are fairly sketchy, if someone wants to pore through gcc to look for
   holes I'd appreciate any failing test cases!

llvm-svn: 104809
2010-05-27 05:45:51 +00:00
Daniel Dunbar 4dbe15d437 Sema: Factor out struct for alignment stack entries.
llvm-svn: 104799
2010-05-27 02:25:27 +00:00
Daniel Dunbar 8804f2e253 Sema: Replace getPragmaPackAlignment with AddAlignmentAttributesForRecord, which
exposes less details.

llvm-svn: 104797
2010-05-27 01:53:40 +00:00
Daniel Dunbar 401304462a AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.
llvm-svn: 104795
2010-05-27 01:12:46 +00:00
Daniel Dunbar bd60652ace Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.
llvm-svn: 104789
2010-05-27 00:35:16 +00:00
Daniel Dunbar 69dac58e7d Sema: Support for #pragma options align={reset,natural}. '#pragma options align'
shares the stack with '#pragma pack', who knew!?

llvm-svn: 104786
2010-05-27 00:04:40 +00:00
Douglas Gregor a2db793ff0 Introduce priorities into the code-completion results.
llvm-svn: 104751
2010-05-26 22:00:08 +00:00
Fariborz Jahanian b0e28471a6 Improve on flexible array diagnostics (PR7029).
llvm-svn: 104739
2010-05-26 20:46:24 +00:00
Fariborz Jahanian 1138ba6693 Fixes misc. flexible array bugs in c++ (PR7029).
llvm-svn: 104733
2010-05-26 20:19:07 +00:00
Abramo Bagnara 341d783488 Added source order to CXXBaseOrMemberInitializer.
llvm-svn: 104712
2010-05-26 18:09:23 +00:00
Douglas Gregor 1b30b3c9fa When transforming a C++ "new" expression's constructor arguments, drop
any arguments that are default-argument expressions. The can show up
when we have a new expression whose constructor arguments are not
type-dependent and whose allocated type is not dependent and has a
constructor with default arguments. Fixes PR7202.

llvm-svn: 104690
2010-05-26 07:10:06 +00:00
Douglas Gregor 9af03022ff Tell the string literal parser when it's not permitted to emit
diagnostics. That would be while we're parsing string literals for the
sole purpose of producing a diagnostic about them. Fixes
<rdar://problem/8026030>.

llvm-svn: 104684
2010-05-26 05:35:51 +00:00
Douglas Gregor f64acca2f5 Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.

llvm-svn: 104637
2010-05-25 21:41:55 +00:00
Douglas Gregor b9f907bafc Make sure to strip off top-level cv-qualifiers as part of a
derived-to-base conversion on a pointer. Fixes PR7224.

llvm-svn: 104607
2010-05-25 15:31:05 +00:00
Douglas Gregor 6da3db4af3 Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
  token, so we don't get any error/warning spew from the early
  end-of-file.
  2) If we consume a code-completion token when we weren't expecting
  one, go into a code-completion recovery path that produces the best
  results it can based on the context that the parser is in.

llvm-svn: 104585
2010-05-25 05:58:43 +00:00
Daniel Dunbar 532177685a IRgen/C++: When mark vtables used, make sure to still append to the VTableUse array if we promote a vtable from being just used to having its definition required. This ensures that we properly inform the consumer about whether the vtable is required or not, previously we could fail to do so when the vtable was in the VTableUses array before the decl which marked it as required.
- I think this can be cleaned up, since this means we may notify the consumer about the vtable twice, but I didn't see an easy fix for this without more substantial refactoring.
 - Doug, please review!

llvm-svn: 104577
2010-05-25 00:33:13 +00:00
Daniel Dunbar 105ce6db87 Simplify.
llvm-svn: 104576
2010-05-25 00:32:58 +00:00
Douglas Gregor 9a414458ff Don't complain about VLAs of non-POD types when the array type is
dependent. Fixes <rdar://problem/8021385>.

llvm-svn: 104550
2010-05-24 20:42:30 +00:00
Douglas Gregor 5a5073e4d6 Make sure that we instantiate variably modified types, even if they
aren't dependent. Fixes <rdar://problem/8020206>.

llvm-svn: 104511
2010-05-24 17:22:01 +00:00
Douglas Gregor bb3348ed33 Downgrade deletion of a void* from an error (which is should be) to an
extension warning (which other compilers seem to use). Works around a
known bug in Xalan.

llvm-svn: 104509
2010-05-24 17:01:56 +00:00
Douglas Gregor e87561aa2e An identity conversion is better than any non-identity
conversion. Fixes PR7095.

llvm-svn: 104476
2010-05-23 22:10:15 +00:00
Douglas Gregor bea453a0fc In C++, one cannot assign from an arithmetic type to an enumeration
type. Fixes PR7051.

llvm-svn: 104475
2010-05-23 21:53:47 +00:00
Douglas Gregor a09387df9f It turns out that people love using VLAs in templates, too. Weaken our
VLA restrictions so that one can use VLAs in templates (even
accidentally), but not as part of a non-type template parameter (which
would be very bad).

llvm-svn: 104471
2010-05-23 19:57:01 +00:00
Douglas Gregor 2788782164 Complain about sizeof(overloaded function) rather than crashing.
llvm-svn: 104470
2010-05-23 19:43:23 +00:00
Douglas Gregor 30a4f4c757 Provide the overloaded functions for UnresolvedLookupExpr and
UnresolvedMemberExpr in their constructors, rather than adding them
after the fact. No functionality change.

llvm-svn: 104468
2010-05-23 18:57:34 +00:00
Douglas Gregor 024d80e571 Don't look for a destructor in a dependent type. Fixes PR7198.
llvm-svn: 104445
2010-05-22 17:12:29 +00:00
Douglas Gregor 0c6f539564 When determining whether we can use "this", make sure to look through
enum contexts (along with block contexts, which we already did). Fixes
PR7196.

llvm-svn: 104444
2010-05-22 16:25:05 +00:00
Douglas Gregor 959d5a0cbd Implement support for variable length arrays in C++. VLAs are limited
in several important ways:

  - VLAs of non-POD types are not permitted.
  - VLAs cannot be used in conjunction with C++ templates.

These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.

llvm-svn: 104443
2010-05-22 16:17:30 +00:00
Douglas Gregor aae38d6610 Improve our handling of reference binding for subobjects of
temporaries. There are actually several interrelated fixes here:

  - When converting an object to a base class, it's only an lvalue
  cast when the original object was an lvalue and we aren't casting
  pointer-to-derived to pointer-to-base. Previously, we were
  misclassifying derived-to-base casts of class rvalues as lvalues,
  causing various oddities (including problems with reference binding
  not extending the lifetimes of some temporaries).

  - Teach the code for emitting a reference binding how to look
  through no-op casts and parentheses directly, since
  Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
  sure that we properly look through multiple levels of indirection
  from the temporary object, but destroy the actual temporary object;
  this fixes the reference-binding issue mentioned above.

  - Teach Objective-C message sends to bind the result as a temporary
    when needed. This is actually John's change, but it triggered the
    reference-binding problem above, so it's included here. Now John
    can actually test his return-slot improvements.

llvm-svn: 104434
2010-05-22 05:17:18 +00:00
Douglas Gregor 20c38a7c58 Improve recovery when we see a dependent template name that is missing
the required "template" keyword, using the same heuristics we do for
dependent template names in member access expressions, e.g.,

test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template'
      keyword to treat 'getAs' as a dependent template name
    T::getAs<U>();
       ^
       template 

Fixes PR5404.

llvm-svn: 104409
2010-05-21 23:43:39 +00:00
Fariborz Jahanian 5981b04718 Clang missing warning about conflicting declaration vs. definition
for variable arguments list methods. (radar 8006060).

llvm-svn: 104407
2010-05-21 23:28:58 +00:00
Douglas Gregor 786123dc48 Improve parser recovery when we encounter a dependent template name
that is missing the 'template' keyword, e.g., 

  t->getAs<T>()

where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.

This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:

test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
      is required to treat 'getAs' as a dependent template name
    t->getAs<T>();
       ^
       template 

This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.

llvm-svn: 104406
2010-05-21 23:18:07 +00:00
Douglas Gregor 9f44d1453b When instantiating a function declaration within a function template,
be sure to merge its parameter scope with its parent's scope. Fixes
PR7184.

llvm-svn: 104386
2010-05-21 21:25:08 +00:00
John McCall b54367d2f8 Propagate access specifiers to anonymous union members nested within classes.
Fixes <rdar://problem/7987650>.

llvm-svn: 104376
2010-05-21 20:45:30 +00:00
Douglas Gregor 27ac429624 Use CanQualType to enforce the use of a canonical type argument to
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.

llvm-svn: 104374
2010-05-21 20:29:55 +00:00
John McCall 61925b03cc Introduce a method to get from an anonymous struct or union record declaration
to the associated object declaration.

llvm-svn: 104309
2010-05-21 01:17:40 +00:00
Douglas Gregor 04163186a7 When instantiating anonymous structs/unions within a function, make
sure that the anonymous struct/union record declaration gets
instantiated before the variable declaration, and that it and its
fields (recursively) get entries in the local instantiation map. Fixes
PR7088.

llvm-svn: 104305
2010-05-21 00:31:19 +00:00
Douglas Gregor aabdfcb29e Fix a crasher in constructor-initializer reordering warnings (PR7179).
llvm-svn: 104299
2010-05-20 23:49:34 +00:00
Fariborz Jahanian 2792f30f13 Generate objc_memmove_collectable write-barrier for
classes whose base class have GC'able object pointers.

llvm-svn: 104296
2010-05-20 23:34:56 +00:00
John McCall bc83b3f011 Be sure to apply initializers to members of anonymous structs and unions
recursively, e.g. so that members of anonymous unions inside anonymous structs
still get initialized.  Also generate default constructor calls for anonymous
struct members when necessary.

llvm-svn: 104292
2010-05-20 23:23:51 +00:00
Douglas Gregor 3f4f03a235 Add a new failure kind, FK_Incomplete, to InitializationSequence, to
capture failures when we try to initialize an incomplete
type. Previously, we would (ab)use FK_ConversionFailed, then
occasionally dereference a null pointer when trying to diagnose the
failure. Fixes <rdar://problem/7959007>.

llvm-svn: 104286
2010-05-20 22:12:02 +00:00
Douglas Gregor 3e51e173b6 Reinstate r104117, Chandler Carruth's change that "[provides] a naming
class for UnresolvedLookupExprs, even when occuring on template
names" along with a fix for an Objective-C++ crasher it introduced.

llvm-svn: 104277
2010-05-20 20:58:56 +00:00
Abramo Bagnara 02ccd28a92 Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo.
llvm-svn: 104226
2010-05-20 15:32:11 +00:00
Abramo Bagnara 1108e7b873 Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc.
llvm-svn: 104220
2010-05-20 10:00:11 +00:00
John McCall 58efb8e2bb Whoops.
llvm-svn: 104218
2010-05-20 07:13:26 +00:00
John McCall deb5e728ae Don't try to check jump scopes in invalid functions. Fixes
<rdar://problem/7995494>.

llvm-svn: 104217
2010-05-20 07:05:55 +00:00
Douglas Gregor fe60c14263 Remove accidental commit
llvm-svn: 104207
2010-05-20 02:26:51 +00:00
Douglas Gregor 527786ea3a Various small fixes for construction/destruction of Objective-C++
instance variables:
  - Use isRecordType() rather than isa<RecordType>(), so that we see
  through typedefs in ivar types.
  - Mark the destructor as referenced
  - Perform C++ access control on the destructor

llvm-svn: 104206
2010-05-20 02:24:22 +00:00
John McCall 87fe5d5618 Support implicitly closing on 'this' in a block. Fixed PR7165.
(the codegen works here, too, but that's annoying to test without execution)

llvm-svn: 104202
2010-05-20 01:18:31 +00:00
Chris Lattner ce7a22d97c fix the TemplateArgumentList copy constructor to not
be a copy constructor (since it isn't one semantically)
and fix the ownership bits it sets to be correct!

llvm-svn: 104192
2010-05-20 00:19:09 +00:00
Jim Grosbach db061516be tweak to (hopefully) fix darwin[89] buildbots. Thanks to Doug for the suggested modification.
llvm-svn: 104188
2010-05-19 23:53:08 +00:00
Douglas Gregor fa6010b6e4 When a conditional operator is an rvalue of class type, we need to
create a temporary copy of both the "true" and "false" results. Fixes
the Boost.Interprocess failures.

Daniel did all the hard work of tracking down the issue, I get to type
up the trivial fix for this horrible miscompile.

llvm-svn: 104184
2010-05-19 23:40:50 +00:00
Abramo Bagnara d754848f10 Added basic source locations to Elaborated and DependentName types.
llvm-svn: 104169
2010-05-19 21:37:53 +00:00
Fariborz Jahanian f633ebd961 Adds support for ObjC++'s GC attribute on declaration of
object variables and functions returning such objects.

llvm-svn: 104168
2010-05-19 21:37:30 +00:00
Daniel Dunbar fd5ed84873 Revert r104117, "Provide a naming class for UnresolvedLookupExprs, even when
occuring on..." which breaks some Objective-C code. Working on getting a test
case...

llvm-svn: 104150
2010-05-19 21:07:14 +00:00
Ted Kremenek 26bde774df Add clang support for IBOutletCollection.
llvm-svn: 104135
2010-05-19 17:38:06 +00:00
Douglas Gregor 6044d691bb Revert r104106; it's breaking linking of Boost.Serialization.
llvm-svn: 104121
2010-05-19 17:02:24 +00:00
Chandler Carruth 8fd2b8935e Provide a naming class for UnresolvedLookupExprs, even when occuring on
template names. We were completely missing naming classes for many unqualified
lookups, but this didn't trigger code paths that need it. This removes part of
an optimization that re-uses the template name lookup done by the parser to
determine if explicit template arguments actually form a template-id.
Unfortunately the technique for avoiding the duplicate lookup lost needed data
such as the class context in which the lookup succeeded.

llvm-svn: 104117
2010-05-19 09:39:06 +00:00
Douglas Gregor 21553f5970 Teach clang to instantiate attributes on more declarations. Fixes PR7102.
llvm-svn: 104106
2010-05-19 03:39:53 +00:00
Douglas Gregor cbfbca14d0 Implement C++ builtin operator candidates for vector types.
llvm-svn: 104105
2010-05-19 03:21:00 +00:00
Chandler Carruth 425cec3e33 Fix a GCC warning about inline functions not being defined. Until r104081, only
the same .cpp file as provided the definitions referenced these functions,
hiding the issue. However, they are clearly no longer inline. Let me know if
there is a reason to move their definitions to the header and make them truly
inline.

llvm-svn: 104104
2010-05-19 02:12:56 +00:00
Chandler Carruth eba788efa6 Fix an obvious goof that rjmccall found by inspection. No testcase, suggestions
welcome for one.

llvm-svn: 104101
2010-05-19 01:37:01 +00:00
Fariborz Jahanian 9f963c2488 Misc. fixes to bring Objetive-C++'s handling of
gc attributes to be inline with Objective-C
(for radar 7925141).

llvm-svn: 104084
2010-05-18 23:04:17 +00:00
Douglas Gregor bdb604a806 Protect isIntegerConstantExpr from seeing type- or value-dependent
expressions in attributes, pragmas.

llvm-svn: 104083
2010-05-18 23:01:22 +00:00
Douglas Gregor 4618868a7d Implement C++ support for vector and extended vector types. This
involves extending implicit conversion sequences to model vector
conversions and vector splats, along with teaching the C++ conditional
operator-checking code about vector types.

Fixes <rdar://problem/7983501>.

llvm-svn: 104081
2010-05-18 22:42:18 +00:00
Ted Kremenek 49be9e0819 Teach CursorVisitor about duplicate ObjCPropertyDecls that can arise because of a current
design limitation in how we handle Objective-C class extensions.  This was causing the CursorVisitor
to essentially visit an @property twice (once in the @interface, the other in the class extension).
Fixes <rdar://problem/7410145>.

llvm-svn: 104055
2010-05-18 21:09:07 +00:00
Douglas Gregor a941dcae16 Add support for Microsoft's __thiscall, from Steven Watanabe!
llvm-svn: 104026
2010-05-18 16:57:00 +00:00
Douglas Gregor 86ad085b40 Give a slight edge to the context-sensitive keyword 'super' over
non-function-local declarations with names similar to what the user
typed. For example, this allows us to correct 'supper' to 'super' in
an Objective-C message send, even though the C function 'isupper' has
the same edit distance.

llvm-svn: 104023
2010-05-18 16:30:22 +00:00