| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 159925
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* When substituting a reference to a non-type template parameter pack where the
corresponding argument is a pack expansion, transform into an expression
which contains an unexpanded parameter pack rather than into an expression
which contains a pack expansion. This causes the SubstNonTypeTemplateParmExpr
to be inside the PackExpansionExpr, rather than outside, so the expression
still looks like a pack expansion and can be deduced.
* Teach MarkUsedTemplateParameters that we can deduce a reference to a template
parameter if it's wrapped in a SubstNonTypeTemplateParmExpr (such nodes are
added during alias template substitution).
llvm-svn: 159922
|
|
|
|
|
|
| |
against the upper/lower values.
llvm-svn: 159911
|
|
|
|
|
|
|
|
| |
expression, skip over any SubstNonTypeTemplateParmExprs which alias templates
may have inserted before checking for a DeclRefExpr referring to a non-type
template parameter declaration.
llvm-svn: 159909
|
|
|
|
|
|
| |
as "auto (*f)(T t)".
llvm-svn: 159908
|
|
|
|
|
|
|
|
| |
-ftemplate-depth limit. There are various ways to get an infinite (or merely
huge) stack of substitutions with no intervening instantiations. This is also
consistent with gcc's behavior.
llvm-svn: 159907
|
|
|
|
|
|
| |
misreduction of PR13290.
llvm-svn: 159905
|
|
|
|
|
|
|
| |
initializer list. Patch by Olivier Goffart, with extra testcases by Meador Inge
and Daniel Lunow.
llvm-svn: 159896
|
|
|
|
|
|
|
|
|
|
| |
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.
llvm-svn: 159895
|
|
|
|
|
|
|
| |
a 'weak' property just as we do the same for
'weak' variables. // rdar://11814185
llvm-svn: 159859
|
|
|
|
|
|
| |
over objective-c container collection. // rdar://9293227
llvm-svn: 159847
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.
Comments AST is modelled along the ideas of HTML AST: block and inline content.
* Block content is a paragraph or a command that has a paragraph as an argument
or verbatim command.
* Inline content is placed within some block. Inline content includes plain
text, inline commands and HTML as tag soup.
llvm-svn: 159790
|
|
|
|
|
|
|
|
| |
under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793
llvm-svn: 159784
|
|
|
|
|
|
|
|
|
|
|
| |
actually perform value initialization rather than trying to fake it with a call
to the default constructor. Fixes various bugs related to the previously-missing
zero-initialization in this case.
I've also moved this and the other list initialization 'special case' from
TryConstructorInitialization into TryListInitialization where they belong.
llvm-svn: 159733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.
ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h
Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.
llvm-svn: 159718
|
|
|
|
|
|
| |
Move the ASTContext-dependent version out of line.
llvm-svn: 159717
|
|
|
|
| |
llvm-svn: 159706
|
|
|
|
|
|
|
| |
objective-c's fast enumeration statement,
for more work to come.
llvm-svn: 159689
|
|
|
|
|
|
|
|
| |
consistency a bit.
(cf -Wunused-private-field and several other existing -field diagnostics.)
llvm-svn: 159633
|
|
|
|
|
|
|
|
|
|
|
| |
initializer.
I really feel like Clang should warn about this, but I can't describe
a good reason. GCC will warn on this in some cases under
-Wsequence-point, but it actually seems like a false positive for that
warning....
llvm-svn: 159631
|
|
|
|
|
|
|
|
| |
c-functions declared in implementation should have their
parsing delayed until the end so, they can access forward
declared private methods. // rdar://10387088
llvm-svn: 159626
|
|
|
|
|
|
| |
locks_required function.
llvm-svn: 159607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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++.) Thus, when a
block's return type is inferred from an enum constant, it is incompatible
with expressions that return the enum type.
In r158899, I told block returns to pretend that enum constants have enum
type, like in C++. Doug Gregor pointed out that this can break existing code.
Now, we don't check the types of return statements until the end of the block.
This lets us go back and add implicit casts in blocks with mixed enum
constants and enum-typed expressions.
<rdar://problem/11662489> (again)
llvm-svn: 159591
|
|
|
|
|
|
|
|
|
| |
template instantiation. I wasn't able to reproduce this down to
anything small enough to put in our test suite, but it's "obviously"
okay to set the invalid bit earlier and precludes a
known-broken-but-not-marked-broken class from being used elsewhere.
llvm-svn: 159584
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attached to a declaration in the completion string.
Since extracting comments isn't free, a new code completion option is
introduced.
A new code completion option that enables including brief comments
into CodeCompletionString should be a, err, code completion option.
But because ASTUnit caches global declarations during parsing before
even completion consumer is created, the option is duplicated as a
translation unit option (in both libclang and ASTUnit, like the option
to cache code completion results).
llvm-svn: 159539
|
|
|
|
|
|
|
| |
This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.
llvm-svn: 159494
|
|
|
|
|
|
| |
keywords when doing type correction.
llvm-svn: 159464
|
|
|
|
|
|
| |
initialized with the next to last element to silence the warning.
llvm-svn: 159458
|
|
|
|
|
|
| |
but apparently I did not.
llvm-svn: 159452
|
|
|
|
|
|
| |
to produce quotes instead of adding qoute to the test.
llvm-svn: 159450
|
|
|
|
|
|
| |
Reviewed by Doug Gregor.
llvm-svn: 159442
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 159436
|
|
|
|
|
|
|
| |
value-dependent expression, don't complain that it wasn't the constant
we wanted. Fixes <rdar://problem/11688587> and PR11074.
llvm-svn: 159404
|
|
|
|
|
|
|
| |
type traits that assignment to/construction of a lifetime-qualified
object under ARC is *not* trivial. Fixes <rdar://problem/11738725>.
llvm-svn: 159401
|
|
|
|
| |
llvm-svn: 159394
|
|
|
|
|
|
| |
Previously this caused a crash, since protocols are not interfaces.
llvm-svn: 159357
|
|
|
|
|
|
|
| |
property retains a block object as it could be on
the stack. // rdar://11761511
llvm-svn: 159293
|
|
|
|
| |
llvm-svn: 159292
|
|
|
|
|
|
| |
before, so we don't incorrectly think arguments of function type are non-POD.
llvm-svn: 159290
|
|
|
|
|
|
|
| |
when it appears to be unused and occurs in a header.
// rdar://11202617
llvm-svn: 159282
|
|
|
|
|
|
| |
being updated. Will fix that in a second.
llvm-svn: 159280
|
|
|
|
| |
llvm-svn: 159279
|
|
|
|
| |
llvm-svn: 159229
|
|
|
|
|
|
|
|
| |
to see if we had an underlying final class or method, but we would then
use the cast type to do the call, resulting in a direct call to the wrong
method.
llvm-svn: 159212
|
|
|
|
| |
llvm-svn: 159171
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around a quirk in the way that explicit template specializations are
handled in Clang. We generate an implicit declaration from the original
template which the explicit specialization is considered to redeclare. This
trips up the explicit delete logic.
This change only works around that strange representation. At some point it'd
be nice to remove those extra declarations to make the AST more accurately
reflect the C++ semantics.
Review by Doug Gregor.
llvm-svn: 159167
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
for non-type template parameters in microsoft mode.
PR12709.
llvm-svn: 159147
|
|
|
|
|
|
| |
id <Protocol>. // rdar://11618852
llvm-svn: 159084
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|