| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
previously, we were allowing this to bind to a temporary. Now, we
don't; add test-cases and improve diagnostics.
llvm-svn: 94831
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
requires a temporary. Previously, we were building an initialization
sequence that bound to the bit-field as if it were a real lvalue. Note
that we previously (and still) diagnose binding of non-const
references to bit-fields, as we should.
There's no real way to test that this code is correct, since reference
binding does not *currently* have any representation in the AST. This
fix should make it easier for that to happen, so I've verified this
fix with...
Added InitializationSequence::dump(), to print an initialization
sequence for debugging purposes.
llvm-svn: 94826
|
| |
|
|
| |
llvm-svn: 94824
|
| |
|
|
| |
llvm-svn: 94823
|
| |
|
|
| |
llvm-svn: 94819
|
| |
|
|
|
|
|
|
| |
that ADL is suppressed), we need to build an
UnresolvedLookupExpr. Fixes PR6063, which was hitting Boost headers
pretty hard.
llvm-svn: 94814
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 94793
|
| |
|
|
|
|
| |
specifiers.
llvm-svn: 94792
|
| |
|
|
| |
llvm-svn: 94791
|
| |
|
|
| |
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
|
| |
|
|
|
|
| |
to get the access bits set properly in conversion sets.
llvm-svn: 94744
|
| |
|
|
|
|
|
|
| |
mostly because we're going to want a better diagnostic for conversions.
Also this API needs to go back to sanity.
llvm-svn: 94730
|
| |
|
|
| |
llvm-svn: 94725
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
sequences, where we would occasionally determine (incorrectly) that
one standard conversion sequence was a proper subset of another when,
in fact, they contained completely incomparable conversions.
This change records the types in each step within a standard
conversion sequence, so that we can check the specific comparison
types to determine when one sequence is a proper subset of the
other. Fixes this testcase (thanks, Anders!), which was distilled from
PR6095 (also thanks to Anders).
llvm-svn: 94660
|
| |
|
|
|
|
| |
using the same framework we use for deprecation warnings.
llvm-svn: 94659
|
| |
|
|
|
|
|
| |
diagnostics in "early" lookups, such as during typename checks and when building
unresolved lookup expressions.
llvm-svn: 94647
|
| |
|
|
| |
llvm-svn: 94531
|
| |
|
|
|
|
|
|
|
| |
This solution relies on an O(n) scan of redeclarations, which means it might
scale poorly in crazy cases with tons of redeclarations brought in by a ton
of distinct associated namespaces. I believe that avoiding this
is not worth the common-case cost.
llvm-svn: 94530
|
| |
|
|
|
|
|
|
|
|
| |
type when that type is 64 bits wide, and the 'long long' type when 'long' is
only 32 bits wide. This fixes PR6108.
Also adds a bunch of test cases to ensure proper conversion between equally
sized standard types and mode-specified types on both 32 and 64 bit targets.
llvm-svn: 94527
|
| |
|
|
|
|
| |
about interaction between ADL and default arguments. Shrug shoulders, commit.
llvm-svn: 94524
|
| |
|
|
|
|
| |
general refactoring in operator resolution.
llvm-svn: 94498
|
| |
|
|
| |
llvm-svn: 94485
|
| |
|
|
| |
llvm-svn: 94427
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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: 94379
|
| |
|
|
| |
llvm-svn: 94365
|
| |
|
|
| |
llvm-svn: 94361
|
| |
|
|
|
|
| |
unbalanced.
llvm-svn: 94347
|
| |
|
|
|
|
| |
the bug where array elements and member initializers weren't copied correctly.
llvm-svn: 94340
|
| |
|
|
| |
llvm-svn: 94335
|
| |
|
|
| |
llvm-svn: 94334
|
| |
|
|
| |
llvm-svn: 94333
|
| |
|
|
| |
llvm-svn: 94332
|
| |
|
|
| |
llvm-svn: 94329
|
| |
|
|
| |
llvm-svn: 94327
|
| |
|
|
|
|
| |
initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.
llvm-svn: 94325
|
| |
|
|
|
|
| |
Sema::PerformCopyInitialization overload.
llvm-svn: 94324
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 94316
|
| |
|
|
| |
llvm-svn: 94314
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
incomplete type (or a pointer/reference to such).
The causes of this problem are different enough to justify a different "design"
for the diagnostic. Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.
This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.
llvm-svn: 94303
|
| |
|
|
|
|
| |
copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)
llvm-svn: 94289
|