| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 91513
|
| |
|
|
|
|
| |
Action::FullExpr to Action::MakeFullExpr to avoid name clashes.
llvm-svn: 91494
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
using objective-c property. (fixes radar 7449707)
llvm-svn: 91474
|
| |
|
|
| |
llvm-svn: 91450
|
| |
|
|
|
|
| |
underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates.
llvm-svn: 91439
|
| |
|
|
| |
llvm-svn: 91431
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- During instantiation, drop default arguments from constructor and
call expressions; they'll be recomputed anyway, and we don't want
to instantiate them twice.
- Rewrote the instantiation of variable initializers to cope with
non-dependent forms properly.
Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."
llvm-svn: 91315
|
| |
|
|
|
|
| |
context by default.
llvm-svn: 91256
|
| |
|
|
| |
llvm-svn: 91244
|
| |
|
|
|
|
| |
no extra safety anyway.
llvm-svn: 91207
|
| |
|
|
| |
llvm-svn: 91189
|
| |
|
|
|
|
| |
(fixes radar 7465023).
llvm-svn: 91171
|
| |
|
|
| |
llvm-svn: 91163
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 91118
|
| |
|
|
|
|
|
| |
objective-c++ mode and also removed dead-code in this area.
(fixes radar 7456710).
llvm-svn: 91081
|
| |
|
|
|
|
| |
recently introduced crash.
llvm-svn: 91070
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
of dirty data around.
llvm-svn: 91002
|
| |
|
|
|
|
| |
(fixes radar 7457534).
llvm-svn: 90995
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 90974
|
| |
|
|
|
|
|
|
|
|
|
|
| |
"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
|
| |
|
|
|
|
| |
than one heirarchy of classes. John, please review.
llvm-svn: 90948
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 90902
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Template instantiation can re-use DeclRefExprs.
llvm-svn: 90848
|
| |
|
|
|
|
|
| |
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.
llvm-svn: 90842
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 90831
|
| |
|
|
|
|
| |
(and the previous check-in) fixes PR5557.
llvm-svn: 90753
|
| |
|
|
| |
llvm-svn: 90750
|
| |
|
|
| |
llvm-svn: 90745
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
generating a predefined expr for them.
llvm-svn: 90725
|
| |
|
|
| |
llvm-svn: 90716
|
| |
|
|
| |
llvm-svn: 90711
|
| |
|
|
|
|
| |
inline functions.
llvm-svn: 90645
|
| |
|
|
| |
llvm-svn: 90614
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the inline class declaration but not in the actual definition:
class A {
inline void f();
}
void A::f() { }
This is not the most ideal solution, since it doesn't work 100% with regular functions (as my FIXME comment states).
llvm-svn: 90607
|
| |
|
|
|
|
| |
before declaration is finalized.
llvm-svn: 90600
|
| |
|
|
| |
llvm-svn: 90549
|
| |
|
|
| |
llvm-svn: 90542
|
| |
|
|
| |
llvm-svn: 90521
|
| |
|
|
|
|
| |
don't infinitely recurse for cases we can't evaluate.
llvm-svn: 90480
|
| |
|
|
|
|
|
| |
a new virtual function is declared/instantiated. it is used
in couple of places.
llvm-svn: 90470
|
| |
|
|
| |
llvm-svn: 90441
|
| |
|
|
| |
llvm-svn: 90435
|
| |
|
|
| |
llvm-svn: 90361
|