| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
loop variable has a type containing 'auto', set the declaration to be invalid
(because we couldn't deduce its type) to prevent follow-on errors.
llvm-svn: 188853
|
|
|
|
|
|
|
|
| |
changing Parameter of Sema::ActOnCompoundStmt from MutableArrayRef to
ArrayRef.
No functionality change intended.
llvm-svn: 188705
|
|
|
|
|
|
|
|
|
|
|
| |
referenced as a member of the current instantiation. In that case, deduce the
type of the function to a dependent type rather than exposing an undeduced auto
type to the rest of the current instantiation.
The standard doesn't really say that the type is dependent in this case; I'll
bring this up with CWG.
llvm-svn: 188410
|
|
|
|
|
|
|
|
| |
decrements inside for loops. Idea for this warning proposed in PR15636:
http://llvm.org/bugs/show_bug.cgi?id=15636
llvm-svn: 187817
|
|
|
|
|
|
|
| |
no return type is specified, C++11 will deduce a cv-qualified return type in
some cases, but C++1y never will.
llvm-svn: 187275
|
|
|
|
|
|
| |
return type has already been determined to be a type containing an 'auto'.
llvm-svn: 187266
|
|
|
|
|
|
| |
size.
llvm-svn: 186284
|
|
|
|
|
|
|
|
| |
result type, a diagnostic being issued, issue a 'note'
mentioning reason behind the unexpected warning.
// rdar://14121570.
llvm-svn: 186105
|
|
|
|
|
|
|
|
| |
Sema::ActOnDocumentableDecls.
Patch by Robert Wilhelm.
llvm-svn: 185931
|
|
|
|
|
|
| |
// rdar://14182680.
llvm-svn: 185762
|
|
|
|
|
|
| |
avoid specifying the vector size unnecessarily.
llvm-svn: 185610
|
|
|
|
|
|
|
|
|
|
| |
constant. Also fix some spelling mistakes and formatting issues.
Reviewed by Richard Smith over IRC.
Fixes PR15069.
llvm-svn: 183409
|
|
|
|
| |
llvm-svn: 183056
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a FieldDecl from it, and propagate both into the closure type and the
LambdaExpr.
You can't do much useful with them yet -- you can't use them within the body
of the lambda, because we don't have a representation for "the this of the
lambda, not the this of the enclosing context". We also don't have support or a
representation for a nested capture of an init-capture yet, which was intended
to work despite not being allowed by the current standard wording.
llvm-svn: 181985
|
|
|
|
|
|
| |
completes the implementation of N3638.
llvm-svn: 181669
|
|
|
|
|
|
|
| |
substitute 'void' into the return type rather than replacing it with 'void', so
that we maintain the 'auto' type sugar.
llvm-svn: 181584
|
|
|
|
|
|
|
| |
Missing (somewhat ironically) is support for the new deduction rules
in lambda functions, plus PCH support for return type patching.
llvm-svn: 181108
|
|
|
|
|
|
|
|
| |
- Sema tests added and CodeGen tests are pending
Differential Revision: http://llvm-reviews.chandlerc.com/D728
llvm-svn: 181101
|
|
|
|
| |
llvm-svn: 181057
|
|
|
|
|
|
|
|
|
|
|
| |
Move the creation of CapturedStmt parameters out of CodeGen and into
Sema, making it easier to customize the outlined function. The
ImplicitParamDecls are stored in the CapturedDecl using an
ASTContext-allocated array.
Differential Revision: http://llvm-reviews.chandlerc.com/D722
llvm-svn: 181043
|
|
|
|
|
|
|
|
| |
InitializationSequence::Diagnose()
Patch by Robert Wilhelm.
llvm-svn: 181022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the actual parser and support arbitrary id-expressions.
We're actually basically set up to do arbitrary expressions here
if we wanted to.
Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.
I've also fixed the serialization of MS asm statements.
This commit depends on an LLVM commit.
llvm-svn: 180976
|
|
|
|
| |
llvm-svn: 180808
|
|
|
|
|
|
|
|
| |
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.
llvm-svn: 180789
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get
to the CapturedRegionKind enum. This also allows codegen to access this enum
without including Sema/ScopeInfo.h.
Also removes some duplicated code for capturing 'this' between CapturedStmt and
Lambda.
Differential Revision: http://llvm-reviews.chandlerc.com/D712
llvm-svn: 180710
|
|
|
|
| |
llvm-svn: 180709
|
|
|
|
|
|
|
|
|
|
|
|
| |
Still to do here:
- we have a collection of syntactic accepts-invalids to diagnose
- support non-PODs in VLAs, including dynamic initialization /
destruction
- runtime checks (and throw std::bad_array_length) for bad bound
- support VLA capture by reference in lambdas
- properly support VLAs in range-based for (don't recompute bound)
llvm-svn: 179962
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.
TODO: templates
Author: Ben Langmuir <ben.langmuir@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D433
llvm-svn: 179618
|
|
|
|
|
|
| |
a non-variable iteration declaration.
llvm-svn: 179053
|
|
|
|
|
|
| |
that is actually an Objective-C fast enumeration loop.
llvm-svn: 179035
|
|
|
|
|
|
|
|
|
|
|
| |
http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.
Revert "Revert 178663."
This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.
llvm-svn: 178682
|
|
|
|
|
|
|
|
|
|
| |
Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb
Revert "Don't compute a patched/semantic storage class."
This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.
llvm-svn: 178681
|
|
|
|
|
|
|
|
|
|
|
| |
For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.
This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.
llvm-svn: 178663
|
|
|
|
|
|
|
|
|
|
|
|
| |
picking up cleanups from earlier in the statement. Also fix a
crash-on-invalid where a reference to an invalid decl from an
enclosing scope was causing an expression to fail to build, but
only *after* a cleanup was registered from that statement,
causing an assertion downstream.
The crash-on-valid is rdar://13459289.
llvm-svn: 177692
|
|
|
|
|
|
|
|
| |
we expect a related result type.
rdar://12493140
llvm-svn: 177378
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 176469
|
|
|
|
|
|
| |
macros.
llvm-svn: 176114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).
Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.
llvm-svn: 175462
|
|
|
|
|
|
|
| |
we don't do the scope checks otherwise we are going to hit assertion checks
since a label may not have been actually added.
llvm-svn: 175281
|
|
|
|
|
|
| |
commented on and approved by Richard Smith.
llvm-svn: 173377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is inspired by a number of false positives in real code, including
PR14968. I've added test cases reduced from these false positives to
test/Sema/unused-expr.c, as well as corresponding test cases that pass the
offending expressions as arguments to a no-op macro to ensure that we do warn
there.
This also removes my previous tweak from r166522/r166534, so that we warn on
unused cast expressions in macro arguments.
There were several test cases that were using -Wunused-value to test general
diagnostic emission features; I changed those to use other warnings or warn on
a macro argument expression. I stared at the test case for PR14399 for a while
with Richard Smith and we believe the new test case exercises the same
codepaths as before.
llvm-svn: 172696
|
|
|
|
|
|
|
|
| |
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).
llvm-svn: 172691
|
|
|
|
|
|
|
|
| |
ActOnFinishFullExpr that some of its checks only apply to discarded-value
expressions. This adds missing checks for unexpanded variadic template
parameter packs to a handful of constructs.
llvm-svn: 172485
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, -Wunused-comparison ignored comparisons in both macro bodies and
macro arguments, but we would still emit a -Wunused-value warning for either.
Now we correctly emit -Wunused-comparison for expressions in macro arguments.
Also, add isMacroBodyExpansion to SourceManager, to go along with
isMacroArgExpansion.
llvm-svn: 172279
|
|
|
|
|
|
| |
// rdar://11577384
llvm-svn: 172102
|
|
|
|
|
|
|
|
|
| |
in case condition type. // rdar://11577384.
Test is conditionalized on x86_64-apple triple as
I am not sure if the INT_MAX/LONG_MAX values in the test
will pass this test for other hosts.
llvm-svn: 172016
|
|
|
|
| |
llvm-svn: 171367
|
|
|
|
| |
llvm-svn: 171239
|