| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
testcase.
llvm-svn: 160766
|
| |
|
|
|
|
|
|
|
|
| |
Rather than adding a ContainsUnexpandedParameterPack bit to essentially every
AST node, we tunnel the bit directly up to the surrounding lambda expression
when we reach a context where an unexpanded pack can not normally appear.
Thus any statement or declaration within a lambda can now potentially contain
an unexpanded parameter pack.
llvm-svn: 160705
|
| |
|
|
|
|
| |
unless they appear in a decl-specifier-seq.
llvm-svn: 160688
|
| |
|
|
|
|
|
|
|
|
| |
A warning was added in r150128 for returning non-C compatible
user-defined types from functions with C linkage.
This makes the text more clear for the case when the type isn't
decidedly non-C compatible, but incomplete.
llvm-svn: 160681
|
| |
|
|
|
|
|
| |
variables that have static storage duration, it removes debug info on the
emitted initializer function but not all debug info about this variable.
llvm-svn: 160659
|
| |
|
|
| |
llvm-svn: 160658
|
| |
|
|
| |
llvm-svn: 160657
|
| |
|
|
|
|
| |
APSInt::isSameValue() when comparing different sized APSInt's.
llvm-svn: 160641
|
| |
|
|
|
|
|
|
| |
Make handler functions for thread safety attributes consistent with other attributes handler functions
by removing the bool parameter from some of the thread safety attributes handler functions and extracting
common checks out of different handler functions.
llvm-svn: 160635
|
| |
|
|
| |
llvm-svn: 160622
|
| |
|
|
|
|
|
|
| |
structor class under ARC, that struct/class does not have a trivial
move constructor or move assignment operator. Fixes the rest of
<rdar://problem/11738725>.
llvm-svn: 160615
|
| |
|
|
|
|
|
|
|
|
| |
change once it's been assigned. It can change in two ways:
1) In a template instantiation, the context declaration should be the
instantiated declaration, not the declaration in the template.
2) If a lambda appears in the pattern of a variadic pack expansion, the
mangling number will depend on the pack length.
llvm-svn: 160614
|
| |
|
|
|
|
| |
number of formal parameters for a variadic function call.
llvm-svn: 160570
|
| |
|
|
|
|
|
|
| |
or implementation since we've now got a different layout.
Fixes rdar://11842763
llvm-svn: 160526
|
| |
|
|
| |
llvm-svn: 160522
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we still want to consider this a hard error (non-POD variadic args are
normally a DefaultError warning), delaying the diagnostic allows us to give
better error messages, which also match the usual non-POD errors more closely.
In addition, this change improves the diagnostic messages for format string
argument type mismatches by passing down the type of the callee, so we can
say "variadic method" or "variadic function" appropriately.
<rdar://problem/11825593>
llvm-svn: 160517
|
| |
|
|
|
|
|
|
|
| |
Previously, we would ask for the SourceLocation of an argument even if
it were NULL (i.e. if Sema resulted in an ExprError trying to build it).
<rdar://problem/11890818>
llvm-svn: 160515
|
| |
|
|
|
|
| |
longer emit a diagnostic when the enumeration's name matches that of the class. Fixes PR13128.
llvm-svn: 160490
|
| |
|
|
|
|
|
|
| |
Panzer. I've not been able to trigger a failure caused by this, so no test yet.
Also included is a small change from Paul Robinson to only consider the
FailureKind if the overload candidate did actually fail.
llvm-svn: 160470
|
| |
|
|
|
|
|
|
| |
be defined as deleted, take cv-qualifiers on class members into account when
looking up the copy or move constructor or assignment operator which will be
used for them.
llvm-svn: 160418
|
| |
|
|
|
|
|
| |
constructor will be used for moving that object, in the computation of its
exception specification.
llvm-svn: 160417
|
| |
|
|
|
|
|
|
|
|
|
| |
and a function template instantiation, if there's a parameter pack in the
declaration and one at the same place in the instantiation, don't assume that
the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead
and check whether the parameter pack was expandable. We can do this as a
side-effect of the work we'd need to do anyway, to find how many parameters
were produced.
llvm-svn: 160416
|
| |
|
|
|
|
|
|
| |
[temp.deduct.call]p4 under Objective-C++ ARC, make sure to adjust the
qualifiers to introduce the implicit strong lifetime when
needed. Fixes <rdar://problem/11825671>.
llvm-svn: 160412
|
| |
|
|
|
|
| |
completions. Fixes <rdar://problem/11889572>.
llvm-svn: 160407
|
| |
|
|
|
|
| |
Fixes pr13353.cpp.
llvm-svn: 160393
|
| |
|
|
|
|
|
| |
Due to performance cost, this is an opt-in option placed
under -Wassign-enum. // rdar://11824807
llvm-svn: 160382
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checks against nil often appear as guards in macros, and comparing
Objective-C literals to nil has well-defined behavior (if tautological).
On OS X, 'nil' has not been typed as 'id' since 10.6 (possibly earlier),
so the warning was already not firing, but other runtimes continue to use
((id)0) or some variant. This change accepts comparisons to any null pointer;
to keep it simple, it looks through all casts (not just casts to 'id').
PR13276
llvm-svn: 160379
|
| |
|
|
|
|
|
|
|
| |
Suggested by Ted, since string literal comparison is at least slightly more
sensible than comparison of runtime literals. (Ambiguous language on
developer.apple.com implies that strings are guaranteed to be uniqued within
a translation unit and possibly across a linked binary.)
llvm-svn: 160378
|
| |
|
|
|
|
|
|
| |
Recovering as if the user had actually called -isEqual: is a bit too far from
the semantics of the program as written, /even though/ it's probably what they
intended.
llvm-svn: 160377
|
| |
|
|
|
|
|
| |
is a bit fuzzy, but matches gcc behavior and existing code bases seem to
depend on it.
llvm-svn: 160364
|
| |
|
|
|
|
| |
to build a type before seeing the definition.
llvm-svn: 160339
|
| |
|
|
|
|
|
| |
* Treat compound assignment as a use, at Jordy's request.
* Always add compound assignments into the CFG, so we can correctly diagnose the use in 'return x += 1;'
llvm-svn: 160334
|
| |
|
|
|
|
| |
Found while investigating PR13330
llvm-svn: 160318
|
| |
|
|
|
|
|
|
| |
template.
Review by Richard Smith.
llvm-svn: 160306
|
| |
|
|
|
|
| |
CXXFunctionalCastExprs.
llvm-svn: 160252
|
| |
|
|
|
|
|
|
| |
as an array of its base class TemplateArgument. Switch the const
TemplateArgument* parameters of InstantiatingTemplate's constructors to
ArrayRef<TemplateArgument> to prevent this from happening again in the future.
llvm-svn: 160245
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct __attribute__((visibility("hidden"))) zed {
};
struct __attribute__((visibility("hidden"))) zed;
Which is a bit silly and got a lot noisier now that we correctly handle
visibility pragmas. This patch fixes that and also has some extra quality
improvements:
* We now produce an error instead of a warning for
struct __attribute__((visibility("hidden"))) zed {
};
struct __attribute__((visibility("default"))) zed;
* The "after definition" warning now points to the new attribute that is
ignored instead of pointing to the declaration.
llvm-svn: 160227
|
| |
|
|
| |
llvm-svn: 160226
|
| |
|
|
|
|
| |
Finishes rdar://11875995
llvm-svn: 160225
|
| |
|
|
|
|
| |
we might use the declaration to build a type before seeing the definition.
llvm-svn: 160176
|
| |
|
|
|
|
|
| |
to the same signature. Fix a bug in the type printer which would cause this
diagnostic to print wonderful types like 'const const int *'.
llvm-svn: 160161
|
| |
|
|
|
|
|
| |
canonical decl for the template, but that we were not merging attributes for
templates at all!
llvm-svn: 160157
|
| |
|
|
|
|
| |
declarations.
llvm-svn: 160156
|
| |
|
|
|
|
| |
pr13338.
llvm-svn: 160105
|
| |
|
|
|
|
| |
behavior and is the first step in fixing pr13338.
llvm-svn: 160104
|
| |
|
|
|
|
|
| |
Fixes PR13314, clang crashing on blocks refering to an enclosing local
when the enclosing function returns void.
llvm-svn: 160089
|
| |
|
|
|
|
|
| |
static_assert fails when parsing the template, don't diagnose it again on every
instantiation.
llvm-svn: 160088
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostics implemented -- see testcases.
I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file. But I don't feel strongly about it.
This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).
In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to. There is no easy way to find a decl by
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments. If we do --
then we do the usual comment-finding process.
It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.
Added -Wdocumentation-html flag for semantic HTML errors to allow the user to
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).
llvm-svn: 160078
|
| |
|
|
| |
llvm-svn: 160057
|
| |
|
|
|
|
|
| |
instantiation depends on the template, its arguments and parameters, but not
where it is instantiated.
llvm-svn: 160034
|