- Feb 07, 2009
-
-
Sebastian Redl authored
llvm-svn: 63987
-
Sebastian Redl authored
llvm-svn: 63983
-
- Feb 06, 2009
-
-
Douglas Gregor authored
llvm-svn: 63975
-
Douglas Gregor authored
redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
-
Ted Kremenek authored
ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). llvm-svn: 63958
-
Douglas Gregor authored
matching member exists. Thanks to Piotr Rak for reporting the problem! llvm-svn: 63939
-
- Feb 05, 2009
-
-
Douglas Gregor authored
Also, put Objective-C protocols into their own identifier namespace. Otherwise, we find protocols when we don't want to in C++ (but not in C). llvm-svn: 63877
-
Sebastian Redl authored
llvm-svn: 63866
-
- Feb 04, 2009
-
-
Douglas Gregor authored
extension. The interaction with designated initializers is a bit... interesting... but we follow GNU's lead and don't permit too much crazy code in this area. Also, make the "excess initializers" error message a bit more informative. Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561 llvm-svn: 63785
-
Mike Stump authored
llvm-svn: 63784
-
Sebastian Redl authored
llvm-svn: 63779
-
Douglas Gregor authored
DeclTy*, not TypeTy*. llvm-svn: 63756
-
Douglas Gregor authored
llvm-svn: 63750
-
Douglas Gregor authored
- Changes Lookup*Name functions to return NamedDecls, instead of Decls. Unfortunately my recent statement that it will simplify lot of code, was not quite right, but it simplifies some... - Makes MergeLookupResult SmallPtrSet instead of vector, following Douglas suggestions. - Adds %qN format for printing qualified names to Diagnostic. - Avoids searching for using-directives in Scopes, which are not DeclScope, during unqualified name lookup. llvm-svn: 63739
-
rdar://problem/6552648Steve Naroff authored
Fix <rdar://problem/6552648> error: redefinition of 'XCElementAnchorDelegate' as different kind of symbol. At first glance, this looked like a recent regression (possibly created by http://llvm.org/viewvc/llvm-project?view=rev&revision=63354, which was the only recent change to this section of Sema::ActOnStartClassInterface()). After more investigation, it looks like an edge case bug that we didn't cover in our tests. llvm-svn: 63738
-
-
Douglas Gregor authored
into the general name-lookup fold. This cleans up some ugly, not-quite-working code in the handling of operator overloading. llvm-svn: 63735
-
Douglas Gregor authored
unqualified-id '(' in C++. The unqualified-id might not refer to any declaration in our current scope, but declarations by that name might be found via argument-dependent lookup. We now do so properly. As part of this change, CXXDependentNameExpr, which was previously designed to express the unqualified-id in the above constructor within templates, has become UnresolvedFunctionNameExpr, which does effectively the same thing but will work for both templates and non-templates. Additionally, we cope with all unqualified-ids, since ADL also applies in cases like operator+(x, y) llvm-svn: 63733
-
Douglas Gregor authored
a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for two: - In an unqualified call g(x), even if the name does not refer to anything in the current scope, we can still find functions named "g" based on ADL. We don't yet have this ability. - ADL will need updating for friend functions and templates. llvm-svn: 63692
-
- Feb 03, 2009
-
-
Chris Lattner authored
llvm-svn: 63662
-
Sebastian Redl authored
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted. llvm-svn: 63655
-
Douglas Gregor authored
scopes where the name would be considered a redeclaration if we know that we're declaring or defining that tag. llvm-svn: 63647
-
Douglas Gregor authored
using directives, from Piotr Rak! llvm-svn: 63646
-
Douglas Gregor authored
elaborated-type-specifier declarations into outer scopes while retaining their proper lexical scope. This way is simpler and more consistent with the way DeclContexts work, and also fixes http://llvm.org/bugs/show_bug.cgi?id=3430 llvm-svn: 63581
-
Douglas Gregor authored
with Stmt/Expr nodes), and convert some of the more mundane switch-on-all-decl-kinds uses over to use this new file. llvm-svn: 63570
-
- Feb 02, 2009
-
-
Nuno Lopes authored
emit diagnostic when casting a ptr to a small int when doing static initialization (addresses Eli's comments I believe) llvm-svn: 63562
-
Nuno Lopes authored
llvm-svn: 63557
-
Douglas Gregor authored
direct-initialization following a user-defined conversion can select any constructor; it just can't employ any user-defined conversions. So we ban those conversions and classify the constructor call based on the relationship between the "from" and "to" types in the conversion. llvm-svn: 63554
-
Douglas Gregor authored
non-ambiguous name lookup results without allocating any memory, e.g., for sets of overloaded functions. llvm-svn: 63549
-
Douglas Gregor authored
provides too few elements. llvm-svn: 63525
-
Nuno Lopes authored
llvm-svn: 63519
-
Nuno Lopes authored
llvm-svn: 63517
-
- Jan 31, 2009
-
-
Anders Carlsson authored
llvm-svn: 63462
-
Douglas Gregor authored
sequence. Previously, we weren't permitting the second step to call copy constructors, which left user-defined conversion sequences surprisingly broken. Now, we perform overload resolution among all of the constructors, but only accept the result if it makes the conversion a standard conversion. Note that this behavior is different from both GCC and EDG (which don't agree with each other, either); I've submitted a core issue on the matter. llvm-svn: 63450
-
Anders Carlsson authored
Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862. llvm-svn: 63447
-
- Jan 30, 2009
-
-
Douglas Gregor authored
error, since both C99 and C++ consider it an error. For reference, GCC makes this a warning while G++ makes it an error. llvm-svn: 63435
-
Douglas Gregor authored
- Support initialization of reference members; complain if any reference members are left uninitialized. - Use C++ copy-initialization for initializing each element (falls back to constraint checking in C) - Make sure we diagnose when one tries to provide an initializer list for a non-aggregate. - Don't complain about empty initializers in C++ (they are permitted) - Unrelated but necessary: don't bother trying to convert the decl-specifier-seq to a type when we're dealing with a C++ constructor, destructor, or conversion operator; it results in spurious warnings. llvm-svn: 63431
-
Douglas Gregor authored
type" rather than the C definition. We do this because both C99 and Clang always use "aggregate type" as "aggregate or union type", and the C++ definition includes union types. llvm-svn: 63395
-
Douglas Gregor authored
LookupName et al. Instead, use an enum and a bool to describe its contents. Optimized the C/Objective-C path through LookupName, eliminating any unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing some code and arguments that are no longer used. Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers over to LookupName, LookupQualifiedName, or LookupParsedName, as appropriate. All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and -disable-free. Plus, we're down to three name-lookup routines. llvm-svn: 63354
-
- Jan 29, 2009
-
-
Douglas Gregor authored
Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension llvm-svn: 63327
-