History log of /external/clang/test/Sema/warn-unreachable.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/test/Sema/warn-unreachable.c
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Sema/warn-unreachable.c
5846720f08a6b225484bfe663599c2b057a99bc8 05-Feb-2013 Ted Kremenek <kremenek@apple.com> Change subexpressions to be visited in the CFG from left-to-right.

This is a more natural order of evaluation, and it is very important
for visualization in the static analyzer. Within Xcode, the arrows
will not jump from right to left, which looks very visually jarring.
It also provides a more natural location for dataflow-based diagnostics.

Along the way, we found a case in the analyzer diagnostics where we
needed to indicate that a variable was "captured" by a block.

-fsyntax-only timings on sqlite3.c show no visible performance change,
although this is just one test case.

Fixes <rdar://problem/13016513>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
3d1125b27e8006385a830f5b3748b7b44d227b4c 24-Aug-2012 Ted Kremenek <kremenek@apple.com> Teach CFG that 'if (x & 0)' and 'if (x * 0)' is an unfeasible branch.

Fixes <rdar://problem/11005770>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
2dd52e3815d040e340a5d953d838cd2268e25372 24-Jan-2012 David Blaikie <dblaikie@gmail.com> Reword/rename -Wswitch-unreachable-default.

Rewording the diagnostic to be more precise/correct: "default label in switch
which covers all enumeration values" and changed the switch to
-Wcovered-switch-default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
413c2c9d9c85ceb588e9cb965853f178a3a52bc9 23-Jan-2012 David Blaikie <dblaikie@gmail.com> Rename -Wswitch-enum-redundant-default to -Wswitch-redundant-default.

This is for consistency, since the flag is actually under -Wswitch now, rather
than -Wswitch-enum (since it's really valuable for the former and rather
orthogonal to the latter)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
31ceb61172bca7ebc3fb90e9125864c7a29c55c0 21-Jan-2012 David Blaikie <dblaikie@gmail.com> Add -Wswitch-enum-redundant-default.

This warning acts as the complement to the main -Wswitch-enum warning (which
warns whenever a switch over enum without a default doesn't cover all values of
the enum) & has been an an-doc coding convention in LLVM and Clang in my
experience. The purpose is to ensure there's never a "dead" default in a
switch-over-enum because this would hide future -Wswitch-enum errors.

The name warning has a separate flag name so it can be disabled but it's grouped
under -Wswitch-enum & is on-by-default because of this.

The existing violations of this rule in test cases have had the warning disabled
& I've added a specific test for the new behavior (many negative cases already
exist in the same test file - and none regressed - so I didn't add more).

Reviewed by Ted Kremenek ( http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120116/051690.html )

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
952b35dc07d5c77592a1b6bd54257511fcdb1ca9 03-Jan-2012 Ted Kremenek <kremenek@apple.com> Add test case for PR 9774, which got fixed along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
e7a2764b2c98859aa42a3fd36d55cd34c7fe883e 25-Aug-2011 Ted Kremenek <kremenek@apple.com> Teach -Wunreachable-code about dead code caused by macro expansions. This should suppress false positives resulting from 'assert' and friends.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
0c8e5a0f70cbdb800d939c1807d05f380b2854d4 19-Jul-2011 Ted Kremenek <kremenek@apple.com> Reduce -Wuninitialized time by 22% (on sqlite) by removing the recursive AST crawl.

This is accomplished by forcing the needed expressions for -Wuninitialized to always be CFGElements in the CFG.
This allows us to remove a fair amount of the code for -Wuninitialized.

Some fallout:
- AnalysisBasedWarnings.cpp now specifically toggles the CFGBuilder to create a CFG that is suitable for -Wuninitialized. This
is a layering violation, since the logic for -Wuninitialized is in libAnalysis. This can be fixed with the proper refactoring.
- Some of the source locations for -Wunreachable-code warnings have shifted. While not ideal, this is okay because that analysis
already needs some serious reworking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
e1667190dff025936a21e5eb43889ac93b570468 24-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> - Fixed subexpressions evaluation order for binary operators to match order in code generated with the compiler,
- Fixed test cases for unreachable code warnings produced by Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
8caec849a765de7b0b4ae8b9769397ce62236321 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Enhance -Wunreachable-code to not consider the 'default:' branch of a switch statement live if a switch on an enum value has
explicit 'case:' statements for each enum value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
5d1d7ae120c2c8e6cba5d2a712b33500a5aecc10 03-Sep-2010 Anders Carlsson <andersca@mac.com> Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning.

The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
58f281f7d54976f23ed4fa23a10ff1ab9c7037fe 19-Aug-2010 Ted Kremenek <kremenek@apple.com> Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
910716678e8af41432f3dfb16b340168597f8c45 24-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Always add CallExpr as block-level expression. Inline-based interprocedural
analysis needs this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
b5c775575b496c03d862ea03587a9f1d74193c9f 22-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings with respect to dead member and
dead array references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
44582300b63ac128989643adcd12b6349b67abe4 21-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings for with respect to c-style casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
e5fba7058ce34cc3d75e16e777ec6fc8096183f8 21-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings for with respect to ? :.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
45db90de59f6effb7bd9a55660ca97aa3feadc6c 21-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings for with respect to compound
assignments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
55f988efeb08b84c2dd9e4c05990b88c81fe2b58 21-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings with respect to dead binary and
unary operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
823000cdeeb2deb861dd92463d739c1e71fea5d2 16-Jan-2010 Mike Stump <mrs@apple.com> Generalize handling for unreachable code warnings to all binary operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
8eae0907c5094b8af61e26b8b809baf3c1ba75c8 16-Jan-2010 Mike Stump <mrs@apple.com> Refine location reporting for unreachable code warnings for comma expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c
9a24dc1409ec1d073a7b346d3b02a0129192fb58 15-Jan-2010 Mike Stump <mrs@apple.com> Add testcase for recent checkin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/warn-unreachable.c