Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: test/win/compiler-flags/uninit.cc

Issue 11236042: ninja windows: add flag support for code analysis (aka PREfast) (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: copyright Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/win/compiler-flags/analysis.gyp ('k') | test/win/gyptest-cl-analysis.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/win/compiler-flags/uninit.cc
===================================================================
--- test/win/compiler-flags/uninit.cc (revision 0)
+++ test/win/compiler-flags/uninit.cc (revision 0)
@@ -0,0 +1,13 @@
+// Copyright (c) 2012 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Should trigger C6001: using uninitialized memory <variable> for |i|.
+int f(bool b) {
+ int i;
+ if (b)
+ i = 0;
+ return i;
+}
+
+int main() {}
Property changes on: test\win\compiler-flags\uninit.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « test/win/compiler-flags/analysis.gyp ('k') | test/win/gyptest-cl-analysis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698