| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
C++11 rules.
llvm-svn: 149641
|
|
|
|
| |
llvm-svn: 149610
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Actually building the var -> capture mapping properly (there was an off-by-one error)
- Keeping track of the source location of each capture
- Minor QoI improvements, e.g, highlighing the prior capture if
there are multiple captures, pointing at the variable declaration we
found if we reject it.
As part of this, add standard citations for the various semantic
checks we perform, and note where we're not performing those checks as
we should.
llvm-svn: 149462
|
|
|
|
| |
llvm-svn: 149451
|
|
|
|
| |
llvm-svn: 149127
|
|
|
|
|
|
| |
expressions and block literals. As it turns out, almost all the logic can be shared.
llvm-svn: 149031
|
|
|
|
|
|
|
|
| |
Pass a typo correction callback object from ParseCastExpr to
Sema::ActOnIdExpression to be a bit more selective about what kinds of
corrections will be allowed for unknown identifiers.
llvm-svn: 148973
|
|
|
|
|
|
| |
an objc object in any abi mode.
llvm-svn: 148847
|
|
|
|
|
|
| |
// rdar://10731065
llvm-svn: 148823
|
|
|
|
|
|
| |
descriptive.
llvm-svn: 148772
|
|
|
|
|
|
| |
Sema::DiagnoseSentinelCalls() does.
llvm-svn: 148722
|
|
|
|
|
|
| |
couple of uses of ConstantEvaluated which don't make sense.
llvm-svn: 148624
|
|
|
|
| |
llvm-svn: 148611
|
|
|
|
|
|
| |
correctly, similar to what we already do with typeid.
llvm-svn: 148610
|
|
|
|
|
|
| |
Found by the clang static analyzer.
llvm-svn: 148544
|
|
|
|
|
|
| |
and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately.
llvm-svn: 148522
|
|
|
|
|
|
|
| |
Change CheckVectorLogicalOperands to pass params by ref.
Add another test case.
llvm-svn: 148452
|
|
|
|
|
|
|
|
| |
L'x' is actually wchar_t
support C11 u and U char literals
llvm-svn: 148390
|
|
|
|
|
|
|
|
|
|
|
|
| |
No new unit tests yet as there is no behavioral change
(except for slightly more specific filtering in
Sema::ActOnStartOfLambdaDefinition). Tests will be added
as the code paths are traced in greater depth to determine
how to improve the results--there are at least one or two
known bugs that require those improvements. This commit
lays the groundwork for those changes.
llvm-svn: 148382
|
|
|
|
|
|
| |
PotentiallyPotentiallyEvaluated contexts. In preparation for making sizeof() PotentiallyPotentiallyEvaluated.
llvm-svn: 148367
|
|
|
|
| |
llvm-svn: 148335
|
|
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
|
|
|
|
|
| |
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
|
|
|
|
| |
llvm-svn: 148276
|
|
|
|
|
|
|
|
| |
PotentiallyPotentiallyEvaluated contexts so that we model it in a sane way in most cases, and give up for the edge case which hopefully doesn't matter too much.
In preparation for correctly treating sizeof() as a PotentiallyPotentiallyEvaluated context.
llvm-svn: 148271
|
|
|
|
| |
llvm-svn: 148254
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.
Still to do:
- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases
llvm-svn: 148242
|
|
|
|
| |
llvm-svn: 148229
|
|
|
|
|
|
|
|
| |
not integer constant expressions. In passing, fix the 'folding is an extension'
diagnostic to not claim we're accepting the code, since that's not true in
-pedantic-errors mode, and add this diagnostic to -Wgnu.
llvm-svn: 148209
|
|
|
|
|
|
| |
Shrinks OverloadCandidate from 208 to 168 bytes.
llvm-svn: 148204
|
|
|
|
|
|
|
|
| |
don't set isUsed for local variables which are referenced in unevaluated contexts. Make other code use isReferenced() (which basically indicates that a declaration isn't dead) where appropriate.
I was forced to change test/SemaCXX/linkage.cpp because we aren't actually modeling extern "C" in the AST the way that testcase expects; we were not printing a warning only because we skipped the relevant check. Someone who actually understands the semantics here should fix that.
llvm-svn: 148158
|
|
|
|
|
|
| |
list of protools. // rdar://10669694
llvm-svn: 148051
|
|
|
|
|
|
| |
shared between lambda expressions and block literals.
llvm-svn: 147917
|
|
|
|
|
|
| |
complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.)
llvm-svn: 147723
|
|
|
|
| |
llvm-svn: 147641
|
|
|
|
|
|
| |
pieces to build the lambda class and its call operator. Create an actual scope for the lambda body.
llvm-svn: 147595
|
|
|
|
|
|
|
|
| |
so this patch is surprisingly small.
Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.
llvm-svn: 147221
|
|
|
|
|
|
|
|
| |
- constexpr function template instantiations
- variables of reference type
- constexpr variables
llvm-svn: 147031
|
|
|
|
|
|
|
|
| |
members of class templates so that their values can be used in ICEs. This
required reverting r105465, to get such instantiated members to be included in
serialized ASTs.
llvm-svn: 147023
|
|
|
|
|
|
| |
in class method instead of crash. // rdar://10593227
llvm-svn: 146998
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split out a new ExpressionEvaluationContext flag for this case, and don't treat
it as unevaluated in C++11. This fixes some crash-on-invalids where we would
allow references to class members in potentially-evaluated constant expressions
in static member functions, and also fixes half of PR10177.
The fix to PR10177 exposed a case where template instantiation failed to provide
a source location for a diagnostic, so TreeTransform has been tweaked to supply
source locations when transforming a type. The source location is still not very
good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to
improve it further.
Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for
static data members of class templates which are used in constant expressions.
This fixes a link-time problem, but we still incorrectly treat the member as
non-constant. The rest of the fix for that issue is blocked on PCH support for
early-instantiated static data members, which will be added in a subsequent
patch.
llvm-svn: 146955
|
|
|
|
| |
llvm-svn: 146847
|
|
|
|
|
|
|
| |
might not be an rvalue when checking array accesses. Instead, pass through a
flag indicating the array index is negated.
llvm-svn: 146753
|
|
|
|
|
|
|
|
| |
to declaresSameEntity(), as a baby step toward tracking forward
declarations of Objective-C classes precisely. Part of
<rdar://problem/10583531>.
llvm-svn: 146618
|
|
|
|
| |
llvm-svn: 146607
|
|
|
|
|
|
| |
going to be a pointer-to-member constant. Fixes <rdar://problem/10544564>.
llvm-svn: 146587
|
|
|
|
|
|
| |
diagnostics. No functionality change.
llvm-svn: 146365
|
|
|
|
|
|
|
|
|
|
|
|
| |
whether an expression is a (core) constant expression as a side-effect of
evaluation. This takes us from accepting far too few expressions as ICEs to
accepting slightly too many -- fixes for the remaining cases are coming next.
The diagnostics produced when an expression is found to be non-constant are
currently quite poor (with generic wording but reasonable source locations),
and will be improved in subsequent commits.
llvm-svn: 146289
|
|
|
|
|
|
|
| |
methods with these attributes are sent to receivers
of 'id' type too. // rdar://10459930
llvm-svn: 145999
|