From 7eae669eeeaed1f391d63b20620d18d45de36e5d Mon Sep 17 00:00:00 2001 From: Anton Yartsev Date: Tue, 12 Feb 2013 04:45:48 +0000 Subject: [PATCH] + centered progress cells + added progress information for several checkers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174941 91177308-0d34-0410-b5e6-96231b3b80d8 --- www/analyzer/content.css | 1 + www/analyzer/potential_checkers.html | 183 ++++++++++++++------------- 2 files changed, 97 insertions(+), 87 deletions(-) diff --git a/www/analyzer/content.css b/www/analyzer/content.css index c2fa294d79..6f68fdb7d5 100644 --- a/www/analyzer/content.css +++ b/www/analyzer/content.css @@ -87,6 +87,7 @@ table.checkers td { border-bottom: 1px #cccccc dotted; } +table.checkers td.aligned { text-align: center; vertical-align: middle; } table.checkers col.namedescr { width: 45% } table.checkers col.example { width: 55% } table.checkers col.progress { width: 84px } diff --git a/www/analyzer/potential_checkers.html b/www/analyzer/potential_checkers.html index f65106efaf..a27d6e877b 100644 --- a/www/analyzer/potential_checkers.html +++ b/www/analyzer/potential_checkers.html @@ -43,7 +43,8 @@ void test() { return; delete p2; } - +PR15237 + memory.MismatchedFree
enhancement to unix.Malloc
(C, C++)


@@ -58,7 +59,8 @@ void test() { free(p1); // warn free(p2); // warn } - +PR15238 + memory.MismatchedDelete
(C, C++)


@@ -75,7 +77,8 @@ void test() { delete p2; // warn delete p3; // warn } - +PR15238 + memory.MultipleDelete
(C++)


@@ -92,7 +95,9 @@ void test() { delete p2; // warn delete p3; // warn } - +PR15237 + + memory.LeakPtrValChanged
enhancement to unix.Malloc
(C, C++)


@@ -116,7 +121,9 @@ void test() { f(p4); p4++; // ok } - +done at r174678 + + memory.DeallocateNonPtr
enhancement to unix.Malloc
(C, C++)


@@ -138,7 +145,9 @@ void test() { delete s; // warn free(s); // warn } - +PR15237 + + memory.LeakEvalOrder
(C, C++)


@@ -156,7 +165,7 @@ void test() { f1(g((int *)malloc(sizeof(int))), h()); // warn f2(new int, new int); } - + memory.DstBufferTooSmall
(C, C++)


@@ -173,7 +182,7 @@ void test() { int* p2 = new int; memcpy(p2, p1, 3); // warn } - + memory.NegativeArraySize
enhancement to experimental.security.MallocOverflow
(C, C++) @@ -187,7 +196,7 @@ void test() { int n1 = -1; p = new int[n1]; // warn } - + @@ -208,7 +217,7 @@ class A { A() {} ~A() { throw 1; } // warn }; - + ctordtor.ExptInsideDtorImplicit
(C++)


@@ -221,7 +230,7 @@ class A { A() {} ~A() { f(); } // warn }; - + @@ -237,7 +246,7 @@ Function prototype has throw(T) specifier but the function do not throw
 void f() throw(int) { // warn
 }
-
+ exceptions.NoThrowSpecButThrows
(C++)


@@ -246,7 +255,7 @@ An exception is throw from a function having the throw() specifier void f() throw() { throw(1); // warn } - + exceptions.ThrownTypeDiffersSpec
(C++)


@@ -258,7 +267,7 @@ void f() throw(int) { S s; throw (s); // warn } - + @@ -286,7 +295,7 @@ void test() { std::auto_ptr<int> p3((int *)malloc(sizeof(int))); // warn } - + @@ -311,7 +320,7 @@ public: }; A a; - + undefbehavior.LocalStaticDestroyed
(C++)


@@ -336,7 +345,7 @@ A a; void f() { static B b; // <- } - + undefbehavior.UseAfterRelease
enhancement to unix.Malloc
(C, C++)


@@ -351,7 +360,7 @@ void test() { int i = *p; // warn } - + undefbehavior.ZeroAllocDereference
enhancement to unix.Malloc
(C, C++)


@@ -362,7 +371,7 @@ undefined int *p = new int[0]; int i = p[0]; // warn - + undefbehavior.DeadReferenced
(C++)


@@ -418,7 +427,7 @@ void test() { dynamic_cast<A*>(b); // warn delete b; // warn } - + undefbehavior.ObjLocChanges
(C++)


@@ -439,7 +448,7 @@ void test() { new (&b2) T; delete b1; // warn } // warn - + undefbehavior.ExprEvalOrderUndef
(C, C++03)


@@ -452,7 +461,7 @@ void test () { i = v[i++]; // warn i = ++i + 1; // warn } - + undefbehavior.StaticInitReentered
(C)


@@ -463,7 +472,7 @@ int test(int i) { static int s = test(2*i); // warn return i+1; } - + undefbehavior.ConstModified
(C, C++)


@@ -493,7 +502,7 @@ void test() { p->x.i = 1; // ok p->x.j = 1; // warn } - + undefbehavior.DeadDestructed
(C++)


@@ -511,7 +520,7 @@ void test() { A a; a.~A(); } // warn - + undefbehavior.MethodCallBeforeBaseInit
(C++)


@@ -526,7 +535,7 @@ public : int f(); B() : A(f()) {} // warn }; - + undefbehavior.MemberOrBaseRefBeforeCtor
(C++)


@@ -589,7 +598,7 @@ struct S { non_trivial nt; S() : k(&nt.j) {} // warn }; - + undefbehavior.MemberRefAfterDtor
(C++)


@@ -620,7 +629,7 @@ void test() { s->~S(); s->f(); // warn } - + undefbehavior.CtorForeignCall
(C++)


@@ -641,7 +650,7 @@ class C : public A, B { public: C() : B((A*)this) {} }; - + undefbehavior.CtorForeignCast undefbehavior.CtorForeignTypeid @@ -669,7 +678,7 @@ class C : public A, B { public: C() : B((A*)this) {} }; - + undefbehavior.MemberRefInCatch undefbehavior.BaseRefInCatch @@ -689,7 +698,7 @@ public : i=2; // warn } }; - + undefbehavior.ReturnAtCatchEnd
(C++)


@@ -701,7 +710,7 @@ int test() try { } catch(int) { } // warn - + undefbehavior.AutoptrsOwnSameObj
(C++03)


@@ -715,7 +724,7 @@ void test() { std::auto_ptr<int> p(data); std::auto_ptr<int> q(data); // warn } - + undefbehavior.BasicStringBoundAccess
(C++03)


@@ -725,7 +734,7 @@ void test() { std::basic_string<char> s; char c = s[10]; // warn } - + undefbehavior.BasicStringBoundModification
(C++)


@@ -735,7 +744,7 @@ void test() { std::basic_string<char> s; s[10] = 0; // warn } - + undefbehavior.EosDereference
(C++)


@@ -749,7 +758,7 @@ void test() { int i = *v.end(); // warn *v.end() = 0; // warn } - + undefbehavior.QsortNonPOD undefbehavior.QsortNonTrivial @@ -815,7 +824,7 @@ void test() { qsort(nt, 2, sizeof(non_trivial), compare2); // warn } - + undefbehavior.ThrowWhileCopy
C++


@@ -835,7 +844,7 @@ struct S { j = s.j; } }; - + undefbehavior.ValarrayArgBound
(C++)


@@ -853,7 +862,7 @@ void test(void) { S s[] = { S(1), S(2) }; std::valarray<S> v(s,3); // warn } - + undefbehavior.ValarrayLengthDiffer
(C++)


@@ -886,7 +895,7 @@ void test(void) { b.resize(1); a = b; // OK } - + undefbehavior.ValarrayZeroLength
(C++)


@@ -901,7 +910,7 @@ void test(void) { v.min(); // warn v.max(); // warn } - + undefbehavior.ValarrayBadIndirection
(C++)


@@ -917,7 +926,7 @@ void test() { a[indirect] = b; //warn a[indirect] *= b; //warn } - + undefbehavior.IosBaseDestroyedBeforeInit
(C++)

@@ -948,7 +957,7 @@ void test() { delete p1; // warn delete p2; // ok } - + undefbehavior.IosBaseUsedBeforeInit
(C++11)


@@ -980,7 +989,7 @@ void test() { delete p1; // warn delete p2; // ok } - + undefbehavior.MinusOnePosType
(C++)


@@ -1003,7 +1012,7 @@ void test() { in.seekg(pos); // warn out.seekp(-1); // warn } - + @@ -1024,7 +1033,7 @@ void test() { int v[1] = {0}; f(v[i], i++); // warn } - + different.IdenticalExprBinOp
(C)


@@ -1050,7 +1059,7 @@ void test() { if (f() && f()) {} // ok } - + different.FuncPtrInsteadOfCall
(C)


@@ -1061,7 +1070,7 @@ int f(); void test() { if (f == 0) {} // warn } - + different.IdenticalCondIfElseIf
(C)


@@ -1073,7 +1082,7 @@ void test() { if (i == 1) {} else if (i == 1) {} // warn } - + SuccessiveAssign
(C)


@@ -1084,7 +1093,7 @@ void test() { i=1; i=2; // warn } - + different.NullDerefStmtOrder
enhancement to core.NullDereference
(C)


@@ -1105,7 +1114,7 @@ void test() { S *p2 = f(); int x2 = p2->x; // ok } - + different.NullDerefCondOrder
enhancement to core.NullDereference
(C)


@@ -1120,7 +1129,7 @@ void test() { S *p = f(); if (p->b && p) {}; // warn } - + different.IdenticalStmtThenElse
(C)


@@ -1135,7 +1144,7 @@ void test() { i++; } } - + different.MultipleAccessors
(C++)


@@ -1150,7 +1159,7 @@ public: void setI(int& ii) { i = ii; } void setJ(int& jj) { i = jj; } // warn }; - + different.AccessorsForPublic
(C++)


@@ -1162,7 +1171,7 @@ public: int getI() { return i; } void setI(int& ii) { i = ii; } }; - + different.LibFuncResultUnised
(C, C++)


@@ -1175,7 +1184,7 @@ void test() { std::vector<int> v; v.empty(); // warn } - + different.WrongVarForStmt
(C, C++)


@@ -1188,7 +1197,7 @@ void test() { for (j=0; j<3; ++i); // warn for (int j=0; i<3; ++j); // warn } - + different.FloatingCompare
(C)


@@ -1201,7 +1210,7 @@ void test() { if (b == 0.5) // warn b = 0; } - + different.BoolCompare
maybe merge with experimental.core.BoolAssignment
(C, C++)


@@ -1213,7 +1222,7 @@ void test() { bool b; if (b == 3) {}; // warn } - + different.BitwiseOpBoolArg
maybe join with experimental.core.BoolAssignment
(C, C++)


@@ -1226,7 +1235,7 @@ void test() { bool b = true; if (b & f()) {} // warn } - + different.LabelInsideSwitch
(C)


@@ -1242,7 +1251,7 @@ void test() { c -= 1; break; } } - + different.IdenticalCondIfIf
(C)


@@ -1255,7 +1264,7 @@ void test() { if (c > 5) // warn c -= 1; } - + different.CondOpIdenticalReturn
(C)


@@ -1265,7 +1274,7 @@ void test() { unsigned a; a = a > 5 ? a : a; // warn } - + different.UnaryPlusWithUnsigned
(C)


@@ -1275,7 +1284,7 @@ void test() { unsigned a; a = +a; // warn } - + different.LogicalOpUselessArg
(C)


@@ -1285,7 +1294,7 @@ void test() { unsigned a; if (a<7 && a<10) {}; // warn } - + different.SameResLogicalExpr
(C)


@@ -1297,7 +1306,7 @@ void test() { if (i==0 && i==1) {}; // warn if (i<0 || i>=0) {}; // warn } - + different.SameResUnsignedCmp
(C)


@@ -1308,7 +1317,7 @@ void test() { if (u < -1) {}; // warn if (u >= 0) {}; // warn } - + different.OpPrecedenceAssignCmp
(C)


@@ -1324,7 +1333,7 @@ void test() { if((b = x != y)) {} // ok if((x = f() != y)) {} // warn } - + different.OpPrecedenceIifShift
(C)


@@ -1337,7 +1346,7 @@ void test() { std::cout << a ? "a" : "b"; // warn a << a>7 ? 1 : 2; // warn } - + different.ObjectUnused
(C++)


@@ -1360,7 +1369,7 @@ void test() { S(0, 0); // warn std::exception(); // warn } - + different.StaticArrayPtrCompare
(C)


@@ -1374,7 +1383,7 @@ void test() { int a2[1][1]; if (a2[0]) {}; // warn } - + different.ConversionToBool
maybe join with experimental.core.BoolAssignment
(C, C++)


@@ -1384,7 +1393,7 @@ bool test() { return 1.; // warn return ""; // warn } - + different.ArrayBound
enhancement to experimental.security.ArrayBound[v2]
(C, C++)


@@ -1398,7 +1407,7 @@ void test() { int i = 1; if(p2[i]) {}; // warn } - + different.StrcpyInputSize
enhancement to experimental.unix.cstring.OutOfBounds
(C)


@@ -1408,7 +1417,7 @@ void test(char* string) { char buf[24]; strcpy(buf, string); // warn } - + different.IntegerOverflow
(C)


@@ -1427,7 +1436,7 @@ void test() { int y = INT_MAX/2+1; // warn x = y*2; // warn } - + different.SignExtension
(C)


@@ -1451,7 +1460,7 @@ unsigned int test() { ui = g(); // warn return si; // warn } - + different.NumericTruncation
(C)


@@ -1475,7 +1484,7 @@ int test() { ss = g(); // warn return sll; // warn } - + different.MissingCopyCtorAssignOp
(C, C++)


@@ -1488,7 +1497,7 @@ public: C() { p = new int; } ~C() { delete p; } }; - + @@ -1513,7 +1522,7 @@ void test() { NULL, TEXT("MyProgram.exe"), NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi); } // warn - + WinAPI.LoadLibrary
(C)


@@ -1525,7 +1534,7 @@ arbitrary location void test() { HINSTANCE h = LoadLibrary("X.dll"); // warn } - + WinAPI.WideCharToMultiByte
(C)


@@ -1548,7 +1557,7 @@ void test() else s[res2] = 0; } - + @@ -1571,7 +1580,7 @@ struct A { bool FirstIsZero(const struct A a) { // warn return a.a[0] == 0; } - + optimization.PostfixIncIter
(C++)


@@ -1585,7 +1594,7 @@ void test() { for(it = v.begin(); it != v.end(); it++) {}; // warn } - + optimization.MultipleCallsStrlen
(C)


@@ -1600,7 +1609,7 @@ void test() { if (strlen(s) > 0 && strlen(s) < 7) {}; // warn } - + optimization.EmptyCstrDetect
(C)


@@ -1613,7 +1622,7 @@ void test() { const char* s = "abc"; if (strlen(s) > 0) {}; // warn } - + optimization.StrLengthCalculation
(C, C++)


@@ -1627,7 +1636,7 @@ void test() { std::string s; if (strlen(s.c_str()) != 0) {}; // warn } - + optimization.EmptyContainerDetect
(C, C++)


@@ -1640,7 +1649,7 @@ void test() { std::list<int> l; if (l.size() != 0) {}; // warn } - + -- 2.40.0