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/Sema/statements.c
|
9ce5270f0aadaaf03a0cf705787f42ce9eb1194c |
|
07-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix crash in CFGBuilder on invalid code. We still need to reject this code, but at least clang doesn't crash anymore. Crash reported in PR 8880. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
1b2ad2fd9e2d5352144481aa1fd995d333d9adc9 |
|
20-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r114316, -Wunused-value enabled by default was intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
6dff2288a8054bdbc97217568e5831bcce809db8 |
|
19-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
ce78461303f45fecb3460d1c49c9b71f27ad19c3 |
|
16-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
improve the "enumeration value 'g' not handled in switch" warning to handle multiple enumerators with one warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
2b334bb3126a67895813e49e6228dad4aec0b4d6 |
|
17-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
make our existing "switch on bool" warning work for C. Since the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
d4eea8362605807327735727a9098abe1eb23b19 |
|
09-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when we fail to convert from a source type to a destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
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/test/Sema/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/Sema/statements.c
|
9e6b37a9f1d499e7ca0950edacd0b6569e491d7f |
|
30-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
warn about returning the address of a label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
40c56f7129bdaf8a01e2ffe7ddde714a586eb45d |
|
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
__builtin_prefetch should be declared as "void __builtin_prefetch(const void *)", not "const void __builtin_prefetch(void *)". This fixes PR3912. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|
885b6d8dbe5e5b3a39ea2ac7383c584f297ae03c |
|
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rename test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/statements.c
|