097e0a2cb08c8244a6923489acc8f890e6a99b59 |
|
21-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor places which perform contextual implicit conversions to go through a common function. The C++1y contextual implicit conversion rules themselves are not yet implemented, however. This also fixes a subtle bug where template instantiation context notes were dropped for diagnostics coming from conversions for integral constant expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a DiagnosticBuilder when producing these diagnostics, and losing their context notes in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.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/test/SemaCXX/switch.cpp
|
adabbca569bd6c6dfe91773dea8cf7d14cb4cc5e |
|
22-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Move -Wswitch-enum to -Wswitch This matches GCC's documented (& actual) behavior. What Clang had implemented as -Wswitch-enum was actually GCC's -Wswitch behavior. -Wswitch is on by default (part of -Wall) and warns if a switch-over-enum, without a default case, covers all enum values. -Wswitch-enum, on the other hand, does not have the default clause and should fire even in the presence of a default. This warning is off by default. With this change the -Wswitch-enum flag is off-by-default in Clang but has no functionality at the moment. I'll add that in a future commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
0683a1418b28b289eca4cb602ac69780f9e0a609 |
|
31-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Expand the coverage of the warning for constants on the RHS of logical operands: return f() || -1; where the user meant to write '|'. This bootstraps without any additional warnings. Patch by Richard Trieu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
1d6ab7af99a1fc059a6aa5da083640c1d94b07f7 |
|
24-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
compute the integer width, not the memory width here. We want to know that _Bool is 1 bit, not 8. This fixes an assertion on the testcase, which is PR9304 and rdar://9045501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
b7690b425845b636849f25074d64d30aad646473 |
|
24-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
turn down the logical bitwise confusion warning to not warn when the RHS of the ||/&& is ever 0 or 1. This handles a variety of creative idioms for "true" used in C programs and fixes many false positives at the expense of a few false negatives. This fixes rdar://8230351. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
90a8f27f144233b53cac0c88a1595f7f05105b7e |
|
13-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
Add a warning to catch a bug recently caught by code review, like this: t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise & or remove constant [-Wlogical-bitwise-confusion] return x && 4; ^ ~ wording improvement suggestions are welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
0fb97083cc0f8a82e404e22991ae80d2216e71d5 |
|
18-May-2010 |
John McCall <rjmccall@apple.com> |
If a switch condition is constant, don't warn about missing enum cases. If a switch condition is constant, warn if there's no case for it. Constant switch conditions do come up in reasonable template code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
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/SemaCXX/switch.cpp
|
f21bac640870db0569e697a8a14f59f6ca069f80 |
|
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Require a class type to be complete before probing its conversion functions for a switch condition's conversion to integral or enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
84fb9c0be621c9e4ca4e56f67dae2a0bb6e44821 |
|
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement conversion from a switch condition with class type to an integral or enumeration type (vi user-defined conversions). Fixes PR5518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|
12356b119032edd64e9c32f9f01920d12c2acc57 |
|
17-Oct-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Fix for PR5190, Credit to Zhanyong Wan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/switch.cpp
|