| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we were going to enter into the scope of a class template or class
template partial specialization, rebuild that type so that it can
refer to members of the current instantiation, as in code like
template<typename T>
struct X {
typedef T* pointer;
pointer data();
};
template<typename T>
typename X<T>::pointer X<T>::data() { ... }
Without rebuilding the return type of this out-of-line definition, the
canonical return type of the out-of-line definition (a TypenameType)
will not match the canonical return type of the declaration (the
canonical type of T*).
llvm-svn: 78316
|
| |
|
|
| |
llvm-svn: 78274
|
| |
|
|
|
|
| |
tighten up the static type system.
llvm-svn: 78164
|
| |
|
|
| |
llvm-svn: 78140
|
| |
|
|
| |
llvm-svn: 78102
|
| |
|
|
|
|
|
|
| |
elsewhere. Very slightly decouples DeclSpec users from knowing the exact
diagnostics to report, and makes it easier to provide different diagnostics in
some places.
llvm-svn: 77990
|
| |
|
|
| |
llvm-svn: 77985
|
| |
|
|
| |
llvm-svn: 77660
|
| |
|
|
|
|
| |
and a name collision.
llvm-svn: 77658
|
| |
|
|
|
|
| |
will be :)
llvm-svn: 77650
|
| |
|
|
| |
llvm-svn: 77573
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
|
| |
|
|
| |
llvm-svn: 77402
|
| |
|
|
| |
llvm-svn: 77391
|
| |
|
|
| |
llvm-svn: 77377
|
| |
|
|
| |
llvm-svn: 77291
|
| |
|
|
|
|
| |
Codegen by initializing the return value with its LLVM type's null value.
llvm-svn: 77288
|
| |
|
|
| |
llvm-svn: 77279
|
| |
|
|
| |
llvm-svn: 77254
|
| |
|
|
|
|
| |
the noreturn attribute.
llvm-svn: 77253
|
| |
|
|
| |
llvm-svn: 77237
|
| |
|
|
|
|
| |
definition, which are currently ignored.
llvm-svn: 77095
|
| |
|
|
|
|
| |
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
|
| |
|
|
|
|
|
| |
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
|
| |
|
|
| |
llvm-svn: 76934
|
| |
|
|
|
|
| |
the end.
llvm-svn: 76932
|
| |
|
|
|
|
|
|
| |
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
llvm-svn: 76916
|
| |
|
|
| |
llvm-svn: 76906
|
| |
|
|
|
|
|
|
|
| |
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.
Removed the ActOnClassTemplate action, which is no longer used.
llvm-svn: 76881
|
| |
|
|
|
|
|
| |
- As it happens, this also fixes a use-of-uninitialized memory that was causing
non-deterministic test failures.
llvm-svn: 76857
|
| |
|
|
|
|
| |
filesystems.
llvm-svn: 76824
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:
int() { bar(); }
when bar does:
bar() { while (1) ; }
Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.
If anyone spots other false positives, let me know!
llvm-svn: 76821
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
templates, e.g.,
template<typename T>
struct Outer {
struct Inner;
};
template<typename T>
struct Outer<T>::Inner {
// ...
};
Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.
There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.
llvm-svn: 76820
|
| |
|
|
|
|
| |
the order of evaluation of their arguments to be correct.
llvm-svn: 76804
|
| |
|
|
|
|
| |
[class.union]p1", from John McCall!
llvm-svn: 76766
|
| |
|
|
|
|
|
| |
data members of class templates. We don't instantiate the definitions yet,
however.
llvm-svn: 76756
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
member functions of class templates, e.g.,
template<typename T>
struct X {
void f(T);
};
template<typename T> X<T>::f(T) { /* ... */ }
llvm-svn: 76692
|
| |
|
|
|
|
| |
destruction of base/members for each destructor AST.
llvm-svn: 76663
|
| |
|
|
| |
llvm-svn: 76577
|
| |
|
|
|
|
| |
Zaffanella, with tweaks from Abramo Bagnara.
llvm-svn: 76576
|
| |
|
|
|
|
| |
don't replace the type of the field with 'int', from Enea Zaffanella!
llvm-svn: 76454
|
| |
|
|
|
|
| |
incomplete type (with a warning), from Enea Zaffanella!
llvm-svn: 76451
|
| |
|
|
| |
llvm-svn: 76376
|
| |
|
|
| |
llvm-svn: 76269
|
| |
|
|
|
|
|
|
|
| |
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
|
| |
|
|
|
|
| |
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
llvm-svn: 76139
|
| |
|
|
|
|
| |
Convert all clients to use the new predicate on Type.
llvm-svn: 76076
|
| |
|
|
|
| |
Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).
llvm-svn: 75635
|
| |
|
|
|
|
|
|
|
| |
- Declaration context of ParmVarDecls (that we got from the Declarator) was not their containing function.
- C++ out-of-line method definitions didn't get an access specifier.
Both were exposed by a crash when emitting a C++ method to a PCH file (assert at Decl::CheckAccessDeclContext()).
llvm-svn: 75597
|
| |
|
|
| |
llvm-svn: 75591
|