- Mar 28, 2009
-
-
Eli Friedman authored
LHS type and the computation result type; this encodes information into the AST which is otherwise non-obvious. Fix Sema to always come up with the right answer for both of these types. Fix IRGen and the analyzer to account for these changes. This fixes PR2601. The approach is inspired by PR2601 comment 2. Note that this changes real *= complex in CodeGen from a silent miscompilation to an explicit error. I'm not really sure that the analyzer changes are correct, or how to test them... someone more familiar with the analyzer should check those changes. llvm-svn: 67889
-
Anders Carlsson authored
llvm-svn: 67887
-
Douglas Gregor authored
syntax into extension warnings, and provide code-modification hints showing how to fix the problem. llvm-svn: 67885
-
Douglas Gregor authored
instantiation for C++ typename-specifiers such as typename T::type The parsing of typename-specifiers is relatively easy thanks to annotation tokens. When we see the "typename", we parse the typename-specifier and produce a typename annotation token. There are only a few places where we need to handle this. We currently parse the typename-specifier form that terminates in an identifier, but not the simple-template-id form, e.g., typename T::template apply<U, V> Parsing of nested-name-specifiers has a similar problem, since at this point we don't have any representation of a class template specialization whose template-name is unknown. Semantic analysis is only partially complete, with some support for template instantiation that works for simple examples. llvm-svn: 67875
-
- Mar 27, 2009
-
-
Sebastian Redl authored
llvm-svn: 67870
-
Eli Friedman authored
remove a redundant error in CodeGen. llvm-svn: 67868
-
Anders Carlsson authored
It is OK to cast to a private base class if the current member belongs to the class that the private base class is a base of: class A {}; class B : private A { void f(B *b) { A* a = b; } }; llvm-svn: 67860
-
Anders Carlsson authored
Add a Class field to the base path element structure. This holds the record decl of the class taht the base is a base of. llvm-svn: 67859
-
Fariborz Jahanian authored
ir gen. No intended change in functionality. llvm-svn: 67857
-
Anders Carlsson authored
Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now). llvm-svn: 67827
-
Douglas Gregor authored
to a function or function pointer, it's probably because the user forgot to put in parentheses () to call the function. llvm-svn: 67826
-
Douglas Gregor authored
llvm-svn: 67824
-
Douglas Gregor authored
Remove the code insertion hint for implicit int. Too often, we're wrong about this hint, so it loses its usefulness. Maybe some day we can make the hint smart enough to be useful. llvm-svn: 67823
-
Anders Carlsson authored
llvm-svn: 67821
-
Anders Carlsson authored
llvm-svn: 67820
-
Anders Carlsson authored
llvm-svn: 67819
-
Douglas Gregor authored
llvm-svn: 67818
-
Douglas Gregor authored
classes. Test case from Anders Carlsson, fix from Piotr Rak! llvm-svn: 67817
-
rdar://6719156Chris Lattner authored
by changing blocks from being disabled in the parser to being disabled in Sema. llvm-svn: 67816
-
Douglas Gregor authored
llvm-svn: 67800
-
Douglas Gregor authored
uniqued representation that should both save some memory and make it far easier to properly build canonical types for types involving dependent nested-name-specifiers, e.g., "typename T::Nested::type". This approach will greatly simplify the representation of CXXScopeSpec. That'll be next. llvm-svn: 67799
-
Anders Carlsson authored
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, AccessSpecifier AS); so we can easily add access specifiers to diagnostics. llvm-svn: 67795
-
- Mar 26, 2009
-
-
rdar://problem/6697053Steve Naroff authored
Treat @package the same as @public. The documentation for @package says it is analogous to private_extern for variables/functions. Fully implementing this requires some kind of linker support (so access is denied to code outside the classes executable image). I don't believe GCC fully implements this semantic. Will discuss with Fariborz offline. llvm-svn: 67755
-
Eli Friedman authored
llvm-svn: 67746
-
Anders Carlsson authored
llvm-svn: 67726
-
Anders Carlsson authored
Factor the member access specifier setting code into its own function. No intended functionality change. llvm-svn: 67725
-
Anders Carlsson authored
Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate. Doug, Sebastian: Plz review! :) llvm-svn: 67723
-
Anders Carlsson authored
llvm-svn: 67722
-
Eli Friedman authored
is of type void*. I'll try to add the appropriate checking later. llvm-svn: 67721
-
Douglas Gregor authored
specializations can be treated as a template. Finally, we can parse and process the first implementation of Fibonacci I wrote! Note that this code does not handle all of the cases where injected-class-names can be treated as templates. In particular, there's an ambiguity case that we should be able to handle (but can't), e.g., template <class T> struct Base { }; template <class T> struct Derived : Base<int>, Base<char> { typename Derived::Base b; // error: ambiguous typename Derived::Base<double> d; // OK }; llvm-svn: 67720
-
Anders Carlsson authored
Also, fix fallout from the change. llvm-svn: 67717
-
Douglas Gregor authored
templates, including in-class initializers. For example: template<typename T, T Divisor> class X { public: static const T value = 10 / Divisor; }; instantiated with, e.g., X<int, 5>::value to get the value '2'. llvm-svn: 67715
-
- Mar 25, 2009
-
-
Douglas Gregor authored
llvm-svn: 67710
-
Douglas Gregor authored
llvm-svn: 67708
-
Douglas Gregor authored
the declarations of member classes are instantiated when the owning class template is instantiated. The definitions of such member classes are instantiated when a complete type is required. This change also introduces the injected-class-name into a class template specialization. llvm-svn: 67707
-
Douglas Gregor authored
llvm-svn: 67687
-
Douglas Gregor authored
llvm-svn: 67686
-
Douglas Gregor authored
llvm-svn: 67684
-
Anders Carlsson authored
class C { C() { } int a; }; C::C() : a(10) { } We also diagnose when initializers are used on declarations that aren't constructors: t.cpp:1:10: error: only constructors take base initializers void f() : a(10) { } ^ Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.) llvm-svn: 67672
-
Douglas Gregor authored
llvm-svn: 67664
-