| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 184629
|
|
|
|
|
|
|
|
|
|
|
|
| |
to provide proper overloading, and also prevents mangling conflicts with
template arguments of protocol-qualified type.
This is a non-backward-compatible mangling change, but per discussion with
John, the benefits outweigh this cost.
Fixes <rdar://problem/14074822>.
llvm-svn: 184250
|
|
|
|
|
|
|
|
|
|
| |
by ensuring DiagnoseUseOfDecl is called both on the found decl and the
decl being used (i.e the specialization in the case of member templates) whenever they are different.
Per the exchange captured in
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130610/081636.html
a more comprehensive fix that allows both decls to be passed into DiagnoseUseOfDecl is (or should be) forthcoming relatively soon.
llvm-svn: 184043
|
|
|
|
|
|
| |
fix a two-phase lookup issue. That's not permitted.
llvm-svn: 183874
|
|
|
|
| |
llvm-svn: 183639
|
|
|
|
| |
llvm-svn: 183637
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
common function. The C++1y contextual implicit conversion rules themselves are
not yet implemented, however.
This also fixes a subtle bug where template instantiation context notes were
dropped for diagnostics coming from conversions for integral constant
expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a
DiagnosticBuilder when producing these diagnostics, and losing their context
notes in the process.
llvm-svn: 182406
|
|
|
|
|
|
| |
and misclassify it as a complex-real conversion.
llvm-svn: 181626
|
|
|
|
| |
llvm-svn: 181562
|
|
|
|
|
|
| |
Patch by Robert Wilhelm.
llvm-svn: 181544
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- References to ObjC bit-field ivars are bit-field lvalues;
fixes rdar://13794269, which got me started down this.
- Introduce Expr::refersToBitField, switch a couple users to
it where semantically important, and comment the difference
between this and the existing API.
- Discourage Expr::getBitField by making it a bit longer and
less general-sounding.
- Lock down on const_casts of bit-field gl-values until we
hear back from the committee as to whether they're allowed.
llvm-svn: 181252
|
|
|
|
| |
llvm-svn: 181166
|
|
|
|
| |
llvm-svn: 181158
|
|
|
|
|
|
|
|
| |
constructor from None
Patch by Robert Wilhelm.
llvm-svn: 181139
|
|
|
|
|
|
|
| |
Missing (somewhat ironically) is support for the new deduction rules
in lambda functions, plus PCH support for return type patching.
llvm-svn: 181108
|
|
|
|
|
|
|
|
|
| |
to use. This makes very little difference right now (other than suppressing
follow-on errors in some cases), but will matter more once we support deduced
return types (we don't want expressions with undeduced return types in the
AST).
llvm-svn: 181107
|
|
|
|
|
|
| |
Patch by Robert Wilhelm!
llvm-svn: 180724
|
|
|
|
|
|
| |
a trailing return type in that class's body.
llvm-svn: 179941
|
|
|
|
|
|
| |
templates, from Alexander Zinenko!
llvm-svn: 179680
|
|
|
|
|
|
|
|
| |
It was being used correctly, but it is a very dangerous API to have around.
Instead, move the logic from the filtering to when we are deciding if we should
link two decls.
llvm-svn: 179523
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have integral values.
We were assuming that any expression used as a converted constant
expression would either not have a folded constant value or would be
an integer, which is not the case for some ill-formed constant
expressions. Because converted constant expressions are only used
where integral values are expected, we can simply treat this as an
error path. If that ever changes, we'll need to widen the interface of
Sema::CheckConvertedConstantExpression() anyway.
llvm-svn: 179068
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When two template decls with the same name are used in this diagnostic,
force them to print their qualified names. This changes the bad message of:
candidate template ignored: could not match 'array' against 'array'
to the better message of:
candidate template ignored: could not match 'NS2::array' against 'NS1::array'
llvm-svn: 179056
|
|
|
|
|
|
| |
declaration. Patch by Stephen Lin!
llvm-svn: 178698
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
returns consistent results with invalid types.
When Sema::RequireCompleteType() is given a class template
specialization type that then fails to instantiate, it returns
'true'. On subsequent invocations, it can return false. Make sure that
this difference doesn't change the result of
Sema::CompareReferenceRelationship, which is expected to remain stable
while we're checking an initialization sequence.
llvm-svn: 178088
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch we would compute the linkage lazily and cache it. When the
AST was modified in ways that could change the value, we would invalidate the
cache.
That was fairly brittle, since any code could ask for the a linkage before
the correct value was available.
We should change the API to one where the linkage is computed explicitly and
trying to get it when it is not available asserts.
This patch is a first step in that direction. We still compute the linkage
lazily, but instead of invalidating a cache, we assert that the AST
modifications didn't change the result.
llvm-svn: 176999
|
|
|
|
|
|
|
|
|
|
|
|
| |
This would error in C++ mode unless the variable also had a cv
qualifier.
e.g.
__attribute__((address_space(2))) float foo = 1.0f; would error but
__attribute__((address_space(2))) const float foo = 1.0f; would not.
llvm-svn: 176121
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Weather we should give C language linkage to functions and variables with
internal linkage probably depends on how much code assumes it. The standard
says they should have no language linkage, but gcc and msvc assign them
C language linkage.
This commit removes the hack that was preventing the mangling on static
functions declare in extern C contexts. It is an experiment to see if we
can implement the rules in the standard.
If it turns out that many users depend on these functions and variables
having C language linkage, we should change isExternC instead and try
to convince the CWG to change the standard.
llvm-svn: 175937
|
|
|
|
|
|
|
| |
static functions in extern "C" contexts are mangled. Should fix the
bootstrap.
llvm-svn: 175132
|
|
|
|
|
|
|
|
|
|
| |
I added hasCLanguageLinkage while fixing some language linkage bugs some
time ago so that I wouldn't have to check all users of isExternC. It turned
out to be a much longer detour than expected, but this patch finally
merges the two again. The isExternC function now implements just the
standard notion of having C language linkage.
llvm-svn: 175119
|
|
|
|
|
|
|
|
|
|
|
|
| |
MarkMemberReferenced instead of marking functions referenced directly. An audit
of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few
other changes:
* don't mark functions odr-used when considering them for an initialization
sequence. Do mark them referenced though.
* the function nominated by the cleanup attribute should be diagnosed.
* operator new/delete should be diagnosed when building a 'new' expression.
llvm-svn: 174951
|
|
|
|
|
|
| |
OpenCL builtin functions.
llvm-svn: 174630
|
|
|
|
|
|
| |
restrictions.
llvm-svn: 174601
|
|
|
|
|
|
| |
operators.
llvm-svn: 174584
|
|
|
|
|
|
|
|
| |
have a direct mismatch between some component of the template and some
component of the argument. The diagnostic now says what the mismatch was, but
doesn't yet say which part of the template doesn't match.
llvm-svn: 174039
|
|
|
|
|
|
| |
in the one case where we've already factored out a reason code.
llvm-svn: 174036
|
|
|
|
|
|
| |
object argument type for a member call.
llvm-svn: 173554
|
|
|
|
|
|
| |
overloaded binary operators.
llvm-svn: 173315
|
|
|
|
|
|
| |
functionality change!
llvm-svn: 173314
|
|
|
|
|
|
|
|
| |
operations (as opposed to storage only half/fp16).
Also add some semantic checks for OpenCL half types.
llvm-svn: 173254
|
|
|
|
|
|
|
| |
on redeclarations, since that makes us pick wrong prior declarations under
some circumstances.
llvm-svn: 172384
|
|
|
|
|
|
| |
we know whether it is static.
llvm-svn: 172376
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
| |
Thanks Eli Friedman for noticing it.
llvm-svn: 172292
|
|
|
|
| |
llvm-svn: 171367
|
|
|
|
|
|
|
|
| |
This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods
so that they can be used from SemaOverload.cpp and then fixes the logic
in Sema::IsOverload.
llvm-svn: 171193
|
|
|
|
|
|
| |
function is selected by overload resolution.
llvm-svn: 171190
|
|
|
|
|
|
| |
it might instead be a TranslationUnitDecl.
llvm-svn: 170976
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
per review discussion in r170365
This does limit these typedefs to being sequences, but no current usage
requires them to be contiguous (we could expand this to a more general
iterator pair range concept at some point).
Also, it'd be nice if SmallVector were constructible directly from an ArrayRef
but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the
inverse conversion. (& generalizing over all range-like things, while nice,
would require some nontrivial SFINAE I haven't thought about yet)
llvm-svn: 170482
|
|
|
|
|
|
|
|
|
|
| |
array from a braced-init-list. There seems to be a core wording wart
here (it suggests we should be testing whether the elements of the init
list are implicitly convertible to the array element type, not whether
there is an implicit conversion sequence) but our prior behavior appears
to be a bug, not a deliberate effort to implement the standard as written.
llvm-svn: 169690
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|