| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
references to values in these maps. PR13197.
llvm-svn: 159161
|
|
|
|
|
|
|
|
| |
The implicit global allocation functions do not have valid source locations,
but we still want to treat them as being "system header" functions for the
purposes of how they affect program state.
llvm-svn: 159160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resulted in it being reverted. A test for that bug was added in r158950.
Original comment:
If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.
Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.
Patch by Sam Panzer!
llvm-svn: 159159
|
|
|
|
| |
llvm-svn: 159152
|
|
|
|
|
|
|
| |
for non-type template parameters in microsoft mode.
PR12709.
llvm-svn: 159147
|
|
|
|
| |
llvm-svn: 159130
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
% diagtool tree -Wunused-value
-Wunused-value
-Wunused-comparison
warn_unused_comparison
-Wunused-result
warn_unused_result
warn_unused_call
warn_unused_container_subscript_expr
warn_unused_expr
warn_unused_property_expr
warn_unused_voidptr
llvm-svn: 159093
|
|
|
|
| |
llvm-svn: 159089
|
|
|
|
|
|
| |
id <Protocol>. // rdar://11618852
llvm-svn: 159084
|
|
|
|
|
|
| |
Not all targets support __thread variables.
llvm-svn: 159080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for the tls_model attribute. This allows the user to
choose a TLS model that is better than what LLVM would select by
default. For example, a variable might be declared as:
__thread int x __attribute__((tls_model("initial-exec")));
if it will not be used in a shared library that is dlopen'ed.
This depends on LLVM r159077.
llvm-svn: 159078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attributes in more places where we didn't and catching a lot more issues.
This implements nearly every aspect of C++11 attribute parsing, except for:
- Attributes are permitted on explicit instantiations inside the declarator
(but not preceding the decl-spec)
- Attributes are permitted on friend declarations of functions.
- Multiple instances of the same attribute in an attribute-list (e.g.
[[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming)
are allowed.
The first two are marked as expected-FIXME in the test file and the latter
is probably a defect and is currently untested.
Thanks to Richard Smith for providing the lion's share of the testcases.
llvm-svn: 159072
|
|
|
|
|
|
| |
function pointers PR13176,PR13177
llvm-svn: 159059
|
|
|
|
|
|
| |
arguments in a class specialization.
llvm-svn: 159056
|
|
|
|
| |
llvm-svn: 159054
|
|
|
|
| |
llvm-svn: 159047
|
|
|
|
| |
llvm-svn: 159046
|
|
|
|
|
|
| |
relinquish memory.
llvm-svn: 159043
|
|
|
|
| |
llvm-svn: 159037
|
|
|
|
| |
llvm-svn: 159026
|
|
|
|
|
|
| |
design of a more generic metadata node
llvm-svn: 159016
|
|
|
|
| |
llvm-svn: 159012
|
|
|
|
|
|
|
|
|
|
|
| |
We don't handle exceptions yet, so we treat them as sinks. ExprEngine
hardcodes messages that are known to raise Objective-C exceptions like -raise,
but it was only checking for +raise:format: and +raise:format:arguments: on
NSException itself, not subclasses.
<rdar://problem/11724201>
llvm-svn: 159010
|
|
|
|
|
|
|
|
| |
properly if there is a join point in the control flow graph that involves
a trylock. Also changes the source locations of some warnings to be
more consistent.
llvm-svn: 159008
|
|
|
|
|
|
|
|
| |
when the calling site is a member function template.
Effectively reverts r111675.
llvm-svn: 159004
|
|
|
|
| |
llvm-svn: 159001
|
|
|
|
|
|
| |
not a pointer to a fast-enumerable object. // rdar://11488666
llvm-svn: 158998
|
|
|
|
|
|
| |
transfered with dataWithBytesNoCopy.
llvm-svn: 158958
|
|
|
|
| |
llvm-svn: 158954
|
|
|
|
| |
llvm-svn: 158950
|
|
|
|
|
|
|
|
| |
Revert "If an object (such as a std::string) with an appropriate c_str() member function"
This reverts commit 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e.
llvm-svn: 158949
|
|
|
|
|
|
| |
comments are not coming in source order. Instead of trying to std::sort() comments (which can be costly), just remove comments that are not in order.
llvm-svn: 158940
|
|
|
|
|
|
|
|
| |
`isa`,
then it should get the same warnings that id->isa gets. // rdar://11702488
llvm-svn: 158938
|
|
|
|
|
|
|
|
|
| |
This now correctly covers, I believe, all the pointer types:
* 'any' pointers (both function and data normal pointers and ObjC object pointers)
* member pointers (both function and data)
* block pointers
llvm-svn: 158931
|
|
|
|
|
|
|
| |
method declarations.
// rdar://11578353.
llvm-svn: 158929
|
|
|
|
| |
llvm-svn: 158916
|
|
|
|
|
|
| |
Mark as XFAIL:cygming. -pedantic is passed with gcc-as driver. PR12920"
llvm-svn: 158915
|
|
|
|
|
|
|
|
| |
1. Accept flags -g[0-3], -ggdb[0-3], -gdwarf-[2-4] and collapse them to simple -g (except -g0/-ggdb0).
2. Produce driver error on unsupported formats (-gcoff, -gstabs, -gvms) and options (-gtoggle).
3. Recognize and ignore flags -g[no-]strict-dwarf, -g[no-]record-gcc-switches.
llvm-svn: 158906
|
|
|
|
|
|
|
|
|
|
|
|
| |
In C, enum constants have the type of the enum's underlying integer type,
rather than the type of the enum. (This is not true in C++.) This leads to
odd warnings when returning enum constants directly in blocks with inferred
return types. The easiest way out of this is to pretend that, like C++, enum
constants have enum type when being returned from a block.
<rdar://problem/11662489>
llvm-svn: 158899
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, don't warn if the used function is __attribute__((const)), in which case
it's not supposed to use global variables anyway.
The inline-in-inline thing is a heuristic, and one that's possibly incorrect
fairly often because the function being inlined could definitely use global
variables. However, even some C standard library functions are written using
other (trivial) static-inline functions in the headers, and we definitely don't
want to be warning on that (or on anything that /uses/ these trivial inline
functions). So we're using "inlined" as a marker for "fairly trivial".
(Note that __attribute__((pure)) does /not/ guarantee safety like ((const),
because ((const)) does not guarantee that global variables are not being used,
and the warning is about globals not being shared across TUs.)
llvm-svn: 158898
|
|
|
|
|
|
| |
appropriate. Patch by João Matos!
llvm-svn: 158895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.
Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.
Patch by Sam Panzer!
llvm-svn: 158887
|
|
|
|
|
|
| |
is permitted by all relevant language standards. Patch by Andy Gibbs!
llvm-svn: 158883
|
|
|
|
| |
llvm-svn: 158875
|
|
|
|
|
|
| |
// rdar://11671080
llvm-svn: 158874
|
|
|
|
|
|
| |
has not overridden the property. // rdar://11656982
llvm-svn: 158871
|
|
|
|
|
|
|
|
|
|
| |
"write" attribute (copy/retain/etc.). But, property declaration in
primary class and protcols are tentative as they may be overridden
into a 'readwrite' property in class extensions. Postpone diagnosing
such warnings until the class implementation is seen.
// rdar://11656982
llvm-svn: 158869
|
|
|
|
|
|
| |
of CFG, discussion: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120507/057370.html)
llvm-svn: 158854
|
|
|
|
|
|
|
|
|
| |
Now that this is a C-only warning, we can use "static" instead of "internal
linkage", which is a term developers are probably more familiar with.
This makes for a better warning message. The warning name was changed to match,
since "internal linkage" is not mentioned in the warning text anymore.
llvm-svn: 158853
|
|
|
|
|
|
|
|
| |
This commits sets the grounds for more aggressive use after free
checking. We will use the Relinquished sate to denote that someone
else is now responsible for releasing the memory.
llvm-svn: 158850
|