Commit Graph

3341 Commits

Author SHA1 Message Date
Mike Stump e1f6280093 Don't complain about falling off the end of a function with an asm
block, if the function is supposed to return a value as we don't know
exactly what the asm code does.

llvm-svn: 91073
2009-12-10 22:57:48 +00:00
Eli Friedman ee275c82ff Clean up enum constants so that they're finally sane. Fixes PR3173 and a
recently introduced crash.

llvm-svn: 91070
2009-12-10 22:29:29 +00:00
Fariborz Jahanian 798d2bd546 Add support for finding composite type of twp objective-c pointers
in objective-c++ mode.

llvm-svn: 91059
2009-12-10 20:46:08 +00:00
John McCall e29c5cd239 Improve the diagnostic when a new declaration conflicts with a using shadow
declaration.  Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.

llvm-svn: 91057
2009-12-10 19:51:03 +00:00
Fariborz Jahanian a430f71406 Move composite type finding of two objective-c expressions
into its own helper method. No change in functionality.

llvm-svn: 91056
2009-12-10 19:47:41 +00:00
Douglas Gregor 5b747a169e Implement C++ DR437, which involves exception-specifications that name
a type currently being defined, from Nicola Gigante!

llvm-svn: 91052
2009-12-10 18:13:52 +00:00
Douglas Gregor 51e77d5ab0 Move initialization via initializer list over to InitializationSequences.
llvm-svn: 91050
2009-12-10 17:56:55 +00:00
John McCall 84d8767c15 Implement redeclaration checking and hiding semantics for using declarations. There
are a couple of O(n^2) operations in this, some analogous to the usual O(n^2)
redeclaration problem and some not.  In particular, retroactively removing
shadow declarations when they're hidden by later decls is pretty unfortunate.
I'm not yet convinced it's worse than the alternative, though.

llvm-svn: 91045
2009-12-10 09:41:52 +00:00
Eli Friedman e919e382a4 Fix for PR5515: allow "merging" array bounds both forwards and backwards.
llvm-svn: 91044
2009-12-10 08:54:47 +00:00
Douglas Gregor 3e1e527826 Reimplement reference initialization (C++ [dcl.init.ref]) using the
new notion of an "initialization sequence", which encapsulates the
computation of the initialization sequence along with diagnostic
information and the capability to turn the computed sequence into an
expression. At present, I've only switched one CheckReferenceInit
callers over to this new mechanism; more will follow.

Aside from (hopefully) being much more true to the standard, the
diagnostics provided by this reference-initialization code are a bit
better than before. Some examples:

p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct
Derived'
      cannot bind to a value of unrelated type 'struct Base'
  Derived &dr2 = b; // expected-error{{non-const lvalue reference to
  ...
           ^     ~
p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to
a value of
      type 'struct Base const' drops qualifiers
  Base &br3 = bc; // expected-error{{drops qualifiers}}
        ^     ~~

p5-var.cpp:57:15: error: ambiguous conversion from derived class
      'struct Diamond' to base class 'struct Base':
    struct Diamond -> struct Derived -> struct Base
    struct Diamond -> struct Derived2 -> struct Base
  Base &br5 = diamond; // expected-error{{ambiguous conversion from
      ...
              ^~~~~~~
p5-var.cpp:59:9: error: non-const lvalue reference to type 'long'
      cannot bind to
      a value of unrelated type 'int'
  long &lr = i; // expected-error{{non-const lvalue reference to type
      ...
        ^    ~

p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct
Base' cannot
      bind to a temporary of type 'struct Base'
  Base &br1 = Base(); // expected-error{{non-const lvalue reference to
  ...
        ^     ~~~~~~

p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field
'i'
  int & ir1 = (ib.i); // expected-error{{non-const reference cannot
  ...
        ^     ~~~~~~
p5-var.cpp:98:7: note: bit-field is declared here
  int i : 17; // expected-note{{bit-field is declared here}}
      ^

llvm-svn: 90992
2009-12-09 23:02:17 +00:00
Fariborz Jahanian a5fee26d28 Codegen. support for ObjCIsaExpr AST which until now
was not needed (fixes radar 7453430).

llvm-svn: 90981
2009-12-09 19:05:56 +00:00
John McCall 5677499fbf First pass at implementing C++ enum semantics: calculate (and store) an
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to.  This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.

Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616

llvm-svn: 90965
2009-12-09 09:09:27 +00:00
Anders Carlsson c50b340108 Look through using declarations when searching for allocation overloads.
llvm-svn: 90961
2009-12-09 07:39:44 +00:00
Eli Friedman f7195532ee Fix for PR5730: make sure to consistently call
PerformObjectArgumentInitialization from BuildCXXMemberCallExpr.

llvm-svn: 90950
2009-12-09 04:53:56 +00:00
Eli Friedman a958a01e9f Whitespace fix.
llvm-svn: 90949
2009-12-09 04:52:43 +00:00
Anders Carlsson a038825b1c Don't warn about function templates or function template specializations.
llvm-svn: 90943
2009-12-09 03:44:46 +00:00
John McCall daa3d6bb50 Rename Sema::IsOverload to Sema::CheckOverload. Teach it to ignore unresolved
using value decls;  we optimistically assume they won't turn into conflicts.
Teach it to tell the caller *why* the function doesn't overload with the returned
decl;  this will be useful for using hiding.

llvm-svn: 90939
2009-12-09 03:35:25 +00:00
Anders Carlsson 31c7e88667 Move the missing prototypes checking out into a new function. Don't warn about inline functions. Add a test.
llvm-svn: 90938
2009-12-09 03:30:09 +00:00
Anders Carlsson efa4732747 Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change.
llvm-svn: 90935
2009-12-09 03:01:51 +00:00
Mike Stump 85d9968533 Add support for the cleanup attribute for C++; we don't have to copy
all of g++'s bugs.

llvm-svn: 90924
2009-12-09 01:50:36 +00:00
Douglas Gregor 40cb9ad391 Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.

llvm-svn: 90913
2009-12-09 00:47:37 +00:00
Fariborz Jahanian 859c415567 More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.

llvm-svn: 90895
2009-12-08 23:09:15 +00:00
John McCall 3a60c87a59 Handle unresolved using decls in bare lookups. These are not being adequately
tested.  Fixes PR5727.

llvm-svn: 90893
2009-12-08 22:45:53 +00:00
Fariborz Jahanian 33e148f64b Patch to allow matching 0 with an objective-c pointer type
in objective-c++ mode. Fixes radar 7443165

llvm-svn: 90874
2009-12-08 20:04:24 +00:00
Fariborz Jahanian 1c548021ec Patch to allow cstyle cast of objective-c pointers in objective-c++
mode as they are pervasive.

llvm-svn: 90867
2009-12-08 19:22:33 +00:00
Fariborz Jahanian 410f2ebdb6 Refactor objective-c pointer assignment compatibility logic. No
intended functionality change.

llvm-svn: 90865
2009-12-08 18:24:49 +00:00
Douglas Gregor 049bdcac49 Implement template instantiation for exception specifications. Also,
print exception specifications on function types and
declarations. Fixes <rdar://problem/7450999>.

There is some poor source-location information here, because we don't
track locations of the types in exception specifications. Filed PR5719.

Failures during template instantiation of the signature of a function
or function template have wrong point-of-instantiation location
information. I'll tackle that with a separate commit.

llvm-svn: 90863
2009-12-08 17:45:32 +00:00
Douglas Gregor a64c1e5452 When performing unqualified name lookup in C++, don't look directly
into transparent contexts; instead, we'll look into their nearest
enclosing non-transparent contexts further up the stack. Fixes PR5479.

llvm-svn: 90859
2009-12-08 15:38:36 +00:00
John McCall 47f29ea8e0 The refactor of implicit member access expressions means we don't need this
horrible isAddressOfOperand hack in TreeTransform, since that syntactic
information is managed by the initial parser callbacks now.

That's enough insomniac commits for one night.

llvm-svn: 90849
2009-12-08 09:21:05 +00:00
John McCall ce54657e95 DeclRefExpr stores a ValueDecl internally.
Template instantiation can re-use DeclRefExprs.

llvm-svn: 90848
2009-12-08 09:08:17 +00:00
John McCall 3969e30d38 Correctly implement the C++03 and 0x restrictions on class-member using
declarations.

llvm-svn: 90843
2009-12-08 07:46:18 +00:00
Eli Friedman 7316819fcf Fix for PR5710: make sure to put function template specializations into the
DeclContext, so they don't completely disappear from the AST.

I don't particularly like this fix, but I don't see any obviously better way
to deal with it, and I think it's pretty clearly an improvement; comments
welcome.

llvm-svn: 90835
2009-12-08 05:40:03 +00:00
Fariborz Jahanian 4569f69558 Patch to warn when discarding objective-c pointer type qualifiers
Still some refactoring to do.

llvm-svn: 90830
2009-12-08 03:35:08 +00:00
John McCall a928c652be Recover from dot accesses to record pointers and arrow accesses to records.
Patch by Nicola Gigante!

llvm-svn: 90814
2009-12-07 22:46:59 +00:00
Ted Kremenek 54ad1ab56f Add the BlockDecl to the DeclContext.
llvm-svn: 90808
2009-12-07 22:01:30 +00:00
Fariborz Jahanian c2949f9f26 Allow accessing 'isa' via '->' operator.
(fixes radar 7447251).

llvm-svn: 90795
2009-12-07 20:09:25 +00:00
Fariborz Jahanian 1b31c37922 Patch to allow restrict applied to id/Class types.
(fixes radar 7442244).

llvm-svn: 90773
2009-12-07 18:08:58 +00:00
Douglas Gregor 9225369891 When in an Objective-C instance method, super is a valid code-completion result
llvm-svn: 90758
2009-12-07 09:54:55 +00:00
Douglas Gregor bc7c5e471a Code completion for Objective-C @ keywords that are statements or expressions
llvm-svn: 90757
2009-12-07 09:51:25 +00:00
Douglas Gregor f48706c787 Code completion for Objective-C @ directives
llvm-svn: 90756
2009-12-07 09:27:33 +00:00
Anders Carlsson 82fccd014a Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557.
llvm-svn: 90752
2009-12-07 08:24:59 +00:00
Anders Carlsson 5ebf8b44e9 Move key functions to a separate map.
llvm-svn: 90745
2009-12-07 04:35:11 +00:00
John McCall bcd035061d DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;

llvm-svn: 90743
2009-12-07 02:54:59 +00:00
Chris Lattner 1c4280328d reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.

llvm-svn: 90730
2009-12-07 01:36:53 +00:00
Eli Friedman d0e8de2cd8 Move RequireCompleteType requirement for fields early into ActOnField so that
subsequent code which depends on a complete type does the right thing.

llvm-svn: 90727
2009-12-07 00:22:08 +00:00
Douglas Gregor 94bb5e8d75 PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call.
llvm-svn: 90719
2009-12-06 21:27:58 +00:00
Chris Lattner ed085234dc revert my previous patch, it is breaking something and I don't have time
to fix it ATM.

llvm-svn: 90717
2009-12-06 20:58:07 +00:00
Douglas Gregor 05e7ca3659 Switch the std::multimap shadow map used in code completion to an
llvm::DenseMap, for a 20% performance improvement in the
Cocoa-big-list performance benchmark.

llvm-svn: 90715
2009-12-06 20:23:50 +00:00
Chris Lattner 71d5bf1c5d implement PR4451, improving error recovery for a mistaken : where a :: was
intended.  On the first testcase in the bug, we now produce:

cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
 ^
 ::

instead of:

t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
 ^
 ;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
          ^

llvm-svn: 90713
2009-12-06 19:08:11 +00:00
Chris Lattner 3c7b86f4ee remove some extraneous syntax: sourceloc implicitly converts to sourcerange.
llvm-svn: 90710
2009-12-06 17:36:05 +00:00
Eli Friedman eddf1213e2 Fix a slight oversight in computing whether a copy constructor is elidable.
Fixes PR5695.

llvm-svn: 90702
2009-12-06 09:26:33 +00:00
Anders Carlsson 0911ae8ef2 Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.
llvm-svn: 90686
2009-12-06 00:23:49 +00:00
Eli Friedman 89c038e518 Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that
it gets called during template instantiation.

llvm-svn: 90682
2009-12-05 23:03:49 +00:00
Benjamin Kramer 4053e5db54 Avoid trashing two temporary strings.
llvm-svn: 90663
2009-12-05 10:22:15 +00:00
Benjamin Kramer ed60635d70 strcasecmp is unportable.
llvm-svn: 90662
2009-12-05 10:07:04 +00:00
Douglas Gregor 249d6826cd Improve the performance of code completion by 2.2x when completing for ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting.
llvm-svn: 90661
2009-12-05 09:08:56 +00:00
Chris Lattner 9a152e2570 fix rdar://7446395, a crash on invalid, by fixing a broken assertion.
llvm-svn: 90647
2009-12-05 05:40:13 +00:00
John McCall b96ec56871 Fix "using typename" and the instantiation of non-dependent using declarations.
llvm-svn: 90614
2009-12-04 22:46:56 +00:00
Anders Carlsson 1f78b2bf62 Diagnose declarations of implicit member functions.
llvm-svn: 90605
2009-12-04 22:33:25 +00:00
John Thompson 47981226d5 Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized.
llvm-svn: 90600
2009-12-04 21:51:28 +00:00
Eli Friedman 78cde14444 Make sure to call PerformObjectMemberConversion where necessary.
llvm-svn: 90555
2009-12-04 07:18:51 +00:00
Eli Friedman 2cfcef65b7 Make the type of the Decl referred to by a MemberExpr a bit more precise.
llvm-svn: 90549
2009-12-04 06:40:45 +00:00
Anders Carlsson f3935b4d4b Make sure that overridden method decls are always canonical.
llvm-svn: 90542
2009-12-04 05:51:56 +00:00
Eli Friedman 5efba264cb Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
as a constant integer.  Also, some minor cleanup and improvements to the
diagnostics.

llvm-svn: 90504
2009-12-04 00:30:06 +00:00
John McCall 9f545181f7 When recovering from an invalid forward reference to an enum type in C++,
create the enum type in the same scope as you would a record type.

llvm-svn: 90500
2009-12-04 00:07:04 +00:00
Fariborz Jahanian 6dfc1978ac A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.

llvm-svn: 90470
2009-12-03 18:44:40 +00:00
Douglas Gregor c99f155365 Unify the end-of-class code paths used by the parser and template
instantiation, to ensure that we mark class template specilizations as
abstract when we need to and perform checking of abstract classes.

Also, move the checking that determines whether we are creating a
variable of abstract class type *after* we check whether the type is
complete. Otherwise, we won't see when we have an abstract class
template specialization that is implicitly instantiated by this
declaration. This is the "something else" that Sebastian had noted
earlier.

llvm-svn: 90467
2009-12-03 18:33:45 +00:00
Anders Carlsson ae3c5cf76a When instantiating a class, if a base specifier is not dependent we still need to copy its attributes down to the instantiated class.
llvm-svn: 90463
2009-12-03 17:49:57 +00:00
Douglas Gregor 580cd4a23e When we're building a CXXExprWithTemporaries, only include those
temporaries that are within our current evaluation context. That way,
nested evaluation contexts (e.g., within a sizeof() expression) won't
see temporaries from outer contexts. Also, make sure to push a new
evaluation context when instantiating the initializer of a variable;
this may be an unevaluated context or a potentially-evaluated context,
depending on whether it's an in-class initializer or not. Fixes PR5672.

llvm-svn: 90460
2009-12-03 17:10:37 +00:00
John McCall 6e9f8f6374 Honor using declarations in overload resolution. Most of the code for
overloaded-operator resolution is wildly untested, but the parallel code for
methods seems to satisfy some trivial tests.

Also change some overload-resolution APIs to take a type instead of an expression,
which lets us avoid creating a spurious CXXThisExpr when resolving implicit
member accesses.

llvm-svn: 90410
2009-12-03 04:06:58 +00:00
John McCall 800538253d Stop stripping UnresolvedUsingDecls out of LookupResults that have other
results in them (which we were doing intentionally as a stopgap).  Fix
an DeclContext lookup-table ordering problem which was causing UsingDecls to
show up incorrectly when looking for ordinary results.  And oh hey
Clang-Code-Syntax passes now.

llvm-svn: 90367
2009-12-03 00:58:24 +00:00
Douglas Gregor c8c44b5d67 Improve source location information for C++ member initializers in a
constructor, by keeping the DeclaratorInfo* rather than just the type
and a single location.

llvm-svn: 90355
2009-12-02 22:36:29 +00:00
John McCall 5af0450a67 Use a more rigorous definition of 'class member'. I don't have any evidence
that this was causing a problem, but it could have.

llvm-svn: 90343
2009-12-02 20:26:00 +00:00
John McCall 1a49e9dc87 Recognize that EnumConstantDecls can be found by lookup and are not instance
members.  Fixes PR5667.

llvm-svn: 90341
2009-12-02 19:59:55 +00:00
Anders Carlsson f98849eb8a In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.
llvm-svn: 90327
2009-12-02 17:15:43 +00:00
John McCall 3d988d9042 r90313, in which OverloadedFunctionDecl is removed and never spoken of again.
llvm-svn: 90313
2009-12-02 08:47:38 +00:00
John McCall 67c0087074 Rip out the last remaining implicit use of OverloadedFunctionDecl in Sema:
LookupResult::getAsSingleDecl() is no more.  Shift Sema::LookupSingleName to
return null on overloaded results.

llvm-svn: 90309
2009-12-02 08:25:40 +00:00
John McCall d28ae27d8d Push overloaded function templates through the parser using a totally different
leaked data structure than before.  This kills off the last remaining 
explicit uses of OverloadedFunctionDecl in Sema.                                         

llvm-svn: 90306
2009-12-02 08:04:21 +00:00
Eli Friedman 6393aac45e Fix another "operator delete missing" crash: make sure we don't check
isVirtual() before we've actually calculated whether the destructor is
virtual.

llvm-svn: 90303
2009-12-02 07:16:50 +00:00
Eli Friedman 81bce6b05e Make sure to call AddOverriddenMethods for implicit copy assignment operators;
it's rare, but possible, for the difference to be significant.

llvm-svn: 90301
2009-12-02 06:59:20 +00:00
John McCall cd4b47747b Stop trying to analyze class-hierarchies for dependently-scoped id-expressions;
there's nothing interesting we can say now that we're correctly not requiring
the qualifier to name a known base class in dependent contexts.

Require scope specifiers on member access expressions to name complete types
if they're not dependent;  delay lookup when they are dependent.

Use more appropriate diagnostics when qualified implicit member access
expressions find declarations from unrelated classes.

llvm-svn: 90289
2009-12-02 03:53:29 +00:00
Fariborz Jahanian 4d9ab43f23 Fix a code gen. crash synthesizing a destructor.
Fixes pr5660.

llvm-svn: 90283
2009-12-01 23:18:25 +00:00
John McCall a6d407c296 Fix IsProvablyNotDerivedFrom to always use record definitions when available.
Gets clang-on-clang passing again.

llvm-svn: 90270
2009-12-01 22:28:41 +00:00
John McCall 2d74de9632 Rework how we support C++ implicit member accesses. If we can resolve an
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate.  Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.

By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete.  This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.

llvm-svn: 90266
2009-12-01 22:10:20 +00:00
Daniel Dunbar ec5f8ae6a8 Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReader
to use it so it at least won't try to access Sema once it is gone.

llvm-svn: 90261
2009-12-01 21:57:20 +00:00
Douglas Gregor 6be3de3fa7 Funtion templates and function template specializations do not
override virtual functions. Also, eliminate a (now redundant) call to
AddOverriddenMethods.

llvm-svn: 90242
2009-12-01 17:35:23 +00:00
Douglas Gregor 21920e3758 Move the checking of overridden virtual functions into the code path
common to both parsing and template instantiation, so that we'll find
overridden virtuals for member functions of class templates when they
are instantiated. 

Additionally, factor out the checking for pure virtual functions, so
that it will be executed both at parsing time and at template
instantiation time. 

These changes fix PR5656 (for real), although one more tweak
w.r.t. member function templates will be coming along shortly.

llvm-svn: 90241
2009-12-01 17:24:26 +00:00
Douglas Gregor e7488b904c Don't automatically assume that an id-expression refers to a
ValueDecl, because that isn't always the case in ill-formed
code. Diagnose a common mistake (forgetting to provide a template
argument list for a class template, PR5655) and dyn_cast so that we
handle the general problem of referring to a non-value declaration
gracefully.

llvm-svn: 90239
2009-12-01 16:58:18 +00:00
Douglas Gregor f107aa63ee An inherited virtual (where "virtual" wasn't written explicitly) can
be defined as pure. Fixes PR5656.

llvm-svn: 90237
2009-12-01 16:18:00 +00:00
Douglas Gregor f09935f16c Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup
llvm-svn: 90209
2009-12-01 05:55:20 +00:00
Douglas Gregor 8f184a31d0 Eliminate warning in Release-Asserts mode. No functionality change
llvm-svn: 90204
2009-12-01 03:34:29 +00:00
John McCall f786fb13f5 Fix and test for a problem caught by the clang-on-clang buildbot: qualified
IDs in dependent contexts are not dependent if the context names a namespace.

llvm-svn: 90171
2009-11-30 23:50:49 +00:00
John McCall 132f3133ae Remove all of Sema's explicit uses of OverloadedFunctionDecl except for
those associated with TemplateNames.

llvm-svn: 90162
2009-11-30 22:55:35 +00:00
John McCall 10eae1851d Eliminate the use of OverloadedFunctionDecl in member expressions.
Create a new UnresolvedMemberExpr for these lookups.  Assorted hackery
around qualified member expressions;  this will all go away when we
implement the correct (i.e. extremely delayed) implicit-member semantics.

llvm-svn: 90161
2009-11-30 22:42:35 +00:00
Anders Carlsson 26a807d37a When we're trying to define an implicit virtual destructor, make sure that we have a valid delete operator.
llvm-svn: 90156
2009-11-30 21:24:50 +00:00
Benjamin Kramer 5f089128e9 Use StringRef in Attr constructors.
llvm-svn: 90140
2009-11-30 17:08:26 +00:00
Benjamin Kramer b33a97c384 Remove useless c_str() calls in SemaCodeComplete.
llvm-svn: 90088
2009-11-29 20:18:50 +00:00
Kovarththanan Rajaratnam 09282c91d9 Don't call Decl::CollectingStats(false) and Stmt::CollectingStats(false). When called with false these functions return whether statistics are enabled. They don't change any state. Since we're not using the return value avoid calling them in the first place.
llvm-svn: 90077
2009-11-29 14:50:29 +00:00
Alexis Hunt 3d221f2fce Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.

llvm-svn: 90064
2009-11-29 07:34:05 +00:00
Alexis Hunt 8818b42db0 Fix 80-cols violations
llvm-svn: 90057
2009-11-29 03:04:53 +00:00