| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than using its own partial implementation of initialization.
Switched CheckInitializerTypes over to
InitializedEntity/InitializationKind, to help move us closer to
InitializationSequence.
Added InitializedEntity::getName() to retrieve the name of the entity,
for diagnostics that care about such things.
Implemented support for default initialization in
InitializationSequence.
Clean up the determination of the "source expressions" for an
initialization sequence in InitializationSequence::Perform.
Taught CXXConstructExpr to store more location information.
llvm-svn: 91492
|
|
|
|
| |
llvm-svn: 91450
|
|
|
|
|
|
|
|
|
| |
attribute to function pointers. It also fixes Sema to check function
pointers for the noreturn attribute when checking for fallthrough.
Patch by Chip Davis, with a slight fix to pass the testsuite.
llvm-svn: 91408
|
|
|
|
| |
llvm-svn: 91089
|
|
|
|
|
|
|
| |
block, if the function is supposed to return a value as we don't know
exactly what the asm code does.
llvm-svn: 91073
|
|
|
|
|
|
| |
recently introduced crash.
llvm-svn: 91070
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 91050
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 91044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
| |
llvm-svn: 90943
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
about inline functions. Add a test.
llvm-svn: 90938
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
subsequent code which depends on a complete type does the right thing.
llvm-svn: 90727
|
|
|
|
| |
llvm-svn: 90710
|
|
|
|
|
|
| |
MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.
llvm-svn: 90686
|
|
|
|
| |
llvm-svn: 90605
|
|
|
|
| |
llvm-svn: 90542
|
|
|
|
|
|
| |
create the enum type in the same scope as you would a record type.
llvm-svn: 90500
|
|
|
|
|
|
|
| |
a new virtual function is declared/instantiated. it is used
in couple of places.
llvm-svn: 90470
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
generated, we mark any virtual implicit member functions as referenced.
llvm-svn: 90327
|
|
|
|
|
|
|
| |
LookupResult::getAsSingleDecl() is no more. Shift Sema::LookupSingleName to
return null on overloaded results.
llvm-svn: 90309
|
|
|
|
|
|
|
| |
leaked data structure than before. This kills off the last remaining
explicit uses of OverloadedFunctionDecl in Sema.
llvm-svn: 90306
|
|
|
|
|
|
|
| |
isVirtual() before we've actually calculated whether the destructor is
virtual.
llvm-svn: 90303
|
|
|
|
|
|
|
| |
override virtual functions. Also, eliminate a (now redundant) call to
AddOverriddenMethods.
llvm-svn: 90242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
be defined as pure. Fixes PR5656.
llvm-svn: 90237
|
|
|
|
|
|
| |
those associated with TemplateNames.
llvm-svn: 90162
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 90140
|
|
|
|
|
|
|
| |
function names outside of templates - they'll probably cause some damage there as
they're largely untested.
llvm-svn: 90064
|
|
|
|
| |
llvm-svn: 90057
|
|
|
|
|
|
| |
DeclarationName can't handle them yet, so right now Parser just errors out on them.
llvm-svn: 90027
|
|
|
|
| |
llvm-svn: 89983
|
|
|
|
| |
llvm-svn: 89966
|
|
|
|
|
|
| |
This fixes pr5611.
llvm-svn: 89895
|
|
|
|
|
|
|
|
|
|
|
| |
function templates (in C++98), friend function templates, and
out-of-line definitions of members of class templates.
Also handles merging of default template arguments from previous
declarations of function templates, for C++0x. However, we don't yet
make use of those default template arguments.
llvm-svn: 89872
|
|
|
|
|
|
|
|
|
|
| |
locations" into
a new class. Use it pervasively throughout Sema.
My fingers hurt.
llvm-svn: 89638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025).
There are couple of remaining issues that I would like for
Ted. and Doug to look at:
Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.
Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.
llvm-svn: 89561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)
llvm-svn: 89543
|
|
|
|
|
|
|
|
|
|
|
|
| |
name 'T' is looked up in the expression
t.~T()
Previously, we weren't looking into the type of "t", and therefore
would fail when T actually referred to an injected-class-name. Fixes
PR5530.
llvm-svn: 89493
|
|
|
|
|
|
|
| |
rather than NamedDecl*. This is a major step towards eliminating
OverloadedFunctionDecl.
llvm-svn: 89263
|
|
|
|
| |
llvm-svn: 89248
|
|
|
|
| |
llvm-svn: 89199
|