[cfe-commits] r162875 - in /cfe/trunk: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp test/Analysis/diagnostics/undef-value-param.c utils/analyzer/SATestBuild.py
Anna Zaks
ganna at apple.com
Wed Aug 29 16:23:39 PDT 2012
Author: zaks
Date: Wed Aug 29 18:23:39 2012
New Revision: 162875
URL: http://llvm.org/viewvc/llvm-project?rev=162875&view=rev
Log:
[analyzer] Fixup 162863.
Thanks Jordan.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
cfe/trunk/test/Analysis/diagnostics/undef-value-param.c
cfe/trunk/utils/analyzer/SATestBuild.py
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp?rev=162875&r1=162874&r2=162875&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp Wed Aug 29 18:23:39 2012
@@ -978,7 +978,7 @@
// Are we tracking the argument?
if ( !ArgReg || ArgReg != R)
- return 0;
+ continue;
// Check the function parameter type.
const ParmVarDecl *ParamDecl = *I;
@@ -987,13 +987,13 @@
if (!(T->isAnyPointerType() || T->isReferenceType())) {
// Function can only change the value passed in by address.
- return 0;
+ continue;
}
// If it is a const pointer value, the function does not intend to
// change the value.
if (T->getPointeeType().isConstQualified())
- return 0;
+ continue;
// Mark the call site (LocationContext) as interesting if the value of the
// argument is undefined or '0'/'NULL'.
Modified: cfe/trunk/test/Analysis/diagnostics/undef-value-param.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/diagnostics/undef-value-param.c?rev=162875&r1=162874&r2=162875&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/diagnostics/undef-value-param.c (original)
+++ cfe/trunk/test/Analysis/diagnostics/undef-value-param.c Wed Aug 29 18:23:39 2012
@@ -7,7 +7,7 @@
c++;
return;
}
-void foo(int *x, int c) {
+void foo(int c, int *x) {
if (c)
//expected-note at -1{{Assuming 'c' is not equal to 0}}
//expected-note at -2{{Taking true branch}}
@@ -18,7 +18,7 @@
int use(int c) {
int xx; //expected-note{{Variable 'xx' declared without an initial value}}
int *y = &xx;
- foo (y, c);
+ foo (c, y);
//expected-note at -1{{Calling 'foo'}}
//expected-note at -2{{Returning from 'foo'}}
foo_irrelevant(c);
Modified: cfe/trunk/utils/analyzer/SATestBuild.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestBuild.py?rev=162875&r1=162874&r2=162875&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/SATestBuild.py (original)
+++ cfe/trunk/utils/analyzer/SATestBuild.py Wed Aug 29 18:23:39 2012
@@ -404,9 +404,6 @@
RefList = glob.glob(RefDir + "/*")
NewList = glob.glob(NewDir + "/*")
- print " Comparing Results: %s" % (os.path.join(RefDir, LogFolderName))
- print " Comparing Results: %s" % (os.path.join(NewDir, LogFolderName))
-
# Log folders are also located in the results dir, so ignore them.
RefList.remove(os.path.join(RefDir, LogFolderName))
NewList.remove(os.path.join(NewDir, LogFolderName))
More information about the cfe-commits
mailing list