History log of /external/clang/lib/Parse/ParseStmt.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
33337ca4d89605025818daf83390ab4271d598d9 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/Parse/ParseStmt.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Parse/ParseStmt.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/Parse/ParseStmt.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/Parse/ParseStmt.cpp
c568f1e98938584c0ef0b12ae5018ff7d90a4072 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/ParseStmt.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
93982a7557fae3c72d84a3fc4c8d2b9852ccc5db 15-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR8455: Handle an attribute between a goto label and a variable declaration per
the GNU documentation: the attribute only appertains to the label if it is
followed by a semicolon. Based on a patch by Aaron Ballman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
aed01168e7593c42ce99aaf1c48deeb8a77dd120 15-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> Diagnose C++11 attributes before fp_contract pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c94b5ae20dbe84d7e5b767df1b3dc8298ed70e32 30-Oct-2013 Alp Toker <alp@nuanti.com> Avoid diagnosing twice on non-x86 targets

The PowerPC and ARM native builders spotted this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
259731591edb358ada4d974544faf09b4a5a1249 30-Oct-2013 Alp Toker <alp@nuanti.com> Recover instead of crashing on MS assembly when no target is loaded

It's possible to embed the frontend in applications that haven't initialized
backend targets so we need to handle this condition gracefully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
961d0573487933199cb287ce8c472121812b3c78 28-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix a parser crash when there are #pragmas in a context which requires a single
statement (after a case label, if, etc). Patch by Olivier Goffart!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d661d50118716e9695af5a893a2df45e87a6b3c8 22-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Revert r193073 and the attempt to fix it in r193170.

This patch wasn't reviewed, and isn't correctly preserving the behaviors
relied upon by QT. I don't have a direct example of fallout, but it
should go through the standard code review process. For example, it
should never have removed the QT test case that was added when fixing
those users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
37acb250dbcf580393c9936c1e71552f84220398 22-Oct-2013 Serge Pavlov <sepavloff@gmail.com> Reenable 'break' in 'for' specifier to allow compilation of QT macro 'foreach'

This is a fix to PR17649, caused by fix in r193073. QT uses 'break' statement
to implement their 'foreach' macro. To enable build of QT, this fix reenables
break but only in 'for' statement specifier and only in the third expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
fb90266d8bb5a977de45d07e702277f4cb54d74e 21-Oct-2013 Serge Pavlov <sepavloff@gmail.com> Fix to PR8880 (clang dies processing a for loop).

Due to statement expressions supported as GCC extension, it is possible
to put 'break' or 'continue' into a loop/switch statement but outside its
body, for example:

for ( ; ({ if (first) { first = 0; continue; } 0; }); )

Such usage must be diagnosed as an error, GCC rejects it. To recognize
this and similar patterns the flags BreakScope and ContinueScope are
temporarily turned off while parsing condition expression.

Differential Revision: http://llvm-reviews.chandlerc.com/D1762


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5eed7e00b4ac8d589ca83e126dafa8767e8a0358 15-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Tidy up and improve error recovery for C++11 attributes in bad places. Based on
a patch by Michael Han.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a89ee579e86912302251dd9b06a472b4531f864f 02-Oct-2013 Kaelyn Uhrain <rikka@google.com> Fix a typo suggestion regression introduced by r191544.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
2ceb67a5345ef711468a32dbf17769828b5fbadd 28-Sep-2013 Kaelyn Uhrain <rikka@google.com> Don't suggest namespaces if the next token is a '.'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0f90ee0939ae785f412da07e94afdf8053681b39 27-Sep-2013 Kaelyn Uhrain <rikka@google.com> Don't give suggest things like function names on the left side of "=".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6243f627680fbf7c5bf2f339967d806f47153746 27-Sep-2013 Kaelyn Uhrain <rikka@google.com> Avoid the hard-coded limit on the number of typo corrections attempted.

Move some tests from typo-correction.cpp to typo-correction-pt2.cpp
because they were running afoul of the hard-coded limit of 20 typos
corrected. Some of the tests after it were still working due to the
limit not applying to cached corrections and in cases where a non-NULL
MemberContext is passed in to Sema::CorrectTypo. Most of the moved tests
still passed after being moved, but the test involving "data_struct" had
only been passing because the test had exceeded that limit so a fix for
it is also included (most of the changes to ParseStmt.cpp are shared with
and originated from another typo correction impovement that was split
into a separate commit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
175d417134124df3abba8d874e51f04d5b4b9ee6 16-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add some missing ProhibitAttributes calls to some declaration-like #pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
12981a7238e9caf0254fee1761deea48dcbcf040 12-Sep-2013 Joey Gouly <joey.gouly@arm.com> Fix the MCTargetAsmParser API change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
21adb0ce21d8180b5dce0a31209cba3a5a33e26a 22-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> const'ify Sema::ActOnCXXTryBlock by
changing Parameter from MutableArrayRef to
ArrayRef.
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
e0f720eaa958fa3eb539851779c51b8371e09e7b 21-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Remove Extension warning for GNU local labels.

We generally don't warn about extensions involving keywords reserved
for the implementation, so we shouldn't warn here either: the
standard doesn't require it, and it doesn't provide useful information
to the user.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c895f4d411152b08365cac48f330a8a7898fb382 19-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> const'ify Sema::ActOnCompoundStmt by
changing Parameter of Sema::ActOnCompoundStmt from MutableArrayRef to
ArrayRef.
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4fa7eab771ab8212e1058bd1a91061ff120c8fbb 19-Jul-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: basic support for #pragma omp parallel


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4549d7ffc15bdd7ab860aa68db089d9f559b79e7 09-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and
Sema::ActOnDocumentableDecls.

Patch by Robert Wilhelm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4b7bae35fc29190f30ddabf314864ac7a7bd1c04 18-Jun-2013 Bill Wendling <isanbard@gmail.com> Update to pass in pointers intead of references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
1fcf31efaf58fcdf274409cf8926915636bce033 13-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Update for LLVM interface change in r181680.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
aeeacf725c9e0ddd64ea9764bd008e5b6873ce51 03-May-2013 John McCall <rjmccall@apple.com> Move parsing of identifiers in MS-style inline assembly into
the actual parser and support arbitrary id-expressions.

We're actually basically set up to do arbitrary expressions here
if we wanted to.

Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.

I've also fixed the serialization of MS asm statements.

This commit depends on an LLVM commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
85192c7fe187d5486e12dbc6960af28f16a558a0 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Parser support for #pragma clang __debug captured

This patch implements parsing ‘#pragma clang __debug’ as a first step for
implementing captured statements. Captured statements are a mechanism for
doing outlining in the AST.
see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

Currently returns StmtEmpty

Author: Andy Zhang <andy.zhang@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D369


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4cf4a5e96ab0babd13774b17112e7c1d83042ea7 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Support C11 _Atomic type qualifier. This is more-or-less just syntactic sugar for the _Atomic type specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 22-Mar-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP threadprivate directive parsing and semantic analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b760f11fae94e3003b9241ac50c02617465f2fa2 22-Mar-2013 John McCall <rjmccall@apple.com> Fix a crash-on-valid where a block capture copy expression was
picking up cleanups from earlier in the statement. Also fix a
crash-on-invalid where a reference to an invalid decl from an
enclosing scope was causing an expression to fail to build, but
only *after* a cleanup was registered from that statement,
causing an assertion downstream.

The crash-on-valid is rdar://13459289.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
1f12c47ae90c03633496d96e79a61762097a4681 22-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix a crash with invalid code, while skip function bodies is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6b3d3e54c003b03f16e235ad2ff49e95587bbf92 20-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Process and handle attributes on conditions and for loop variables. Process and
diagnose attributes on alias declarations, using directives, and attribute
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
820b23dc924a4ae7af07d5a75d6b1d781c267d57 15-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> When a statement is dropped from the AST because it was invalid, make sure
we don't do the scope checks otherwise we are going to hit assertion checks
since a label may not have been actually added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4cd81c5bf5957b2b10ddf253035f6e1596082108 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b2e2157f905b0b6e27f1d3f5e1f38778c6731813 22-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-style
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c666cf404d37d6624a4efdf06cc2f9f1995cfe9c 22-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove a warning about ms-style inline assembly not being
supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
419563768ef4929a622d7c2b066856e82901bb91 14-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor to call ActOnFinishFullExpr on every full expression. Teach
ActOnFinishFullExpr that some of its checks only apply to discarded-value
expressions. This adds missing checks for unexpanded variadic template
parameter packs to a handful of constructs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4e24f0f711e2c9fde79f19fa1c80deaab3f3b356 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few nearby 'C++0x' comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
d11f4355a77ab1f8897847d9a458b9f2447d44a4 31-Dec-2012 Nico Weber <nicolasweber@gmx.de> Simplify. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
35f3f36cb9451f347b83a6e7f01e3c702df4732d 06-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
that was skipped by the parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
15490fd42d7d8dca2f9b5b3a9dc074892ca1acd7 05-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver, ms-inline asm] MS-Style inline assembly is controlled by the
-fasm-blocks flag, not the -fms-extensions flag.
rdar://12808010

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
1a5bd5d680726f3d133da27791b228b2c8fe96c6 19-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14381: Never skip constexpr function bodies when code-completing. We may need
them in order to parse the rest of the file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
e5afdcfd6a80efc20b0a2e5bde806c08c3bda887 13-Nov-2012 David Blaikie <dblaikie@gmail.com> Simplify function try/catch scope handling.

Based on post-commit review feedback for r167766 by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3a9fefed0749f7a293379156c22a24509c24cc3e 12-Nov-2012 David Blaikie <dblaikie@gmail.com> Fix more try scoping bugs introduced by r167650.

Introduces more clear scoping flags & flag combinations which should hopefully
be more understandable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c4027c82ad4a61f2da1b893ac8fe47bf11e5d50d 10-Nov-2012 David Blaikie <dblaikie@gmail.com> PR14296: function parameter name collisions in function try/catch

C++11 3.3.3/2 "A parameter name shall not be redeclared in the outermost block
of the function definition nor in the outermost block of any handler associated
with a function-try-block."

It's not totally clear to me whether the "FIXME" case is covered by this, but
Richard Smith thinks it probably should be. It's just a bit more involved to
fix that case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a60d21d9ffd2a995c58dc5c5a4e3d9a014e3bc60 03-Nov-2012 Lang Hames <lhames@gmail.com> Support interleaving of other pragmas with FP_CONTRACT at the beginning of a
compound statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
81939a752bfb4adbe302e2872271be195e2eacb2 31-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> If skipping bodies is enabled outside code-completion, just skip the body directly
without using tentative parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6a656620f67c3911403c704d428f036891a935c1 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> Removed an extra blank line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
860022ccf71b3d63acd29912af970dad655630f7 21-Oct-2012 Lang Hames <lhames@gmail.com> When used in a compound expression FP_CONTRACT should proceed all explicit
declarations and statements. Emit an error if the FP_CONTRACT is used
later in a compound statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8b2bfdda35de8239df0ff4a588214d5876a38d28 10-Oct-2012 Eli Friedman <eli.friedman@gmail.com> People put pragmas in crazy places; add more handling. PR14046.

I think our general framework for parser pragmas needs a bit more work,
but I'm not planning on working on it at the moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3ef38eea7ce400718e4ab523b4704ae1fd8f940f 09-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we allow "#pragma options align=mac68k" in function-local contexts. <rdar://problem/12453134>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
9595c7e2533c836537dc300e75d059c29feb7094 04-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Permanently end the whole "pragma got handled by the parser too early"
mess by handling all pragmas which the parser touches uniformly.
<rdar://problem/12248901>, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
be9af1288881110e406b87914162eaa59f1e5918 02-Oct-2012 Lang Hames <lhames@gmail.com> Add FP_CONTRACT support for clang.

Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8b533d97e0683a0c87096b95927a2e9ce02243d4 20-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> If the range in a for range statement doesn't have a viable begin/end function,
but can be dereferenced to form an expression which does have viable begin/end
functions, then typo-correct the range, even if something else goes wrong with
the statement (such as inaccessible begin/end or the wrong type of loop
variable).

In order to ensure we recover correctly and produce any followup diagnostics in
this case, redo semantic analysis on the for-range statement outside of the
diagnostic trap, after issuing the typo-correction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
568ba871bbac959029671b81f8e531edb7e0d7d6 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163083 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5be92de217a1940d0e109abd0f401df4480c1a4b 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 25-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
56d7f2348a182002563700db2158da0c6fc115a5 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.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/ParseStmt.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/ParseStmt.cpp
e1715b66a878bcab315513351e5df68bfc010d2e 21-Aug-2012 Sam Panzer <espanz@gmail.com> Better diagnostics for range-based for loops with bad range types.

The old error message stating that 'begin' was an undeclared identifier
is replaced with a new message explaining that the error is in the range
expression, along with which of the begin() and end() functions was
problematic if relevant.

Additionally, if the range was a pointer type or defines operator*,
attempt to dereference the range, and offer a FixIt if the modified range
works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0576681bac125be07f77f66b02a3dba2c3a24557 18-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and
nested names as id-expressions, using the annot_primary_expr annotation, where
possible. This removes some redundant lookups, and also allows us to
typo-correct within tentative parsing, and to carry on disambiguating past an
identifier which we can determine will fail lookup as both a type and as a
non-type, allowing us to disambiguate more declarations (and thus offer
improved error recovery for such cases).

This also introduces to the parser the notion of a tentatively-declared name,
which is an identifier which we *might* have seen a declaration for in a
tentative parse (but only if we end up disambiguating the tokens as a
declaration). This is necessary to correctly disambiguate cases where a
variable is used within its own initializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bc20bbb0bf90446a469848c658ca376832f43dc8 16-Aug-2012 Sam Panzer <espanz@gmail.com> Removed unused LParenLoc parameter to ActOnCXXForRangeStmt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f37e4218bb40ed956f0ef1d2e5eee2b2c3aa20d2 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] MSVC parses multiple __asm statements on a single line as one
statement. For example,

if (x)
__asm out dx, ax __asm out dx, ax

results in a single inline asm statement (i.e., both "out dx, ax" statements are
predicated on if(x)).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7bd092b054444e9800e8de1d8d71c408dbdc8ead 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the left brace source location and improve the pretty
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
92570bd1597f355d5673a94960323f81d99c4921 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the last bits of LineEnds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
21ef7116ef308ba565b094ab32559f1eb1c277b7 14-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add a helpful assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
62f22b87801882646418bae85111e565f7a53ddb 08-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor the logic to generate the AsmString into Sema. No
functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
79efe24e125553b7fd4a35ffb3b7a45c4f1e661a 07-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Stmt destructors are never called, so allocate the AsmToks using
the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8f726de55412870ef70e788b852c6cc50873e15b 06-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional
change intended. No test case as there's no real way to test at this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b660446bcf47bfbcdebaf65a6616c4046579987a 10-Jul-2012 Chad Rosier <mcrosier@apple.com> 80-column violations and whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a1eec4bd198b96ef40a7c15cd0e131ca94511ad8 04-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Refactor parse/sema portion of
objective-c's fast enumeration statement,
for more work to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
2edf0a2520313cde900799b1eb9bd11c9c776afe 23-Jun-2012 Sean Hunt <scshunt@csclub.uwaterloo.ca> Clean up a large number of C++11 attribute parse issues, including parsing
attributes in more places where we didn't and catching a lot more issues.

This implements nearly every aspect of C++11 attribute parsing, except for:
- Attributes are permitted on explicit instantiations inside the declarator
(but not preceding the decl-spec)
- Attributes are permitted on friend declarations of functions.
- Multiple instances of the same attribute in an attribute-list (e.g.
[[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming)
are allowed.
The first two are marked as expected-FIXME in the test file and the latter
is probably a defect and is currently untested.

Thanks to Richard Smith for providing the lion's share of the testcases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b3b26bfe61558232ccd0053697a143a30ac1e079 12-Jun-2012 Chad Rosier <mcrosier@apple.com> [ms-inline-asm] The __asm keyword is a statement separator, so multiple asm
statements are allowed on the same line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a01eddbd07aa7e864da14cae20ce772dfdd082fa 12-Jun-2012 Chad Rosier <mcrosier@apple.com> [ms-inline-asm] Cleanup MS style inline assembly parsing.

Specifically, improve the handling of whitespace, stop saving tokens that are
in comments and fix the case where we have a comment followed by a closing brace
on the next line.

Unfortunately, there's no easy way of testing this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8cd64b4c5553fa6284d248336cb7c82dc960a394 11-Jun-2012 Chad Rosier <mcrosier@apple.com> Etch out the code path for MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
def07624ecc535431e0c814b4b5b842de8a06997 16-May-2012 David Blaikie <dblaikie@gmail.com> Include the correct conversion context locations for condition expressions.

This improves the conversion diagnostics (by correctly pointing to the loop
construct for conversions that may've been caused by the contextual conversion
to bool caused by a condition expression) and also causes the NULL conversion
warnings to be correctly suppressed when crossing a macro boundary in such a
context. (previously, since the conversion context location was incorrect, the
suppression could not be performed)

Reported by Nico Weber as feedback to r156826.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bddc7e5ed3982b5845e4fbb5d9bc7b7431c35a4f 28-Apr-2012 Chris Lattner <sabre@nondot.org> improve error recovery for extra ')'s after a if/switch/while condition. Before:

t.c:3:9: error: expected expression
if (x)) {
^

.. which isn't even true - a statement or expression is fine. After:

t.c:3:9: error: extraneous ')' after condition, expected a statement
if (x)) {
^

This is the second part of PR12595



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8bb21d32e9ccc9d9c221506dff26acafa8724cca 28-Apr-2012 Chris Lattner <sabre@nondot.org> switch some uses of ExpectAndConsume(tok::semi to use ExpectAndConsumeSemi. This allows
us to improve this diagnostic (telling us to insert another ")":

t.c:2:19: error: expected ';' at end of declaration
int x = 4+(5-12));
^
;
to:
t.c:2:19: error: extraneous ')' before ';'
int x = 4+(5-12));
^

...telling us to remove the ")". This is PR12595. There are more uses of ExpectAndConsumeSemi
that could be switched over, but I don't hit them on a daily basis :)





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
534986f2b21e6050bf00163cd6423fd92155a6ed 14-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.

Patch by Alexander Kornienko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6a91d385618ea4d28236c496f540a26877c95525 12-Apr-2012 Erik Verbruggen <erikjv@me.com> Added a flag to the parser to skip method bodies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
5d5ed59f1ee57ad2639f0ef1fb400f8854480bb0 24-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [parser] If there are unmatched braces in a function definition, try to
recover by returning the statements that we parsed so far, instead of
dropping the whole function body.

rdar://10967343

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
99831e4677a7e2e051af636221694d60ba31fcdb 06-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> User-defined literals: reject string and character UDLs in all places where the
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
aa5ab26ed93382b812147f532dcbf4afb5494040 24-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Handle "#pragma GCC visibility" in a few more places. Switch over "#pragma pack" to use the same handling that gcc does. Fixes <rdar://problem/10871094> and <rdar://problem/10893316>.

(Hopefully, common usage of these pragmas isn't irregular enough to break our current handling. Doug has ideas for a more crazy approach if necessary.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
33deb35535aebe81bed0eaf5c14f3032276a086e 22-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Fix parsing and processing initializer lists in return statements and as direct member initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
e38fa1866e684b99c6c6e359449af9e0b6e83164 21-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't assume that a valid expression for the first part of a for-statement
is non-null when diagnosing a broken attempt to write a for-range-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
85b29a4c862bb9f41d9739e5dab6436fe6d44ff8 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reject continue/break statements within members of local functions nested within
loop and switch statements, by teaching Scope that a function scope never has
a continue/break parent for the purposes of control flow. Remove the hack in
block and lambda expressions which worked around this by pretending that such
expressions were continue/break scopes.

Remove Scope::ControlParent, since it's unused.

In passing, teach default statements to recover properly from a missing ';', and
add a fixit for same to both default and case labels (the latter already
recovered correctly).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
625bb569df0c34feec0d52c0ec5215f21ef2e054 14-Feb-2012 Dmitri Gribenko <gribozavr@gmail.com> Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)

* if, switch, range-based for: warn if semicolon is on the same line.
* for, while: warn if semicolon is on the same line and either next
statement is compound statement or next statement has more
indentation.

Replacing the semicolon with {} or moving the semicolon to the next
line will always silence the warning.

Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
e4b92761b43ced611c417ae478568610f1ad7b1e 27-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added source location for the template keyword in AST template-id expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7530c034c0c71a64c5a9173206d9742ae847af8b 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5cb94a78202ccb1007df0be86884297761f4a53a 23-Dec-2011 Nico Weber <nicolasweber@gmx.de> Add -Wdangling-else.

This works like described in http://drdobbs.com/blogs/cpp/231602010
Fixes http://llvm.org/PR11609



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a44854a23b3f090729d82f447aa88df4f6563263 20-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR11297: Provide a better diagnostic for code which contains a
reasonable-looking but ill-formed for-range statement of the form:

for (expression : expression)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
9490ab433deef70105d817616928d700f87642d9 20-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix tentative parsing so it knows how to handle an ambiguous for-range-declaration. PR11601.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
320fa4b6051ff032aaa50d924ca39e3d529dcf5f 02-Dec-2011 Ted Kremenek <kremenek@apple.com> Fix test regression introduced by r145656. When seeing a string literal that isn't accepted by 'asm', skip to the enclosing ')'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
ba0513de93d2fab6db5ab30b6927209fcc883078 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3896fc5d4daaf003e451e797e37de57dd8cf9cd5 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Rework Microsoft __if_exists/__if_not_exists parsing and semantic
analysis to separate dependent names from non-dependent names. For
dependent names, we'll behave differently from Visual C++:

- For __if_exists/__if_not_exists at class scope, we'll just warn
and then ignore them.
- For __if_exists/__if_not_exists in statements, we'll treat the
inner statement as a compound statement, which we only instantiate
in templates where the dependent name (after instantiation)
exists. This behavior is different from VC++, but it's as close as
we can get without encroaching ridiculousness.

The latter part (dependent statements) is not yet implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b57791e5b40afa6691063c83d0e95c416fb19fde 21-Oct-2011 Douglas Gregor <dgregor@apple.com> Treat the Microsoft/Borland keyword "__except" as a context-sensitive
keyword, because both libstdc++ and libc++ use "__except" as an
identifier. Fixes <rdar://problem/10322555>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7fe6208c3fa91f835813bb78236ef5c2bbf81053 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement -Wc++98-compat warnings for the parser.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
96e21710e8bf64514ca7d3720cb3b2823eec9164 08-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Fix "Uninitialized" warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a789ca9b967abe47b84df83bcf4afb150856a8d9 08-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Whitespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3fedbe1f71c18fba01d39109d606f421a0103a2a 30-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Some fixes for MS-style asm parsing: specifically, add some error checking, and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
950be71c745409e373ae8a834490f9026c8ac222 19-Sep-2011 Richard Trieu <rtrieu@google.com> Changes to the name lookup have caused a regression in the digraph fix-it hint.
For instance:

template <class T> void E() {};
class F {};

void test() {
::E<::F>();
E<::F>();
}

Gives the following error messages:

error: found '<::' after a template name which forms the
digraph '<:' (aka '[') and a ':', did you mean '< ::'?
::E<::F>();
^~~
< ::
error: expected expression
E<::F>();
^
error: expected ']'
note: to match this '['
E<::F>();

This patch adds the digraph fix-it check right before the name lookup,
moves the shared checking code to a new function, and adds new
tests to catch future regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
62ec1f2fd7368542bb926c04797fb07023547694 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b2fc69097d15f6374b9e5e6101f33960c34acbed 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed typedef of AttrTy since it is not used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f81e5a9e3f3ff80c56e4afb4fe6311a8735f36e8 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change all references of type ExprTy to Expr and get rid of the typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
2eef427c8666cbe9a3cad40d4947c67c3ba0c400 07-Sep-2011 Douglas Gregor <dgregor@apple.com> When parsing a function-try-block that does not have a
ctor-initializer, remember to call the Sema action to generate default
ctor-initializers. What a delightful little miscompile. Fixes PR10578
/ <rdar://problem/9877267>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8f4fb190852d3f86787c7e2c3dfc1b96143197ae 04-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7d100872341f233c81e1d7b72b40457e62c36862 04-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support code-completion for C++ inline methods and ObjC buffering methods.

Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.

Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.

Fixes rdar://10056932&8319466

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
e2ca828119b8bff4a5c25c6db8ee4fec558451e7 01-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This fails
in the face of buffering C++/ObjC method bodies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d2d8be6a27d0ef73d46039604682f7890e1cc3e0 30-Jul-2011 Douglas Gregor <dgregor@apple.com> Add code completion to produce "else" blocks after an "if"
statement. Fixes <rdar://problem/9229438>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
990567cb60e8530ba01b41d4e056e32b44b95ec0 27-Jul-2011 John McCall <rjmccall@apple.com> Clean up the analysis of the collection operand to ObjC
for-in statements; specifically, make sure to close over any
temporaries or cleanups it might require. In ARC, this has
implications for the lifetime of the collection, so emit it
with a retain and release it upon exit from the loop.

rdar://problem/9817306



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
642116259e8df6286063a17361c20e95b5017a0a 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
9e5bb85ac899eeab7c21b5ff9030c3da6ff4837b 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Move the rest of the preprocessor terminology from 'instantiate' and
variants to 'expand'. This changed a couple of public APIs, including
one public type "MacroInstantiation" which is now "MacroExpansion". The
rest of the codebase was updated to reflect this, especially the
libclang code. Two of the C++ (and thus easily changed) libclang APIs
were updated as well because they pertained directly to the old
MacroInstantiation class.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bca01b46850f867b2f4137f25c882022b58f8471 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Properly implement the scope restriction on the NRVO for
throw-expressions, such that we don't consider the NRVO when the
non-volatile automatic object comes from outside the innermost try
scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were
incorrect but it didn't matter because IR generation doesn't actually
apply the NRVO here. In C++0x, however, we were moving from an object
when in fact we should have copied from it. Fixes PR10142 /
<rdar://problem/9714312>.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
63f04ab297157c5905975e8f2c807b35251dace7 14-Jun-2011 David Majnemer <david.majnemer@gmail.com> Remove the Fix-it for missing statement in switches


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0e1e69ca1b30df7692f302a5388377f507bc4567 13-Jun-2011 David Majnemer <david.majnemer@gmail.com> Improve the diagnostics generated for switch statements missing expressions

- Move the diagnostic to the case statement instead of at the end of the switch
- Add a fix-it hint as to how to fix the compilation error


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f986038beed360c031de8654cfba43a5d3184605 07-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for _if_exists and __if_not_exists at namespace/global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
1e862693c63067ae467b0b3884c44f753cd6e821 06-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists and __if_not_exists construct inside function definition.
Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols.

More doc: http://msdn.microsoft.com/en-us/library/x7wy9xh3(v=VS.100).aspx

Support at class and namespace scopes will be added later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d7f02df6e949aaf26706bea3ac79ed65ca792a30 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> SEH was crashing under -fms-extensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5ecdd78408a1c6f4be506d94f776642570d27336 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Introduce a new parser annotation token for primary expressions. When
ClassifyName() builds a primary expression, generate one of these
annotation tokens rather than jumping into the parser.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d0719b183ae331e0e8731c486f21392e0eb288c3 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Clean out some cruft I introduced when adding Sema::ClassifyName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d9d75e57dfa22366c0379c92beac1db82db34e9a 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Simplify the parser's handling of Sema::ClassifyName() for types, by
creating a type-annotation token rather than jumping into the
declaration parsing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b7d98d35ea723624345f06e5895ddce2e0388ef0 27-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> If a null statement was preceded by an empty macro keep its instantiation source location
in NullStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3b887354b1b667c97d070ddc67b5354353c4c07b 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Extend Sema::ClassifyName() to support C++, ironing out a few issues
in the classification of template names and using declarations. We now
properly typo-correct the leading identifiers in statements to types,
templates, values, etc. As an added bonus, this reduces the number of
lookups required for disambiguation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
ec385cf3c73434e42d03c321b05100ca64e0c90d 25-Apr-2011 Douglas Gregor <dgregor@apple.com> When Sema::ClassifyName() finds an invalid ivar reference, return an
invalid expression rather than the far-more-generic "error". Fixes a
mild regression in error recovery uncovered by the GCC testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
312eadb832cab4497a069409954500d8192b8f0d 24-Apr-2011 Douglas Gregor <dgregor@apple.com> Implement a new identifier-classification scheme where Sema
performs name lookup for an identifier and resolves it to a
type/expression/template/etc. in the same step. This scheme is
intended to improve both performance (by reducing the number of
redundant name lookups for a given identifier token) and error
recovery (by giving Sema a chance to correct type names before the
parser has decided that the identifier isn't a type name). For
example, this allows us to properly typo-correct type names at the
beginning of a statement:

t.c:6:3: error: use of undeclared identifier 'integer'; did you mean
'Integer'?
integer *i = 0;
^~~~~~~
Integer
t.c:1:13: note: 'Integer' declared here
typedef int Integer;
^


Previously, we wouldn't give a Fix-It because the typo correction
occurred after the parser had checked whether "integer" was a type
name (via Sema::getTypeName(), which isn't allowed to typo-correct)
and therefore decided to parse "integer * i = 0" as an expression. By
typo-correcting earlier, we typo-correct to the type name Integer and
parse this as a declaration.

Moreover, in this context, we can also typo-correct identifiers to
keywords, e.g.,

t.c:7:3: error: use of undeclared identifier 'vid'; did you mean
'void'?
vid *p = i;
^~~
void

and recover appropriately.

Note that this is very much a work-in-progress. The new
Sema::ClassifyName is only used for expression-or-declaration
disambiguation in C at the statement level. The next steps will be to
make this work for the same disambiguation in C++ (where
functional-style casts make some trouble), then push it
further into the parser to eliminate more redundant name lookups.

Fixes <rdar://problem/7963833> for C and starts us down the path of
<rdar://problem/8172000>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
46f1110b324583622521a01d2c8f949e1f215bd2 22-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix gcc warning. Add parens to this assert, incidentally reassociating it, but the condition is the same either way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bb9b80c308d7d3f758886243c7145404a50c66cf 21-Apr-2011 Richard Trieu <rtrieu@google.com> Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:'

switch (x) {
1: return 0;
default: return 1;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d 24-Mar-2011 John McCall <rjmccall@apple.com> Insomniac refactoring: change how the parser allocates attributes so that
AttributeLists do not accumulate over the lifetime of parsing, but are
instead reused. Also make the arguments array not require a separate
allocation, and make availability attributes store their stuff in
augmented memory, too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c9977d09a2de7f7d2245973413d4caf86c736640 16-Mar-2011 Douglas Gregor <dgregor@apple.com> Make sure that we always pop a function's scope *before* we call
ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that
we diagnose undefined labels before the jump-scope checker gets run,
since the jump-scope checker requires (as its invariant) that all of
the GotoStmts be wired up correctly.

Fixes PR9495.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6f4596cfb70ec706dd2da38db1be3663c214ff7a 12-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a hack intended to allow Clang to parse libstdc++ 4.5's
headers, which use C++0x generalized initializer lists. Per PR7069, it
appears that the only use is as the return type of a function, so this
commit enables this extension just in that narrow case. If it's enough
for libstdc++ 4.5, or if it can be trivially extended to work with
libstdc++ 4.5, we'll keep it. Otherwise, or if this breaks anything,
we'll revert and wait for the real feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6784304db526cde59046d613c4175ce2caf93e44 05-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed LabelDecl source range and cleaned creation code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4ae493cccbfbf122ec6ebac0e330232c22fa8489 18-Feb-2011 Chris Lattner <sabre@nondot.org> implement basic support for __label__. I wouldn't be shocked if there are
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.

This implements most of PR3429 and rdar://8287027



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
337e550218128e7d922c09bb354fbc71de90c568 18-Feb-2011 Chris Lattner <sabre@nondot.org> Switch labels over to using normal name lookup, instead of their
own weird little DenseMap. Hey look, we now emit unused label
warnings deterministically, amazing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b72c77855473379c4c47e701005f7818946f659b 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Improve parser recovery in "for" statements, from Richard Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f6a3ab0f167f23d0669eae77280c7ff660e7ad98 22-Jan-2011 John McCall <rjmccall@apple.com> Improve our parse recovery on 'case blah;' and 'default;'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
dec0984fce504a39a7f085774fb67cfd9957be58 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b918d0f5d8f147e1e26c34e6cf42a79af2d2ec41 17-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Convert "#pragma unused(...)" into tokens for the parser.
This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function.
Fixes rdar://8829590&8770988.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b162054ba8f5b64fe87fbc4837933ab23eebd52b 04-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename MaybeSkipFunctionBodyForCodeCompletion -> trySkippingFunctionBodyForCodeCompletion and check isCodeCompletionEnabled() before doing the call.
Suggestions by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0fe5397b26695926a835fa99eceb7fc879b307af 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When in code-completion, skip obj-c method bodies for speed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3437f1f1294499d4ef306c1089fcb3e29ec2aa68 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Speed up code-completion by skipping function bodies.

When we are in code-completion mode, skip parsing of all function bodies except the one where the
code-completion point resides.

For big .cpp files like 'SemaExpr.cpp' the improvement makes a huge difference, in some cases cutting down
code-completion time -62% !

We don't get diagnostics for the bodies though, so modify the code-completion tests that check for errors.

See rdar://8814203.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7f040a9d817cd1c72b565e92abff473510bf9e1d 24-Dec-2010 John McCall <rjmccall@apple.com> Refactor how we collect attributes during parsing, and add slots for attributes
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
662a4822ee7c8696434b054303c5076a606ab175 23-Dec-2010 Douglas Gregor <dgregor@apple.com> Improve the diagnostic and recovery for missing colons after 'case'
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'}}
^
:



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f6a1648197562e0b133440d612d9af297d0a86cc 04-Dec-2010 John McCall <rjmccall@apple.com> Although we currently have explicit lvalue-to-rvalue conversions, they're
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a44724d0d6d03568ec9acadc0781d612163008e1 02-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for MS asm statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
44aa1f397855f130e88e62ffc1029f7f83bb5d2e 20-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r119838 "Don't warn for empty 'if' body if there is a macro that 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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:

if (condition)
CALL(0); // empty macro but don't warn for empty body.

Fixes rdar://8436021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8113ecfa4e41e2c888b1794389dfe3bce6386493 10-Nov-2010 Ted Kremenek <kremenek@apple.com> Region-allocate all AttributeList objects from a factory object instead of 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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bf8cafadb9d4e0d7a90fe78fc175efb80ae34d42 02-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Properly handle temporaries that are created in a AsmStmt.

Previously the temporaries would get destroyed before the asm call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
65e7a6b5f077827964570a7fdabffa62fcc2319e 01-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Clean up temporaries created by an asm statement. Fixes rdar://8540491

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c5be7b0fc804d8e6f87298ec03c94d8cccd74f29 28-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> vla expressions used in __typeof__ must be evaluated.
Fixes rdar://8476159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
1a18600b85aaa691122983dd8dcf4225cfc9ef68 28-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
9ba23b4ceacd77cd264501690a7a9e94184ef71b 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when there is a stray ']' or ')' before the ';' at
the end of a statement. Fixes <rdar://problem/6896493>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f65086b479778d7090622bfb6cd9646c541a097e 01-Sep-2010 Chris Lattner <sabre@nondot.org> when emitting an error about a missing } in a compound statement, emit
a "to match this {" note, pointing out the opener.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0016d519b831859526b79405cdae4c64c73731c8 29-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.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/ParseStmt.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/ParseStmt.cpp
fb6294123b9de1605adae69d85cb4fddf81a9bc5 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
e78968547e4976834090efdac4522c7b94daa89a 17-Aug-2010 Chris Lattner <sabre@nondot.org> Add a slightly better hack for microsoft style inline asm,
patch by Per Linden!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
e6b1bb6e7fe906d164637ca33503b8fafdbc99e5 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
fcecd3cc07ad395e05db864bc21f7790f7878156 06-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove ElseScope which is also dead code now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
102e1b6a4753b0bd3662ad1bd119f6efa04b8763 22-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Fix PR7673 by allowing an empty clobbers section in an ASM statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
36d36806f1972f7ec1d2a3f59155187278c56508 17-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure parens/braces/brackets are correctly balanced.

In a line like:

(;

the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren).
This may affect later parsing and result in bad recovery for parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5ac3bdb2cb0113b640c54f01468d21985c08b252 30-May-2010 Douglas Gregor <dgregor@apple.com> Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c8bddde82135ab25a36ff60fbd2ad50fabe42e63 28-May-2010 Douglas Gregor <dgregor@apple.com> Make -code-completion-patterns only cover multi-line code
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
dc8453422bec3bbf70c03920e01498d75783d122 25-May-2010 Douglas Gregor <dgregor@apple.com> Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4186ff4fc4102f63b7485c2bf89155d3b0899d32 21-May-2010 Douglas Gregor <dgregor@apple.com> Improve parser recovery when a switch condition is invalid; fixes
<rdar://problem/7971948>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
eecf38f821fe8e113722096b77da7d68b26d28d1 06-May-2010 Douglas Gregor <dgregor@apple.com> Fixed DISABLE_SMART_POINTERS breakage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
586596fd7f7a336a2847b300c80614dcf39ab6d5 06-May-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of temporary objects within the conditions of
if/switch/while/do/for statements. Previously, we would end up either:

(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).

We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.

Fixes PR7067.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
966c78b79004061c1f64feff96818b9f1d68ea58 12-Apr-2010 Chris Lattner <sabre@nondot.org> change Scope::WithinElse to be a normal scope flag, widen the
fields to two 16-bit values instead of using bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5c5db553b5c256d0a6f55dde7325c1c829b88e8e 05-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6782, an accept invalid. We weren't emitting the diagnostic
returned by SetTypeSpecType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b57c757a80532a610d949c2eeb9d9e05c76f543f 31-Mar-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't skip past the '}' if an expression has error and is not followed by ';'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
1e37765c9257ef1d051f54a674eaa964bdba9693 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Clean up ownership of 'AttributeList' objects in Parser. Apparently
we would just leak them all over the place, with no clear ownership of
these objects at all. AttributeList objects would get leaked on both
error and non-error paths.

Note: I introduced the usage of llvm::OwningPtr<AttributeList> to
manage these objects, which is particularly useful for methods with
multiple return sites. In at least one method I used them even when
they weren't strictly necessary because it clarified the ownership
semantics and made the code easier to read. Should the excessive
'take()' and 'reset()' calls become a performance issue we can always
re-evaluate.

Note+1: I believe I have not introduced any double-frees, but it would
be nice for someone to review this.

This fixes <rdar://problem/7635046>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
ff93dbd887e40588ed55d135037bb9287488b285 30-Jan-2010 Anders Carlsson <andersca@mac.com> Use IdentifierInfo * instead of std::string for the AsmStmt names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7e52de4b45286d057b367bb1f9283a1e32d79252 24-Jan-2010 Chris Lattner <sabre@nondot.org> fix PR6034, a crash on invalid where the switch stack would get
unbalanced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
01dfea02d1da297e8b53db8eea3d3cc652acda8d 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve code completion by introducing patterns for the various C and
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for

static_cast<type>(expr)

when we can have an expression, or

using namespace identifier;

when we can have a using directive.

Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3b11fd3b52e7b88233c602407c151d07cb093e75 04-Jan-2010 Mike Stump <mrs@apple.com> Remember if the AsmStmt came from Microsoft-style inline assembly code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6405646cb649e4b4c6768b92d1fc83c175722f62 21-Dec-2009 Chris Lattner <sabre@nondot.org> fix PR5500: clang fails to parse inline asm with :: in C++ mode


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
64cb4757acbf10f0c702f17c4fe90f4b7aba3490 21-Dec-2009 Chris Lattner <sabre@nondot.org> refactor asm stmt parsing to avoid nesting as much, and
pull ':' eating out of ParseAsmOperandsOpt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5ee56e95c3905d2e7bc403631b03865cdbdd8a42 16-Dec-2009 Anders Carlsson <andersca@mac.com> Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
95059b50136e8aa9bb02017fb9210d3708b06577 11-Dec-2009 Mike Stump <mrs@apple.com> Implement just a bit more of inline assembly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6fb09c8acc1336a9508cd6223d9fcf87cf31e476 10-Dec-2009 Chris Lattner <sabre@nondot.org> fix PR5740: a colon is sacred when parsing case statement expressions!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d167ca0d26e43292b8b9e8d5300d92784ae0e27d 10-Dec-2009 Chris Lattner <sabre@nondot.org> rename ExtensionRAIIObject.h -> RAIIObjectsForParser.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
be724bab2ba7ad47aebced25e7c8ec551eb72d28 25-Nov-2009 Douglas Gregor <dgregor@apple.com> When the condition of a switch() statement is semantically invalid,
still parse the body of the switch to try to avoid spurious
diagnostics. Fixes PR5606.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
99e9b4d172f6877e6ba5ebe75bb8238721f5e01c 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
04895d301e1107a8f03673c43c939a115c3c1195 24-Nov-2009 Douglas Gregor <dgregor@apple.com> "Do" loops cannot have condition variables, so don't parse them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bbd37c62e34db3f5a95c899723484a76c71d7757 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a7cf23a72b0846fc5aacf3f38bb8c8f9e76784cf 19-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Don't issue spurious diagnostic with Obj-C fast enumeration.
(radar 7409165).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d8ac05753dc4506224d445ff98399c01da3136e5 03-Nov-2009 John McCall <rjmccall@apple.com> Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
5ffe14ca96bd662de7820f6875d3f04789a640c1 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move misc clients to IdentifierInfo StringRef API.
- strcmp -> ==
- OS.write(II->getName() ...) -> OS << II->getNameStr()
- Avoid std::string concatenation
- Use getNameStr().str() when an std::string is really needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
791215b7a24666912c0b71175d2ca5ba082f666e 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Code completion for ordinary names when we're starting a declaration, expression, or statement

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
3e1005f085006dfb3545f0c54ac5e22483137c7d 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Code completion for "case" statements within a switch on an expression
of enumeration type, providing the various unused enumerators as options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
f53b4433abb7a3bc14c0329d3175cbc291280137 18-Aug-2009 Anders Carlsson <andersca@mac.com> Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7b3684afffa2d5eda3dd6930f01faaa673686c16 14-Jun-2009 Chris Lattner <sabre@nondot.org> change ParseStatementOrDeclaration to emit the 'missing ;' with
ExpectAndConsume instead of custom diag logic. This gets us an
insertion hint and positions the ; at the end of the line
instead of on the next token. Before:

t.c:5:1: error: expected ';' after return statement
}
^

after:

t.c:4:11: error: expected ';' after return statement
return 4
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6869d8ea1bb7d191b5b290f5a55ee74f2174829a 14-Jun-2009 Chris Lattner <sabre@nondot.org> improve localizability by not passing english phrases into
diagnostics in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
989135901c750af61ef012b6b0a0368be415bc46 13-Jun-2009 Chris Lattner <sabre@nondot.org> add the location of the ')' in a do/while statement to DoStmt.
This fixes a source range problem reported by Olaf Krzikalla.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
c4ee170b0c71f61fb1dec273d15fb11c29449a88 04-Jun-2009 Anders Carlsson <andersca@mac.com> Make sure to call FullExpr before parsing anything else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a0ab25d2808fe77ffff54f25a015893791dfd4b6 30-May-2009 Anders Carlsson <andersca@mac.com> ActOnReturnStmt should also take a FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
7f537c18c7029e73f0bd555be3782c066e7e2c1e 17-May-2009 Anders Carlsson <andersca@mac.com> Make ActOnWhileStmt take a FullExprArg for the condition expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
6b1d283fe879fb11d7ce7a69feecf66e77b0eaf3 17-May-2009 Anders Carlsson <andersca@mac.com> Make ActOnExprStmt take a FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a99fad8ff134273fe85f2970c7d89133d1218900 17-May-2009 Anders Carlsson <andersca@mac.com> Add the FullExprArg wrapper and use it for if statement conditions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bc6c848f3e0ec2dc44f6e3d59ef85e884cc9b7be 17-May-2009 Eli Friedman <eli.friedman@gmail.com> Make the RAII extension warning silencing for __extension__ a bit
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
72056a237c536ee63285ab0850cb50f299281767 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Don't insert an extra ParenExpr around asm operands.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f01fdff97b245caac98100d232c760b4d0531411 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of some useless uses of NoExtensions. The philosophy here is
that if we're going to print an extension warning anyway,
there's no point to changing behavior based on NoExtensions: it will
only make error recovery worse.

Note that this doesn't cause any behavior change because NoExtensions
isn't used by the current front-end. I'm still considering what to do about
the remaining use of NoExtensions in IdentifierTable.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
de1b60a9868f80f0872ed05d78df3b40a10ba5ca 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> The mysterious bug turns out to be an incredibly bone-headed mistake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
d3a413d3b8eb39bcee5944bc545d9997c1abe492 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4d00f2a5a9b670cd0d67d640a42dbf7b9f342c59 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix a problem with objc foreach loop. It turns out that objc mode changes
for scoping to match C99 even when in C89 mode. This patch fixes this
(eliminating a "redefinition of thisKey" error), and also prevents non-sensical
diagnostics in -pedantic mode like this:

t.m:7:8: warning: variable declaration in for loop is a C99-specific feature
for (id thisKey in keys) ;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
97144fc41a9419bf6d74fc9450e8ef3f6e11f7e0 02-Apr-2009 Chris Lattner <sabre@nondot.org> fix a FIXME, providing accurate source range info for DeclStmt's. The end
of the range is now the ';' location. For something like this:

$ cat t2.c

#define bool int
void f(int x, int y) {
bool b = !x && y;
}

We used to produce:
$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14> <----
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <line:4:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")


Now we produce:

$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14, line:4:17> <------
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <col:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4dca69b3f8180bdfa0287399c89e0594080bae66 29-Mar-2009 Chris Lattner <sabre@nondot.org> minor simplification


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
cd1477562e7cf03279850885583d615e1f631dd4 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist some code for handling objc foreach construct out of Declaration processing
into ParseForStatement. Merge two tests into one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
682bf92db408a6cbc3d37b5496a99b6ef85041ec 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 28-Mar-2009 Chris Lattner <sabre@nondot.org> Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f919bfe282b8a94d956290dc9812b456fa2b447e 24-Mar-2009 Chris Lattner <sabre@nondot.org> random cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
49f28ca787d8db7cac3c8898334f70ea55374c98 05-Mar-2009 Chris Lattner <sabre@nondot.org> rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces. We now get crashes like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
21ff9c99d3df1e4a13e6820fc2aa7a8cc6673198 05-Mar-2009 Chris Lattner <sabre@nondot.org> When parsing a function body, add it to the crash stack, giving us something
like:

Stack dump:
0. t.c:5:10: in compound statement ('{}')
1. t.c:3:12: in compound statement ('{}')
2. t.c:3:12: parsing function body 'foo'
3. clang t.c
Abort



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
40e9bc84a2ab49fc33c2b1a95c6674ab2b820e9e 05-Mar-2009 Chris Lattner <sabre@nondot.org> Simplify the interface to ParseFunctionStatementBody to not take
locations that are the current tok loc. Note that inline C++ methods
have a big fixme that could cause a crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
ae50fa0a9e7217b043ed4ffe175af4b26dc90f34 05-Mar-2009 Chris Lattner <sabre@nondot.org> Include information about compound statements when crashing in sema or the
parser. For example, we now print out:

0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
26140c6399d4b14a224d44cf0102a1919d8dab04 04-Mar-2009 Chris Lattner <sabre@nondot.org> fixes suggested by Sebastian!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
24e1e707b4c362f18e371e2bbf054a8345b57bfa 04-Mar-2009 Chris Lattner <sabre@nondot.org> Change Parser::ParseCaseStatement to use an iterative approach to parsing
multiple sequential case statements instead of doing it with recursion. This
fixes a problem where we run out of stack space parsing 100K directly nested
cases.

There are a couple other problems that prevent this from being useful in
practice (right now the example only parses correctly with -disable-free and
doesn't work with -emit-llvm), but this is a start.

I'm not including a testcase because it is large and uninteresting for
regtesting.

Sebastian, I would appreciate it if you could scrutinize the smart pointer
gymnastics I do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
adf077f46ba5cddcd801a647a5e9a3eb97060df4 27-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3418: make sure to handle the RHS of expressions starting with
__extension__. This sort of construct shows up in the gcc source code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
0eb23307222bda7ad95d968eac4e1ab30864b213 19-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more expression actions to smart pointers.
Fix type of logical negation for C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
3037ed0a27dba62e522304183718efc149e8b6d9 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert asm statement action to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4cffe2fd5c23168bc08f0453c684cbd3f79471d3 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f05b1520d6f175acbfc3913489f4dfa842875ec4 17-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement actions to smart pointers.
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
f7cf85b330bedd2877e1371fb0a83e99751ae162 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
de307473448fb3cebcb4c10090728300b53bca03 11-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more actions to smart pointers.
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
117054a99f4994e4ec8a1fc904b554e1f2dc9b29 28-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a two more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d 22-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Partial AST and Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a0fd8652f3302d0f39ed9849b521ee5b76597b0a 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
a60528cdac7deee3991c2b48af4df4f315e49e9d 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few Stmt actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
2342ef75797a2ad6c9d7a784cfff220fd1a66008 17-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Do proper recovery from an invalid switch condiition. Fixes PR3229.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
798d119415323ebcd029ffe1e0fb442a4ca8adbb 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
ff871fb8f9c5906a4dee78afd81f60c3837e16cb 12-Dec-2008 Chris Lattner <sabre@nondot.org> use smarter error recovery for do/while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
15ff1110c96a26c9315142d407c1f29d86a5ad1f 12-Dec-2008 Chris Lattner <sabre@nondot.org> apply the new error recovery smarts we have for if's to while's and switch's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
18914bcb22774137ba720e5fcb377150bf2f6de3 12-Dec-2008 Chris Lattner <sabre@nondot.org> merge recovery-2.c into recovery-3.c.

Substantially improve error recovery after broken if conditions by
parsing the full if when we have a semantic error instead of using
parser recovery techniques to recover from a semantic error.

This fixes rdar://6094870 - spurious error after invalid 'if' condition


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
43bc2a0973ffe404fabba6f8280cd6bad2c69fcb 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert the remaining statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
9a920342707e384473b464528d2fd286e8c70353 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
61364dddc33383e62cfe3b841dbc0f471280d95b 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a number of statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
caaf29a08761b14fbe42a29080c22dd6961056d1 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Added a warning when referencing an if's condition variable in the
"else" clause, e.g.,

if (int X = foo()) {
} else {
if (X) { // warning: X is always zero in this context
}
}

Fixes rdar://6425550 and lets me think about something other than
DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
8935b8b49053122ddd3ab4cd59af0fe5eb9c23cf 10-Dec-2008 Douglas Gregor <dgregor@apple.com> Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.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/ParseStmt.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/ParseStmt.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/ParseStmt.cpp
28eb7e992b9a266abb300da25b6d3c1557cec361 24-Nov-2008 Chris Lattner <sabre@nondot.org> make the 'to match this' diagnostic a note.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
74253736184c0717a0649922551bf9d8b6815651 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Added operator overloading for unary operators, post-increment, and
post-decrement, including support for generating all of the built-in
operator candidates for these operators.

C++ and C have different rules for the arguments to the builtin unary
'+' and '-'. Implemented both variants in Sema::ActOnUnaryOp.

In C++, pre-increment and pre-decrement return lvalues. Update
Expr::isLvalue accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
1ab3b96de160e4fbffec2a776e284a48a3bb543d 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change a couple of the Parser::Diag methods to return DiagnosticInfo
and let the clients push whatever they want into the DiagnosticInfo
instead of hard coding a few forms. Also switch various clients to
use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the
canonical form to simplify the code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
195044028b76133e2a1f245b094468fe07db7330 13-Nov-2008 Chris Lattner <sabre@nondot.org> Fix a couple of suboptimalities in error recovery.

1. In the top level of ParseStatementOrDeclaration, don't eat a } if we
just parsed a statement if it list there. Also, don't even bother
emitting an error about a missing semicolon if the statement had a
bug (an rbrace is fine).
2. In do/while parsing, don't require a 'while' to be present if the do
body didn't parse.

This allows us to generate a clean diagnostic for this code:

t.c:1:22: error: expected expression
void foo (void) { do . while (0); }
^

Thanks to Neil for pointing this out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
39146d6497ad5e7ca8ef639221e7b3e15d07c888 20-Oct-2008 Chris Lattner <sabre@nondot.org> simplify some other code for __extension__ processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
bbc70c019f7b7f9a256ee29dab5287ecc82c6553 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
5404a156be26de1c63ca9916187f970848bb4dbb 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Resolve ambiguous C++ statements (C++ 6.8p1).
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
14d08c0c776302e2df12239d276072f43c894f0e 12-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add comments about C++ clause 3.3.2p4 that mentions that the condition declaration should be local to an if/switch/while/for statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
143db71d8d87bc015fb496f71ef83b268813835a 11-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix do-while scoping in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
488d37e8c0bffe5c11e8fe508e43e445e83bfbdd 11-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r56078, getLang().C99 being true in C++ is a bug that will be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
fe7e4f08fe7efcdedfc05ceb81f2ceaefc37c0b5 11-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -getLang().C99 is true in C++ too, remove the use of the C99orCXX variable.
-Scoping in C99 works good for C++ too, remove the C++-specific comments.

If someone thinks that the C++-specific comments are necessary for clarification, let me know and I'll put them back on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
957163829d04d89177b97be11a05a21242f4e10e 10-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some C++-specific comments in the parsing methods of if/switch/while/for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
71b914b999d9c4b6df11068fc5a3291ac4770492 09-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement parser support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).
Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
dcdd55fb4d28de8c314d6c6c1a38aa6aba76d431 07-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support C++'s declaration-statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.cpp
b9f930d7bdb911be8420e044876221bf8a39f45f 12-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use of NextToken() makes ParseIdentifierStatement unnecessary.
Simplify the parser by removing Parser::ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp
d77bc2834269593282e06806a74d14e244bc26a4 07-Apr-2008 Steve Naroff <snaroff@apple.com> Have Parser::FuzzyParseMicrosoftAsmStatement() return the null statement (';').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseStmt.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/ParseStmt.cpp