4b0824229b96d024a96f3c7dd75ab70652c05c5b |
|
18-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a comma operator is followed by a token which unambiguously indicates the start of a statement or the end of a compound-statement, diagnose the comma as a typo for a semicolon. Patch by Ahmed Bougacha! Additional test cases and minor refactoring by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/statements.c
|
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/test/Parser/statements.c
|
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/test/Parser/statements.c
|
46171917dc87caf0c7a741a7301f36db2e20b132 |
|
23-Jan-2010 |
Mike Stump <mrs@apple.com> |
Insulate these from changes to the default for -Wunreachable-code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/statements.c
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
|
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
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
/external/clang/test/Parser/statements.c
|
4dabe96fc9c5333bbcb6e36114bca95160967e26 |
|
01-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Ok, ok, I give in. Fix tests for unused result warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/statements.c
|
d1969d803cfcc65f1c334df4cc89c7fdd33ee4c9 |
|
22-Jul-2009 |
Mike Stump <mrs@apple.com> |
Prep for new warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/statements.c
|
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/test/Parser/statements.c
|
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 |
|
24-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
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
/external/clang/test/Parser/statements.c
|
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/test/Parser/statements.c
|
a668e8ec3b3c93626147b25be4f5484da809bced |
|
13-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
implement a fixme :), switch to -verify mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/statements.c
|
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e |
|
11-Jul-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Stage two of getting CFE top correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/statements.c
|