Commit Graph

16 Commits

Author SHA1 Message Date
Kaelyn Takata 972dfa6156 Continue parsing an expression list even after an error is encountered.
Otherwise, multiple errors such as having unknown identifiers for two
arguments won't be diagnosed properly (e.g. only the first one would
have a diagnostic message if typo correction fails even though both
would be diagnosed if typo correction suggests a replacement).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213003 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-14 22:48:10 +00:00
David Majnemer eeac7a4bb4 Make wording for certain invalid unary expressions more consistent.
An invalid decltype expression like 'decltype int' gives:
error: expected '(' after 'decltype'

This makes it so 'sizeof int' gives a similar one:
error: expected parentheses around type name in sizeof expression


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192258 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-09 00:22:23 +00:00
Serge Pavlov 2e391e516c Fixed messages in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192208 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-08 17:38:38 +00:00
Serge Pavlov 2a0a49612e Add fixits suggesting parenthesis around type name in expressions like sizeof.
This fixes PR16992 - Fixit missing when "sizeof type" found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192200 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-08 16:56:30 +00:00
John McCall b3c4906aa6 Diagnose a missing ')' on what looks like a statement expression.
A situation where we can get an invalid ExprResult without an error.
Fixes PR8394.  Patch by Justin Bogner!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128979 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-06 02:35:25 +00:00
Abramo Bagnara b9eb35ced8 Treat __extension__ like ParenExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15 07:51:18 +00:00
Douglas Gregor 87c3007381 Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 04:08:02 +00:00
Daniel Dunbar a5728872c7 Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Chris Lattner 1721a2dfc0 Improve error recovery for calls, fixing:
PR3972: Poor diagnostic with missing ')'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68932 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 00:10:38 +00:00
Daniel Dunbar d7d5f0223b Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 02:24:46 +00:00
Eli Friedman adf077f46b 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
2009-01-27 08:43:38 +00:00
Chris Lattner 4c1a2a97b2 Parse "sizeof(arr)[0]" as a sizeof of an expr if arr
is an expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13 20:50:37 +00:00
Chris Lattner e45fa6af52 reenable this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41397 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-25 05:31:19 +00:00
Chris Lattner 388577b3bd test the parser only, not sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41395 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-25 05:26:51 +00:00
Chris Lattner a7fa381a50 update tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39786 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-12 16:52:08 +00:00
Reid Spencer 5f016e2cb5 Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 17:01:13 +00:00