| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
on array and function declarators. This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.
llvm-svn: 122535
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and 'default' statements, including a Fix-It to add the colon:
test/Parser/switch-recovery.cpp:13:12: error: expected ':' after 'case'
case 17 // expected-error{{expected ':' after 'case'}}
^
:
test/Parser/switch-recovery.cpp:16:12: error: expected ':' after 'default'
default // expected-error{{expected ':' after 'default'}}
^
:
llvm-svn: 122522
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameter packs (C++0x [dcl.fct]p13), including disambiguation between
unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for
cases like
void f(T...)
where T may or may not contain unexpanded parameter packs.
llvm-svn: 122520
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.
With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.
Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.
llvm-svn: 122347
|
|
|
|
|
|
|
| |
specifications. We can't yet instantiate them, however, since I
tripped over PR8835.
llvm-svn: 122292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pack expansions, e.g. given
template<typename... Types> struct tuple;
template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};
the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.
This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.
llvm-svn: 122223
|
|
|
|
|
|
|
| |
implicitly atomic under -Wimplicit-atomic-properties
flag. // rdar://8774580
llvm-svn: 122095
|
|
|
|
| |
llvm-svn: 122041
|
|
|
|
| |
llvm-svn: 121488
|
|
|
|
|
|
| |
BinaryTypeTraitExpr.
llvm-svn: 121298
|
|
|
|
|
|
|
|
| |
disambiguation.
Fixes rdar://8739801.
llvm-svn: 121228
|
|
|
|
| |
llvm-svn: 121084
|
|
|
|
|
|
| |
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.
llvm-svn: 121074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.
In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.
This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.
Ted Kremenek kindly contributed the analyzer workarounds in this patch.
llvm-svn: 120890
|
|
|
|
| |
llvm-svn: 120828
|
|
|
|
| |
llvm-svn: 120724
|
|
|
|
|
|
|
|
|
| |
instantiations, GCC also supports "inline" and "static" explicit
template instantiations. Parse and warn about such constructs, but
don't implement the semantics of either "inline" or "static". They
don't seem to be widely used.
llvm-svn: 120599
|
|
|
|
|
|
|
|
|
|
| |
disambiguate between an expression (for a bit-field width) and a type
(for a fixed underlying type). Since the disambiguation can be
expensive (due to tentative parsing), we perform a simplistic
disambiguation based on one-token lookahead before going into the
full-blown tentative parsing. Based on a patch by Daniel Wallin.
llvm-svn: 120582
|
|
|
|
|
|
| |
testable via -ast-dump.
llvm-svn: 119971
|
|
|
|
|
|
| |
correct.
llvm-svn: 119969
|
|
|
|
| |
llvm-svn: 119968
|
|
|
|
| |
llvm-svn: 119966
|
|
|
|
|
|
|
|
|
|
| |
expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.
Thanks to Abramo Bagnara for the hint!
llvm-svn: 119887
|
|
|
|
|
|
|
|
|
| |
if (condition)
CALL(0); // empty macro but don't warn for empty body.
Fixes rdar://8436021.
llvm-svn: 119838
|
|
|
|
|
|
|
|
| |
protocol-qualifier list without a leading type (e.g., <#blah#>), don't
complain about it being an archaic protocol-qualifier list unless it
actually parses as one.
llvm-svn: 119805
|
|
|
|
|
|
| |
Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope.
llvm-svn: 119763
|
|
|
|
|
|
|
|
|
|
|
| |
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
|
|
|
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=8558). This patch fixes it. Thanks to
rjmccall for all the coaching!
Approved by rjmccall
llvm-svn: 119697
|
|
|
|
|
|
|
|
|
| |
@synthesize foo = _foo;
keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.
llvm-svn: 119447
|
|
|
|
|
|
| |
Fixes rdar://8365458
llvm-svn: 119359
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
manually managing them
using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up.
This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once. While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications.
This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser. This means that we get
simple memory management while still having the ability to finely control memory use if necessary.
Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.
This fixes the leak reported in: <rdar://problem/8650003>
llvm-svn: 118675
|
|
|
|
|
|
| |
Recover from the latter and fail early for the former. Fixes PR8022.
llvm-svn: 118669
|
|
|
|
|
|
| |
// rdar://8283484
llvm-svn: 118629
|
|
|
|
| |
llvm-svn: 118626
|
|
|
|
|
|
| |
being constructed.
llvm-svn: 118625
|
|
|
|
|
|
| |
PR7702.
llvm-svn: 118181
|
|
|
|
|
|
| |
Previously the temporaries would get destroyed before the asm call.
llvm-svn: 118001
|
|
|
|
|
|
|
| |
does not terminate with @end.
// rdar: //7824372
llvm-svn: 117991
|
|
|
|
| |
llvm-svn: 117961
|
|
|
|
| |
llvm-svn: 117182
|
|
|
|
|
|
| |
protocol-qualified types such as id<Protocol>.
llvm-svn: 117081
|
|
|
|
|
|
|
|
| |
themselves have no template parameters. This is actually a restriction
due to the grammar of template template parameters, but we choose to
diagnose it in Sema to provide better recovery.
llvm-svn: 117032
|
|
|
|
|
|
| |
Fixes rdar://problem/8568507
llvm-svn: 116843
|
|
|
|
|
|
|
| |
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527
llvm-svn: 116786
|
|
|
|
|
|
| |
literal.
llvm-svn: 116754
|
|
|
|
|
|
| |
list, complain about it! Fixes PR7053.
llvm-svn: 116551
|
|
|
|
|
|
| |
Manuel Klimek! Fixes PR7715.
llvm-svn: 116311
|
|
|
|
| |
llvm-svn: 116283
|
|
|
|
|
|
| |
skipped and not inserted into the AST for now.
llvm-svn: 116203
|
|
|
|
|
|
| |
bit by me).
llvm-svn: 116122
|