| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
-Wunused-private-field.
llvm-svn: 158411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
llvm-svn: 158104
|
|
|
|
| |
llvm-svn: 157886
|
|
|
|
|
|
|
| |
have correct pointer type or issue error,
instead of crashing in IRGen. // rdar:// 11569860
llvm-svn: 157780
|
|
|
|
|
|
| |
to the declaration in this patch. // rdar://10893232
llvm-svn: 157537
|
|
|
|
|
|
|
|
| |
Portions of this patch by Xi Wang. Reviewed by Jordy Rose. Thank you both.
Codegen support will follow soon.
llvm-svn: 157360
|
|
|
|
|
|
|
|
|
| |
on the RecordDecl. Persist the MS portability type attributes and
ignore them in Sema rather than the parser.
Patch by João Matos!
llvm-svn: 157288
|
|
|
|
| |
llvm-svn: 156916
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 156914
|
|
|
|
|
|
|
|
|
| |
if (Inherited)
Attr->setInherited(true);
To a central location.
llvm-svn: 156728
|
|
|
|
| |
llvm-svn: 156727
|
|
|
|
|
|
|
|
| |
Currently cold functions are marked with the "optsize" attribute in CodeGen
so they are always optimized for size. The hot attribute is just ignored,
LLVM doesn't have a way to express hotness at the moment.
llvm-svn: 156723
|
|
|
|
| |
llvm-svn: 156715
|
|
|
|
|
|
|
| |
attribute, rather than requiring multiple cases in consumers of this
information.
llvm-svn: 156666
|
|
|
|
|
|
|
|
| |
__attribute__((aligned)). Fixes <rdar://problem/11435441>, a
regression I introduced in r156003. This is the narrow fix; a more
comprehensive fix is coming.
llvm-svn: 156657
|
|
|
|
| |
llvm-svn: 156597
|
|
|
|
| |
llvm-svn: 156534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
// FIXME: This needs to happen before we merge declarations. Then,
// let attribute merging cope with attribute conflicts.
This was already being done for variables, but for functions we were merging
then first and then applying the attributes. To avoid duplicating merging
logic, some of the helpers in SemaDeclAttr.cpp become methods that can
handle merging two attributes in one decl or inheriting attributes from one
decl to another.
With this change we are now able to produce errors for variables with
incompatible visibility attributes or warn about unused dllimports in
variables.
This changes the attribute list iteration back to being in reverse source
code order, as that matches what decl merging does and avoids differentiating
the two cases is the merge*Attr methods.
llvm-svn: 156531
|
|
|
|
|
|
| |
Includes a real potential initialization problem.
llvm-svn: 156363
|
|
|
|
| |
llvm-svn: 156348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
match gcc behavior for two conflicting visibilities in the same decl. It also
makes handling of dllimport/dllexport more natural.
As a bonus we now warn on the dllimport in
void __attribute__((dllimport)) foo13();
void __attribute__((dllexport)) foo13();
as does gcc.
llvm-svn: 156343
|
|
|
|
|
|
|
|
|
|
| |
so that we actually accumulate all the delayed diagnostics. Do
this so that we can restore those diagnostics to good standing
if it turns out that we were wrong to suppress, e.g. if the
tag specifier is actually an elaborated type specifier and not
a declaration.
llvm-svn: 156291
|
|
|
|
|
|
|
| |
separate pools owned by the RAII objects that keep pushing
decl state. This gives us quite a bit more flexibility.
llvm-svn: 156289
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for having a uniform logic for adding attributes to a decl. This in turn
is needed to fix the FIXME:
// FIXME: This needs to happen before we merge declarations. Then,
// let attribute merging cope with attribute conflicts.
ProcessDeclAttributes(S, NewFD, D,
/*NonInheritable=*/false, /*Inheritable=*/true);
The idea is that mergeAvailabilityAttr will become a method. Once attributes
are processed before merging, it will be called from handleAvailabilityAttr to
handle multiple attributes in one decl:
void f(int) __attribute__((availability(ios,deprecated=3.0),
availability(ios,introduced=2.0)));
and from SemaDecl.cpp to handle multiple decls:
void f(int) __attribute__((availability(ios,deprecated=3.0)));
void f(int) __attribute__((availability(ios,introduced=2.0)));
As a bonus, use the new structure to diagnose incompatible availability
attributes added to different decls (see included testcases).
llvm-svn: 156269
|
|
|
|
|
|
|
|
| |
Sema::ConvertToIntegralOrEnumerationType() from PartialDiagnostics to
abstract "diagnoser" classes. Not much of a win here, but we're
-several PartialDiagnostics.
llvm-svn: 156217
|
|
|
|
| |
llvm-svn: 156175
|
|
|
|
|
|
| |
expressions.
llvm-svn: 156030
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
walk
them, otherwise we cannot produce an error for both
struct HIDDEN test4; // canonical
struct test4;
struct DEFAULT test4;
and
struct test5; // canonical
struct HIDDEN test5;
struct DEFAULT test5;
llvm-svn: 156016
|
|
|
|
| |
llvm-svn: 156005
|
|
|
|
|
|
| |
decls to work on function templates specializations.
llvm-svn: 155943
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.
This change errs on the side of value, making op-> return T* and op* return
T&.
(reviewed by Richard Smith)
llvm-svn: 155808
|
|
|
|
|
|
|
|
|
| |
struct __attribute__((visibility("hidden"))) a;
struct __attribute__((visibility("default"))) b;
which gcc already rejects.
llvm-svn: 155603
|
|
|
|
|
|
| |
location. // rdar://10893232
llvm-svn: 155385
|
|
|
|
|
|
| |
on smart pointers. Also adds test case for previous commit.
llvm-svn: 155379
|
|
|
|
|
|
| |
existentially quantified lock expressions.
llvm-svn: 155357
|
|
|
|
| |
llvm-svn: 155290
|
|
|
|
|
|
|
|
| |
objc_returns_inner_pointer attribute can be applied to
methods only. Diagnsose otherwise, instead of
crashing. // rdar://11253688
llvm-svn: 155245
|
|
|
|
|
|
|
|
|
|
| |
which are checked in the parser, and analysis warnings that require the
full analysis. This allows attribute syntax to be checked independently
of the full thread safety analysis. Also introduces a new warning for the
case where a string is used as a lock expression; this allows the analysis
to gracefully handle expressions that would otherwise cause a parse error.
llvm-svn: 155129
|
|
|
|
|
|
| |
to a lockable type from error to warning.
llvm-svn: 154198
|
|
|
|
|
|
|
|
|
| |
root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>
llvm-svn: 154187
|
|
|
|
| |
llvm-svn: 152725
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.
A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.
Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.
Reviewed by Delesley Hutchins.
llvm-svn: 152169
|
|
|
|
|
|
|
| |
issue the note if it is because message is sent to a forward class
declaration in delayed diagnostic. // rdar://10290322
llvm-svn: 151942
|
|
|
|
|
|
| |
__attribute__((NSObject)) on a property declaration. This is needed to have retain properties for non-object pointers. Fixes <rdar://problem/10930507>.
llvm-svn: 151786
|
|
|
|
|
|
| |
MS compatibility mode.
llvm-svn: 151295
|
|
|
|
| |
llvm-svn: 151225
|
|
|
|
| |
llvm-svn: 150702
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value of class type, look for a unique conversion operator converting to
integral or unscoped enumeration type and use that. Implements [expr.const]p5.
Sema::VerifyIntegerConstantExpression now performs the conversion and returns
the converted result. Some important callers of Expr::isIntegralConstantExpr
have been switched over to using it (including all of those required for C++11
conformance); this switch brings a side-benefit of improved diagnostics and, in
several cases, simpler code. However, some language extensions and attributes
have not been moved across and will not perform implicit conversions on
constant expressions of literal class type where an ICE is required.
In passing, fix static_assert to perform a contextual conversion to bool on its
argument.
llvm-svn: 149776
|
|
|
|
|
|
| |
additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch.
llvm-svn: 149586
|