| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Naked functions don't have prologues or epilogues, so doing
codegen for anything other than inline assembly would be completely
hit or miss.
Differential Revision: http://reviews.llvm.org/D5183
llvm-svn: 217199
|
|
|
|
|
|
|
|
|
| |
before retrying the initialization to produce diagnostics. Otherwise, we may
fail to produce any diagnostics, and silently produce invalid AST in a -Asserts
build. Also add a note to this codepath to make it more clear why we were
trying to create a temporary.
llvm-svn: 217197
|
|
|
|
|
|
|
| |
merging of namespace aliases across modules and improves source fidelity.
Incidentally also fixes PR20816.
llvm-svn: 217103
|
|
|
|
|
|
| |
This bug was reported by UBSan.
llvm-svn: 217059
|
|
|
|
|
|
|
|
|
|
|
| |
In line with SemaOpenMP.cpp, etc. CUDA-specific semantic analysis code goes into
a separate file. This is in anticipation of adding extra functionality here in
the near future.
No change in functionality.
Review: http://reviews.llvm.org/D5160
llvm-svn: 217043
|
|
|
|
| |
llvm-svn: 216976
|
|
|
|
|
|
| |
Fixes PR20731.
llvm-svn: 216936
|
|
|
|
|
|
| |
const from some other StringRefs since its implicitly const already.
llvm-svn: 216825
|
|
|
|
|
|
| |
and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.
llvm-svn: 216824
|
|
|
|
|
|
| |
clause causes clang to crash.
llvm-svn: 216778
|
|
|
|
|
|
|
|
| |
in the super class, do not issue the warning about property
in current class's protocol will not be auto synthesized.
// rdar://18179833
llvm-svn: 216769
|
|
|
|
|
|
|
|
|
|
|
| |
Do not warn when property declared in class's protocol will be auto-synthesized
by its uper class implementation because super class has also declared this
property while this class has not. Continue to warn if current class
has declared the property also (because this declaration will not result
in a 2nd synthesis).
rdar://18152478
llvm-svn: 216753
|
|
|
|
|
|
| |
and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.
llvm-svn: 216710
|
|
|
|
|
|
| |
This bug was reported by UBSan.
llvm-svn: 216696
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D4368
llvm-svn: 216649
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
don't mark the field as initialized until the next initializer instead of
instantly. Since this checker is AST based, statements are processed in tree
order instead of following code flow. This can result in different warnings
from just reordering the code. Also changed to use one checker per constructor
instead of creating a new checker per field.
class T {
int x, y;
// Already warns
T(bool b) : x(!b ? (1 + y) : (y = 5)) {}
// New warning added here, previously (1 + y) comes after (y = 5) in the AST
// preventing the warning.
T(bool b) : x(b ? (y = 5) : (1 + y)) {}
};
llvm-svn: 216641
|
|
|
|
|
|
| |
scope when checking for conflicts.
llvm-svn: 216628
|
|
|
|
|
|
|
|
|
|
|
| |
Fix r216438 to catch more complicated self-initialized in std::move. For
instance, "Foo f = std::move(cond ? OtherFoo : (UNUSED_VALUE, f));"
Make sure that BinaryConditionalOperator, ConditionalOperator, BinaryOperator
with comma operator, and OpaqueValueExpr perform the correct usage forwarding
across the three uninitialized value checkers.
llvm-svn: 216627
|
|
|
|
|
|
|
|
|
|
|
|
| |
hasn't been used yet (PR20746)
This shouldn't really be allowed, but it comes up in real code (see PR). As
long as the decl hasn't been used there's no technical difficulty in supporting
it, so downgrade the error to a warning.
Differential Revision: http://reviews.llvm.org/D5087
llvm-svn: 216619
|
|
|
|
|
|
|
|
| |
In C++11, instantiation of exception specs is deferred. The instantiation is
done in MarkFunctionReferenced(), which wasn't called for non-OdrUsed functions,
which then caused an assert in codegen. Fixes PR19190, see the bug for details.
llvm-svn: 216562
|
|
|
|
|
|
|
|
|
|
| |
global pool in the course of method selection for
a messaging expression, select one with the most general
return type of 'id'. This is to remove type-mismatch
warning (which is useless) as result of random selection of
method with more restrictive return type. rdar://18095772
llvm-svn: 216560
|
|
|
|
|
|
|
|
|
|
|
| |
ACLE 2.0 allows __fp16 to be used as a function argument or return
type. This enables this for AArch64.
This also fixes an existing bug that causes clang to not allow
homogeneous floating-point aggregates with a base type of __fp16. This
is valid for AAPCS64, but not for AAPCS-VFP.
llvm-svn: 216558
|
|
|
|
|
|
| |
just letting them be implicitly created.
llvm-svn: 216528
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the no-arguments case. Don't expand this to an __attribute__((nonnull(A, B,
C))) attribute, since that does the wrong thing for function templates and
varargs functions.
In passing, fix a grammar error in the diagnostic, a crash if
__attribute__((nonnull(N))) is applied to a varargs function,
a bug where the same null argument could be diagnosed multiple
times if there were multiple nonnull attributes referring to it,
and a bug where nonnull attributes would not be accumulated correctly
across redeclarations.
llvm-svn: 216520
|
|
|
|
| |
llvm-svn: 216490
|
|
|
|
| |
llvm-svn: 216485
|
|
|
|
|
|
|
|
| |
feature is c11 about nested struct declarations must have
struct-declarator-list. Without this change, code
which was meant for c99 breaks. rdar://18125536
llvm-svn: 216469
|
|
|
|
| |
llvm-svn: 216452
|
|
|
|
| |
llvm-svn: 216438
|
|
|
|
|
|
|
| |
pattern of an alias template declaration. Use this to merge alias templates
properly when they're members of class template specializations.
llvm-svn: 216437
|
|
|
|
|
|
|
| |
implementation but not anywhere else.
rdar://16628028
llvm-svn: 216408
|
|
|
|
| |
llvm-svn: 216352
|
|
|
|
|
|
|
|
|
|
|
|
| |
__vector long is deprecated, but __vector long long is not. As a result, we
cannot check for __vector long (to issue the deprecation warning) as we parse
the type because we need to know how many 'long's we have first.
DeclSpec::Finish seems like a more-appropriate place to perform the check
(which places it with several other similar Altivec vector checks).
Fixes PR20720.
llvm-svn: 216342
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiation (PR20137)
We would previously assert (a decl cannot have two DLL attributes) on this code:
template <typename T> struct __declspec(dllimport) S { T f() { return T(); } };
template struct __declspec(dllexport) S<int>;
The problem was that when instantiating, we would take the attribute from the
template even if the instantiation itself already had an attribute.
Also, don't inherit DLL attributes from the template to its members before
instantiation, as the attribute may change.
I couldn't figure out what MinGW does here, so I'm leaving that open. At least
we're not asserting anymore.
llvm-svn: 216340
|
|
|
|
| |
llvm-svn: 216333
|
|
|
|
|
|
| |
The same dyn_cast was done earlier in the function. No functionality change.
llvm-svn: 216326
|
|
|
|
|
|
|
| |
We would accidently initialize unnamed bitfields instead of the
following field.
llvm-svn: 216313
|
|
|
|
|
|
|
|
|
|
|
| |
declared, rather than putting them into the template parameter scope. We
previously had *no record* in the scope for class template declarations, once
those declarations completed and their template parameter scopes were popped.
This in turn caused us to be unable to merge class template declarations that
were declared in the global scope (where we use scope lookup rather than
DeclContext lookup for merging), when loading a module.
llvm-svn: 216311
|
|
|
|
|
|
|
| |
The code used getLocStart() instead of getLocEnd(). This works for single
token expressions, but breaks if the expression is longer.
llvm-svn: 216306
|
|
|
|
|
|
|
|
| |
type encoding because in certain cases, such as for vector
types, because we still haven't designed encoding for them.
rdar://9255564
llvm-svn: 216301
|
|
|
|
|
|
|
| |
+initialize is called on 'super' in its implementation.
rdar://16628028
llvm-svn: 216282
|
|
|
|
|
|
|
| |
to +initilize as this results in an extra call
to this method. rdar://16628028
llvm-svn: 216271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable that has regiser constraint "r" is not 64-bit.
General register operands are output using 64-bit "x" register names, regardless
of the size of the variable, unless the asm operand is prefixed with the "%w"
modifier. This surprises and confuses many users who aren't familiar with
aarch64 inline assembly rules.
With this commit, a note and fixit hint are printed which tell the users that
they need modifier "%w" in order to output a "w" register instead of an "x"
register.
<rdar://problem/12764785>
llvm-svn: 216260
|
|
|
|
|
|
| |
dyn_cast -> dyn_cast_or_null to handle a null pointer.
llvm-svn: 216254
|
|
|
|
|
|
| |
its syntactic form before re-analyzing it during template instantiation.
llvm-svn: 216224
|
|
|
|
|
|
|
| |
and checking on availability of method declaration
instead of crashing. // rdar://18059669
llvm-svn: 216191
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(PR20163)
Normally we mark all members of exported classes referenced to get them emitted.
However, MSVC doesn't do this for class templates that are implicitly specialized or
just have an explicit instantiation declaration. For such specializations, the members
are emitted when referenced.
The exception is the case when the dllexport attribute is propagated from a base class
to a base class template that doesn't have an explicit attribute: in this case all
methods of the base class template do get instantiated.
llvm-svn: 216145
|
|
|
|
|
|
| |
class method to an object receiver. rdar://16263395
llvm-svn: 216038
|
|
|
|
|
|
| |
Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording.
llvm-svn: 215982
|
|
|
|
|
|
| |
needing to mention the size.
llvm-svn: 215869
|