| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes PR20671, see the bug for details. In short, ActOnTranslationUnit()
calls DefineUsedVTables() and only then PerformPendingInstantiations(). But
PerformPendingInstantiations() is what does delayed template parsing, so
vtables only references from late-parsed templates weren't marked used.
As a fix, move the SavePendingInstantiationsAndVTableUsesRAII in
PerformPendingInstantiations() up above the delayed template parsing code.
That way, vtables referenced from templates end up in the RAII object, and the
call to DefineUsedVTables() in PerformPendingInstantiations() marks them used.
llvm-svn: 215786
|
|
|
|
|
|
| |
behavior change.
llvm-svn: 215780
|
|
|
|
|
|
|
| |
user provided setter name (as declared in @property attribute declaration).
rdar://18022762
llvm-svn: 215736
|
|
|
|
| |
llvm-svn: 215706
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, any undeclared unqualified id starting a nested name
specifier in a dependent context would have its lookup retried during
template instantiation. Now we limit that retry hack to methods of a
class with dependent bases. Free function templates in particular are
no longer affected by this hack.
Also, diagnose this as a Microsoft extension. This has the downside that
template authors may see this warning *and* an error during
instantiation time about this identifier. Fixing that will probably
require formalizing some kind of "delayed" identifier, instead of our
ad-hoc solutions of forming dependent AST nodes when lookup fails.
Based on a patch by Kim Gräsman!
Differential Revision: http://reviews.llvm.org/D4854
llvm-svn: 215683
|
|
|
|
|
|
| |
additional notes that are helpful when compiling statistics on thread safety warnings.
llvm-svn: 215677
|
|
|
|
|
|
| |
This fixes a regression I caused back in r211766.
llvm-svn: 215609
|
|
|
|
|
|
| |
found in global pool as well. rdar://16808765
llvm-svn: 215603
|
|
|
|
|
|
| |
// rdar://16808765
llvm-svn: 215581
|
|
|
|
|
|
|
| |
expression to the best method found in global method pools.
This is wip. // rdar://16808765
llvm-svn: 215577
|
|
|
|
| |
llvm-svn: 215569
|
|
|
|
| |
llvm-svn: 215568
|
|
|
|
|
|
| |
Modifications made by clang-tidy with minor tweaks.
llvm-svn: 215557
|
|
|
|
|
|
|
|
|
| |
a messaging expression except in the simple case
of a unary selector. We cannot reliably provide such a fixit due
to numerous reasons where a matching selector could not be found.
rdar://15756038
llvm-svn: 215480
|
|
|
|
|
|
| |
constructors.
llvm-svn: 215471
|
|
|
|
|
|
|
|
| |
pointer.
Patch by Grant Paul!
llvm-svn: 215453
|
|
|
|
|
|
|
|
|
|
|
| |
it. Diagnose with recovery if it appears after a function parameter that was
obviously supposed to be a parameter pack. Otherwise, warn if it immediately
follows a function parameter pack, because the user most likely didn't intend
to write a parameter pack followed by a C-style varargs ellipsis.
This warning can be syntactically disabled by using ", ..." instead of "...".
llvm-svn: 215408
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang used a custom implementation of lookup when handling designated
initializers. The custom code was not particularly optimized and relied
on standard lookup for typo-correction anyway.
This custom code has to go, it doesn't properly support MSVC-style
anonymous structs embedded inside other records; replace it with the
typo-correction path.
This has the side effect of speeding up semantic handling of the fields
for a designated initializer while simplifying the code at the same
time.
This fixes PR20573.
Differential Revision: http://reviews.llvm.org/D4839
llvm-svn: 215372
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had two bugs:
- We wouldn't properly warn when a struct/union/enum was mentioned
inside of a record definition if no declarator was provided. We
should have mentioned that this declaration declares nothing.
- We didn't properly support Microsoft's extension where certain
declspecs without declarators would act as anonymous structs/unions.
* We completely ignored the case where such a declspec could be a
union.
* We didn't properly handle the case where a record was defined inside
another record:
struct X {
int a;
struct Y {
int b;
};
};
llvm-svn: 215347
|
|
|
|
|
|
|
|
|
| |
one, perform the import if the types match even if the imported declaration is
hidden. Otherwise, NamedDecl::declarationReplaces will drop one of the name
lookup entries, making the typedef effectively inaccessible from one of the
modules that declared it.
llvm-svn: 215306
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macro arguments.
Previously, these warnings skipped any code in a macro expansion. Preform an
additional check and warn when the expression and context locations are both
in the macro argument.
The most obvious case not caught is passing a pointer directly to a macro,
i.e 'assert(&array)' but 'assert(&array && "valid array")' is caught. This is
because macro arguments are not typed and the conversion happens inside the
macro.
llvm-svn: 215251
|
|
|
|
|
|
|
| |
use mis-cased property name (which is currently accepted silently
due to the way property setters are named). rdar://17911746
llvm-svn: 215250
|
|
|
|
|
|
| |
rdar://17554063
llvm-svn: 215235
|
|
|
|
|
|
|
| |
for building Objective-C array literals in ARC
mode. rdar://17554063
llvm-svn: 215232
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, assigning an inheritance model to a derived class would
trigger further assiginments to the various bases of the class. This
was done to fix a bug where we couldn't handle an implicit
base-to-derived conversion for pointers-to-members when the conversion
was ambiguous at an earlier point.
However, this is not how the MS scheme works. Instead, assign
inheritance models to *just* the class which owns to declaration we
ended up referencing.
N.B. This result is surprising in many ways. It means that it is
possible for a base to have a "larger" inheritance model than it's
derived classes. It also means that bases in the conversion path do not
get assigned a model.
struct A { void f(); void f(int); };
struct B : A {};
struct C : B {};
void f() { void (C::*x)() = &A::f; }
We can only begin to assign an inheritance model *after* we've seen the
address-of but *before* we've done the implicit conversion the more
derived pointer-to-member type. After that point, both 'A' and 'C' will
have an inheritance model but 'B' will not. Surprising, right?
llvm-svn: 215174
|
|
|
|
|
|
|
|
|
| |
MSVC doesn't decide what the inheritance model for a returned member
pointer *until* a call expression returns it.
This fixes PR20017.
llvm-svn: 215164
|
|
|
|
|
|
|
| |
to use non-retain/autorelease API variants of ObjC objects. wip.
rdar://17554063
llvm-svn: 215146
|
|
|
|
|
|
|
| |
question mark instead of the context of the conditional operator. The
condition does not need the context of the conditional operator at all.
llvm-svn: 215048
|
|
|
|
|
|
| |
new APIs for literals. nfc. wip. rdar://17554063
llvm-svn: 215043
|
|
|
|
|
|
| |
new APIs for literals. nfc. wip. rdar://17554063
llvm-svn: 214993
|
|
|
|
|
|
|
| |
for Objective-C's array and dictionary literals.
rdar://17554063. This is wip.
llvm-svn: 214983
|
|
|
|
|
|
|
| |
a mutex is acquired, but corresponding mutex is not provably not-held. This
is based on the earlier negative requirements patch.
llvm-svn: 214789
|
|
|
|
|
|
|
|
|
|
| |
This matches MSVC's logic, which seems to be that when the friend
declaration is qualified, it cannot be a declaration of a new symbol
and so the dll linkage doesn't change.
Differential Revision: http://reviews.llvm.org/D4764
llvm-svn: 214774
|
|
|
|
| |
llvm-svn: 214735
|
|
|
|
|
|
|
|
|
|
| |
This is a regression from clang 3.4
Set the result to ExprError and returns true, rather than simply
returns false because errors have been reported already and returning
false show a confusing error
llvm-svn: 214734
|
|
|
|
|
|
| |
to an invalid function parameter type.
llvm-svn: 214723
|
|
|
|
|
|
| |
refers to an invalid function parameter type.
llvm-svn: 214722
|
|
|
|
|
|
|
| |
poorly-worded warning for a case value that is not a possible value of the
switched-on expression.
llvm-svn: 214678
|
|
|
|
| |
llvm-svn: 214526
|
|
|
|
|
|
| |
ObjCMethod::getReturnTypeSourceRange. No functional changes intended.
llvm-svn: 214511
|
|
|
|
|
|
| |
highlights the attribute and the faulty nonpointer type when possible.
llvm-svn: 214507
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a function has a resolved exception specification, then all declarations of
the function do.
We should probably improve the AST representation to make this implicit (perhaps
only store the exception specification on the canonical declaration), but this
fixes things for now.
The testcase for this (which used to assert) also exposes the actual bug I was
trying to reduce here: we sometimes fail to emit the body of an imported
special member function definition. Fix for that to follow.
llvm-svn: 214458
|
|
|
|
|
|
|
|
| |
FunctionProtoType::ExtProtoInfo. Most of the users of these fields don't care
about the other ExtProtoInfo bits and just want to talk about the exception
specification.
llvm-svn: 214450
|
|
|
|
|
|
| |
attributes on the same declaration. This removes a FIXME from the code.
llvm-svn: 214436
|
|
|
|
|
|
|
|
|
|
| |
This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler.
Resubmit with changes to try to fix the build-bot issue.
Reviewed by Aaron Ballman
llvm-svn: 214432
|
|
|
|
|
|
| |
they don't specify the attribute
llvm-svn: 214425
|
|
|
|
| |
llvm-svn: 214411
|
|
|
|
|
|
|
| |
when arguments are structures or classes. PR16392.
patch by Karlis Senko
llvm-svn: 214409
|
|
|
|
|
|
|
| |
In C, it is only known after merging decls if a function with 0 arguments has
a prototype. Fixes PR20386, see that for more notes.
llvm-svn: 214408
|
|
|
|
|
|
|
|
| |
or optional arguments present. With this, the only time you should have to manually check attribute argument counts is when HasCustomParsing is set to true, or when you have variadic arguments that aren't really variadic (like ownership_holds and friends).
Updating the diagnostics in the launch_bounds test since they have been improved in that case. Adding a test for nonnull since it has little test coverage, but has truly variadic arguments.
llvm-svn: 214407
|