History log of /external/clang/lib/Parse/ParseInit.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Parse/ParseInit.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Parse/ParseInit.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Parse/ParseInit.cpp
8fe2475a4b4c00475709c13d43eb9a57cce87cbc 18-Nov-2013 Alexey Bataev <a.bataev@hotmail.com> Replaced bool parameters in SkipUntil function with single bit-based parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
62ed889272d7e9da8e367d8682fdcdeeec0d83b5 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Replace 'MultiExprArg()' with 'None'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
80ad52f327b532bded5c5b0ee38779d841c6cd35 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CPlusPlus0x/CPlusPlus11/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
5354e77e60e82828c7c2361f5c688c2667ab59cc 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.

This required changing all get() calls to data() and using the simpler constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
4e28d9e2ba9ce237549b45cfd4136ec6536d1325 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove ASTOwningVector, it doesn't own anything and provides no value over SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
3fe198bf0d6118c7b080c17c3bb28d7c84e458b9 23-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Rip out remnants of move semantic emulation and smart pointers in Sema.

These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
6ee326af4e77e6f05973486097884d7431f2108d 10-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Disambiguation of '[[':
* In C++11, '[[' is ill-formed unless it starts an attribute-specifier. Reject
array sizes and array indexes which begin with a lambda-expression. Recover by
parsing the lambda as a lambda.
* In Objective-C++11, either '[' could be the start of a message-send.
Fully disambiguate this case: it turns out that the grammars of message-sends,
lambdas and attributes do not actually overlap. Accept any occurrence of '[['
where either '[' starts a message send, but reject a lambda in an array index
just like in C++11 mode.

Implement a couple of changes to the attribute wording which occurred after our
attributes implementation landed:
* In a function-declaration, the attributes go after the exception specification,
not after the right paren.
* A reference type can have attributes applied.
* An 'identifier' in an attribute can also be a keyword. Support for alternative
tokens (iso646 keywords) in attributes to follow.

And some bug fixes:
* Parse attributes after declarator-ids, even if they are not simple identifiers.
* Do not accept attributes after a parenthesized declarator.
* Accept attributes after an array size in a new-type-id.
* Partially disamiguate 'delete' followed by a lambda. More work is required
here for the case where the lambda-introducer is '[]'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
d267b3f03a3b35ca218dc2b0995ccff35092cf33 17-Feb-2012 Douglas Gregor <dgregor@apple.com> De-nest tentative parsing to disambiguate lambdas from designators; no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
b3f323d6c41cb614a249dbc4af7493762786521a 17-Feb-2012 Douglas Gregor <dgregor@apple.com> Disambiguate between C++11 lambda expressions and C99 array
designators in the parser. In the worst case, this disambiguation
requires tentative parsing just past the closing ']', but for most
cases we'll be able to tell by looking ahead just one token (without
going into the heavyweight tentative parsing machinery).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
9d24a8be93b28488dbfb9bbe8aa6fe35b21a5b0c 13-Dec-2011 Francois Pichet <pichet2000@gmail.com> Implement the Microsoft __if_exists/if_not_exists extension in initializer-list.
Necessary to parse Microsoft ATL code.

Example:
int array[] = {
0,
__if_exists(CLASS::Type) {2, }
3
};

will declare an array of 2 or 3 elements depending on if CLASS::Type exists or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
4a8dfb511e8f84b2e38b7a86d8ddf05ac1e1a41b 12-Oct-2011 Douglas Gregor <dgregor@apple.com> Introduce BalancedDelimiterTracker, to better track open/close
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
40a0f9c1ca14f0b4a07eb9894523b55093bc182b 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Improve caret location for the GNU old-style field designator warning, from David Blaikie

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
dcaa1ca0b475dfa887e1d061678a1e3501288510 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions in initializer lists and
expression lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
0fbda68b50ce17d7ad36ef7a5ed77518a5cd272e 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement bracket insertion for Objective-C instance message sends as
part of parser recovery. For example, given:

a method1:arg];

we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:

fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[

The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
f312b1ea179f1c44371f9ee0cd0bc006f612de11 27-Aug-2010 John McCall <rjmccall@apple.com> One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
60d7b3a319d84d688752be3870615ac0f111fb16 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c 24-Aug-2010 John McCall <rjmccall@apple.com> Abstract out passing around types and kill off ActionBase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
9ae2f076ca5ab1feb3ba95629099ec2319833701 24-Aug-2010 John McCall <rjmccall@apple.com> Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
ca0408fb49c1370430672acf2d770b7151cf71de 23-Aug-2010 John McCall <rjmccall@apple.com> Sundry incremental steps towards killing off Action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
23c94dbb6631fecdb55ba401aa93722803d980c6 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Move the "current scope" state from the Parser into Action. This
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed.

Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
6aa14d832704ae176c92d4e0f22dfb3f3d83a70a 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement parsing for message sends in Objective-C++. Message sends in
Objective-C++ have a more complex grammar than in Objective-C
(surprise!), because

(1) The receiver of an instance message can be a qualified name such
as ::I or identity<I>::type.
(2) Expressions in C++ can start with a type.

The receiver grammar isn't actually ambiguous; it just takes a bit of
work to parse past the type before deciding whether we have a type or
expression. We do this in two places within the grammar: once for
message sends and once when we're determining whether a []'d clause in
an initializer list is a message send or a C99 designated initializer.

This implementation of Objective-C++ message sends contains one known
extension beyond GCC's implementation, which is to permit a
typename-specifier as the receiver type for a class message, e.g.,

[typename compute_receiver_type<T>::type method];

Note that the same effect can be achieved in GCC by way of a typedef,
e.g.,

typedef typename computed_receiver_type<T>::type Computed;
[Computed method];

so this is merely a convenience.

Note also that message sends still cannot involve dependent types or
values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
1569f95831a8c99e9f664137bf8f40e47ee3d90f 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Migrate the responsibility for turning the receiver name in an
Objective-C class message expression into a type from the parser
(which was doing so in two places) to Action::getObjCMessageKind()
which, in the case of Sema, reduces the number of name lookups we need
to perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
2725ca8eb3354975ca77ed4b88ede7b60b216b9a 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework the Parser-Sema interaction for Objective-C message
sends. Major changes include:

- Expanded the interface from two actions (ActOnInstanceMessage,
ActOnClassMessage), where ActOnClassMessage also handled sends to
"super" by checking whether the identifier was "super", to three
actions (ActOnInstanceMessage, ActOnClassMessage,
ActOnSuperMessage). Code completion has the same changes.
- The parser now resolves the type to which we are sending a class
message, so ActOnClassMessage now accepts a TypeTy* (rather than
an IdentifierInfo *). This opens the door to more interesting
types (for Objective-C++ support).
- Split ActOnInstanceMessage and ActOnClassMessage into parser
action functions (with their original names) and semantic
functions (BuildInstanceMessage and BuildClassMessage,
respectively). At present, this split is onyl used by
ActOnSuperMessage, which decides which kind of super message it
has and forwards to the appropriate Build*Message. In the future,
Build*Message will be used by template instantiation.
- Use getObjCMessageKind() within the disambiguation of Objective-C
message sends vs. array designators.

Two notes about substandard bits in this patch:
- There is some redundancy in the code in ParseObjCMessageExpr and
ParseInitializerWithPotentialDesignator; this will be addressed
shortly by centralizing the mapping from identifiers to type names
for the message receiver.
- There is some #if 0'd code that won't likely ever be used---it
handles the use of 'super' in methods whose class does not have a
superclass---but could be used to model GCC's behavior more
closely. This code will die in my next check-in, but I want it in
Subversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
1e46136c5222ad040fd783ca7ee6b2215f0b89d6 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix a bug I noticed by inspection, correcting two reject-valid bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
eb483eb3ee80300f15d6d13573d82493c2194461 11-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod. Doing so allows all sorts of invalid code
to slip through to codegen. This patch does not change the
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.

There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
849b243d4065f56742a4677d6dc8277609a151f8 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate my CodeModificationHint -> FixItHint renaming patch, without
the C-only "optimization".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
275313cbb0847f1f117f60d144d113804d4fa42d 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
d0ebe080eee7c37e73754068b47fd90cc506e128 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
01eb9b9683535d8a65c704ad2c545903409e2d36 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
62a7217b1a848fadeca15d868aa7abe15a321b52 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Avoid std::string concatenation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
45db71d295cfda888a6187d950bba695ce21a287 21-May-2009 Douglas Gregor <dgregor@apple.com> Merge the ASTVector and ASTOwningVector templates, since they offered
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
558cb56caf8906e0adbe643e3febbef0b7af1b9f 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Introduce a "-fixit" mode to clang-cc that applies code-modification hints.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
eeae8f072748affce25ab4064982626361293390 28-Mar-2009 Douglas Gregor <dgregor@apple.com> Make our diagnostics about the obsolete GNU designated-initializer
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
68c56dea080efd6db7a444de84c270bf4e2d4d2e 28-Mar-2009 Douglas Gregor <dgregor@apple.com> Fix <rdar://problem/6724396>, where we were silently dropping
GNU-style array designators, causing us to emit broken initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
5908a9293b88a3da57ae59b522275d05e1ab11e0 21-Mar-2009 Douglas Gregor <dgregor@apple.com> InitListDesignations hasn't been used (ever). Eliminate it, and
simplify the parsing and action interface for designated
initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
76ad2e85575722e8a38a2bd4648ab4304d9fcd24 05-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Put the invalid flag of OwningResult into the Action pointer.
This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two.
This leads to simpler client code and speeds up my benchmark by 2.7%.
For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
930d8b5ecc074cca01ecd9a522a55f55f3b72396 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Implement and test aggregate initialization in C++. Major changes:

- 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 29-Jan-2009 Chris Lattner <sabre@nondot.org> move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
20c6b3b85e186cd52d5d99489132d71d498159eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Split the single monolithic DiagnosticKinds.def file into one
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
05c13a3411782108d65aab3c77b1a231a4963bc0 22-Jan-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of semantic analysis and ASTs for C99
designated initializers. This implementation should cover all of the
constraints in C99 6.7.8, including long, complex designations and
computing the size of incomplete array types initialized with a
designated initializer. Please see the new test-case and holler if you
find cases where this doesn't work.

There are still some wrinkles with GNU's anonymous structs and
anonymous unions (it isn't clear how these should work; we'll just
follow GCC's lead) and with designated initializers for the members of a
union. I'll tackle those very soon.

CodeGen is still nonexistent, and there's some leftover code in the
parser's representation of designators that I'll also need to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
b8a6aca87d07b22b257153ce0dfc92f78c8f8c1f 19-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more expression actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
f512e82f56671b695a32d019103e62a302838b7e 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Rename move_convert to move_arg and move_res. The new names are less misleading (and shorter).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
1d922960e083906a586609ac6978678147250177 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert remaining expression parsers to smart pointers. Now on to the Action connection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
20df9b7ab9388b2a488c5b1293cd196b1e073b4e 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a big bunch of expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
2f7ece7c77eb17e24e8f0f4e1b7fb01aa5111f96 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert selected expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
effa8d1c97b00a3f53e972b0e61d9aade5ea1c57 10-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Modify the move emulation according to the excellent design of Howard Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
15faa7fdfb496489dec9470aa5eb699b29ecdacc 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResult

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
0e9eabca263e8922bec0e2b38c8670eba9a39a1f 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Consistently use smart pointers for stmt and expr nodes in parser local variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
a55e52c0802cae3b7c366a05c461d3d15074c1a3 25-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Use RAII objects to ensure proper destruction of expression and statement AST nodes in the parser in most cases, even on error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 19-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6150376> [sema] crash on invalid message send.

The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
e2f56196e916e4d2f9eeec5c8978490cdedb3f64 03-Nov-2008 Chris Lattner <sabre@nondot.org> Fix PR3001: if we have an error parsing an initializer, make sure to remove
the designator corresponding to it, otherwise Sema and later parsing will
get confused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
220ad7c8d1adc23799e480faf189332f1eb032e6 27-Oct-2008 Chris Lattner <sabre@nondot.org> pass designators into sema. This completes parser-level designator
support as far as I know.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
0fc73f722fd76a9cc9932e5d21eebfe5a3c81080 27-Oct-2008 Chris Lattner <sabre@nondot.org> implement some more FIXMEs, by rejecting more bogus stuff in
objc mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
79ed6b5902ed92175b70ed3c4d7b3f239af847ce 27-Oct-2008 Chris Lattner <sabre@nondot.org> add some simple designator testcases. Reject things like this:

struct foo Y[10] = {
[4] .arr [2] 4 // expected-error {{expected '=' or another designator}}
};

because the "missing equals" extension only is valid if there
is exactly one array designator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
e232942571a80549514791bbdbbd0bb44fab6b56 27-Oct-2008 Chris Lattner <sabre@nondot.org> improve comments, build array and array range designator nodes,
fix an obscure memory leak.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
0a68b9449136b0d5664bfa48a51a0c1181d2eca8 26-Oct-2008 Chris Lattner <sabre@nondot.org> improve comments, build a Designation for field designators and
improve diagnostic for a malformed field designator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
7f9690d79f04b405f9e41e98f2e2698ffd640c8e 26-Oct-2008 Chris Lattner <sabre@nondot.org> restructure ParseInitializerWithPotentialDesignator to make it
easier to understand and hack on, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
efcadc64ee200ae74b3859097e3e7ec5fa93a252 26-Oct-2008 Chris Lattner <sabre@nondot.org> improve MayBeDesignationStart to do the entire determination
about whether a leading identifier is a designator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
0eec2b58678f71af6b5fcf4c439290c0d640546b 26-Oct-2008 Chris Lattner <sabre@nondot.org> inline the decision logic that chooses between an assign expr and brace
initializer, avoiding an extra level of calls for silly things like
'int x = 4'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
eccc53a0a0ed1abc7bb4c04ed9566ce0c5c63140 26-Oct-2008 Chris Lattner <sabre@nondot.org> This patch continues parser-level implementation of designators:

1. It introduces new parser level abstractions for designators
that are used to communicate between parser and sema.
2. This fixes a FIXME where "identifier ':'" was considered to be
a designator even if it wasn't the first in a designator list.
3. In the "identifier ':'" case, it actually builds the designator
representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
838cb21b800e55d88201fa76b978a7d11478c655 26-Oct-2008 Chris Lattner <sabre@nondot.org> minor cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
f7da726f09a6b7c5b9f5308e9690cb015398e671 10-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify the parser a bit by looking at the next token without consuming it (by Preprocessor::LookNext):

-Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier.
-Separate ParseLabeledStatement from ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
b93fb495660665c17c7f43172ae155d6a8c32ce8 02-Jun-2008 Chris Lattner <sabre@nondot.org> handle the full assignment-expression grammar when using an
objc message send in an initializer expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
65bb89c3825406bdeeab6b2d8408b72deac8bbb2 20-Apr-2008 Chris Lattner <sabre@nondot.org> Two improvements to initializer parsing:
1. If we hit a semantic error, try harder to recover to emit
diagnostics for later initializer errors (PR2241).
2. Don't leak parsed initializers on an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseInit.cpp