| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
when checking if the format specifier matches the type of the data
argument and the length modifier indicates the data type is 'char' or
'short'.
llvm-svn: 94992
|
|
|
|
|
|
| |
definitions.
llvm-svn: 94972
|
|
|
|
|
|
| |
arguments. Thanks to Cristian Draghici for his help with this patch!
llvm-svn: 94864
|
|
|
|
|
|
|
| |
the field width and precision of a format specifier instead of just
'int'. This matches GCC, and fixes <rdar://problem/6079850>.
llvm-svn: 94856
|
|
|
|
|
|
|
|
|
| |
checking. It passes all existing tests, and the diagnostics have been
refined to provide better range information (we now highlight
individual format specifiers) and more precise wording in the
diagnostics.
llvm-svn: 94837
|
|
|
|
|
|
|
|
|
|
| |
specifiers.
In addition, move ParseFormatString() and FormatStringHandler() from
the clang::analyze_printf to the clang namespace. Hopefully this will
resolve some link errors on Linux.
llvm-svn: 94794
|
|
|
|
|
|
| |
specifiers.
llvm-svn: 94792
|
|
|
|
| |
llvm-svn: 94787
|
|
|
|
|
|
| |
exceeds the number of arguments.
llvm-svn: 94785
|
|
|
|
| |
llvm-svn: 94782
|
|
|
|
| |
llvm-svn: 94774
|
|
|
|
|
|
|
|
|
|
| |
- Add an anonymous class 'CheckPrintfHandler' which will do the
checking of specific format specifiers
- Add checking for using the '@' conversion specifier outside
an ObjC string literal
- Add checking for null characters within the string
llvm-svn: 94761
|
|
|
|
|
|
|
|
| |
This function will use the format string parsing logic in libAnalysis,
and once it is shown to be better than the current implementation it
will replace AlternateCheckPrintfString() entirely.
llvm-svn: 94721
|
|
|
|
| |
llvm-svn: 94717
|
|
|
|
| |
llvm-svn: 94707
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).
(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.
Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.
This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)
This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.
llvm-svn: 94406
|
|
|
|
| |
llvm-svn: 94118
|
|
|
|
|
|
| |
dead array references.
llvm-svn: 94115
|
|
|
|
|
|
| |
in C++.
llvm-svn: 94106
|
|
|
|
| |
llvm-svn: 94094
|
|
|
|
| |
llvm-svn: 94093
|
|
|
|
|
|
| |
assignments.
llvm-svn: 94086
|
|
|
|
|
|
| |
unary operators.
llvm-svn: 94084
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CallExprs as those edges help cause a n^2 explosion in the number of
destructor calls. Other consumers, such as static analysis, that
would like to have more a more complete CFG can select the inclusion
of those edges as CFG build time.
This also fixes up the two compilation users of CFGs to be tolerant of
having or not having those edges. All catch code is assumed be to
live if we didn't generate the exceptional edges for CallExprs.
llvm-svn: 94074
|
|
|
|
| |
llvm-svn: 94067
|
|
|
|
|
|
|
|
|
|
| |
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.
Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.
llvm-svn: 93153
|
|
|
|
| |
llvm-svn: 92866
|
|
|
|
| |
llvm-svn: 92862
|
|
|
|
|
|
|
|
|
|
|
|
| |
for -Wsign-compare and -Wconversion, and use that coordinated logic to drive
both diagnostics. The new logic works more transparently with implicit
conversions, conditional operators, etc., as well as bringing -Wconversion's
ability to deal with pseudo-closed operations (e.g. arithmetic on shorts) to
-Wsign-compare.
Fixes PRs 5887, 5937, 5938, and 5939.
llvm-svn: 92823
|
|
|
|
|
|
| |
with the format attribute.
llvm-svn: 92553
|
|
|
|
|
|
|
| |
overlap between this and -Wsign-compare, which is why I want them in the same
place.
llvm-svn: 92543
|
|
|
|
| |
llvm-svn: 92541
|
|
|
|
|
|
|
| |
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.
llvm-svn: 91983
|
|
|
|
|
|
| |
who prefers to be stealthy and mysterious.
llvm-svn: 91888
|
|
|
|
|
|
|
| |
as a constant integer. Also, some minor cleanup and improvements to the
diagnostics.
llvm-svn: 90504
|
|
|
|
| |
llvm-svn: 89113
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:
typedef const int CInt;
typedef CInt Self;
Self.isConstQualified() currently returns false!
Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:
- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.
This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()
expressions over to
Context.hasSameUnqualifiedType(T1, T2)
llvm-svn: 88969
|
|
|
|
| |
llvm-svn: 85576
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g.,
namespace N { int i; }
int j = N::i;
Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.
Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.
llvm-svn: 84962
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to all callers. Switch a few other users of CK_Unknown to proper cast
kinds.
Note that there are still some situations where we end up with
CK_Unknown; they're pretty easy to find with grep. There
are still a few missing conversion kinds, specifically
pointer/int/float->bool and the various combinations of real/complex
float/int->real/complex float/int.
llvm-svn: 84623
|
|
|
|
|
|
|
|
|
|
|
|
| |
value-dependent. Audit (and fixed) all calls to
Expr::isNullPointerConstant() to provide the correct behavior with
value-dependent expressions. Fixes PR5041 and a crash in libstdc++
<locale>.
In the same vein, properly compute value- and type-dependence for
ChooseExpr. Fixes PR4996.
llvm-svn: 82748
|
|
|
|
|
|
| |
This implements PR5034 and rdar://6836445.
llvm-svn: 82614
|
|
|
|
|
|
| |
breaking some projects, but I don't have a test case yet.
llvm-svn: 82539
|
|
|
|
|
|
| |
- Switching all of them out-of-my-current-scope-of-interest, sorry.
llvm-svn: 82515
|
|
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
|
|
|
| |
llvm-svn: 81590
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
| |
llvm-svn: 81176
|
|
|
|
|
|
|
|
| |
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.
llvm-svn: 80642
|
|
|
|
|
|
|
| |
also be adding explicit template arguments as an additional
"adornment". No functionality change.
llvm-svn: 80628
|