| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The name of a class used in the testing files was updated to actually
be descriptive. Patch by chris.wailes@gmail.com.
llvm-svn: 189132
|
| |
|
|
|
|
| |
about a declaration within a return type.
llvm-svn: 189083
|
| |
|
|
|
|
|
|
|
|
|
| |
Patch by chris.wailes@gmail.com. The following functionality was added:
* The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs.
* Factored out some code in StmtVisitor.
* Removed variables from the state map when their destructors are encountered.
* Started adding documentation for the consumed analysis attributes.
llvm-svn: 189059
|
| |
|
|
| |
llvm-svn: 188975
|
| |
|
|
| |
llvm-svn: 188974
|
| |
|
|
|
|
| |
least one bug, as it does not respect the variable template specialization hierarchy well.
llvm-svn: 188969
|
| |
|
|
|
|
|
|
|
| |
Basically, isInMainFile considers line markers, and isWrittenInMainFile
doesn't. Distinguishing between the two is useful when dealing with
files which are preprocessed files or rewritten with -frewrite-includes
(so we don't, for example, print useless warnings).
llvm-svn: 188968
|
| |
|
|
|
|
| |
recovering by adding empty parenthesis. Fixes PR16676!
llvm-svn: 188920
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. We now print the return type of lambdas and return type deduced functions
as "auto". Trailing return types with decltype print the underlying type.
2. Use the lambda or block scope for the PredefinedExpr type instead of the
parent function. This fixes PR16946, a strange mismatch between type of the
expression and the actual result.
3. Verify the type in CodeGen.
4. The type for blocks is still wrong. They are numbered and the name is not
known until CodeGen.
llvm-svn: 188900
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
checking for missing parens in &&/|| expressions.
llvm-svn: 188716
|
| |
|
|
|
|
|
| |
preparation for teaching this function how to diagnose a correction that
includes importing a module.
llvm-svn: 188602
|
| |
|
|
|
|
|
| |
Before this patch we would warn and drop the attribute in
extern const char test3[] __attribute__((used)) = "";
llvm-svn: 188588
|
| |
|
|
| |
llvm-svn: 188571
|
| |
|
|
|
|
| |
PR16900.
llvm-svn: 188511
|
| |
|
|
| |
llvm-svn: 188505
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
template" instead of "static data member" when appropriate
llvm-svn: 188409
|
| |
|
|
|
|
| |
variable
llvm-svn: 188350
|
| |
|
|
|
|
| |
the address of an overloaded function template.
llvm-svn: 188334
|
| |
|
|
|
|
| |
PR16872.
llvm-svn: 188324
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When a local extern declaration redeclares some other entity, the type of that
entity is merged with the prior type if the prior declaration is visible (in C)
or is declared in the same scope (in C++).
- Make LookupRedeclarationWithLinkage actually work in C++, use it in the right
set of cases, and make it track whether it found a shadowed declaration.
- Track whether we found a declaration in the same scope (for C++) including
across serialization and template instantiation.
llvm-svn: 188307
|
| |
|
|
|
|
| |
cases...
llvm-svn: 188249
|
| |
|
|
|
|
|
| |
This is just a couple of minor fixes to account for the existence
of ElaboratedType.
llvm-svn: 188209
|
| |
|
|
|
|
|
|
|
| |
I'm not really satisfied with the ad-hoc nature of
Sema::diagnoseQualifiedDeclaration, but I'm not sure how to fix it.
Fixes <rdar://problem/14639501>.
llvm-svn: 188208
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by delesley, dblaikie.
Add the annotations and code needed to support a basic 'consumed' analysis.
Summary:
This new analysis is based on academic literature on linear types. It tracks
the state of a value, either as unconsumed, consumed, or unknown. Methods are
then annotated as CallableWhenUnconsumed, and when an annotated method is
called while the value is in the 'consumed' state a warning is issued. A value
may be tested in the conditional statement of an if-statement; when this occurs
we know the state of the value in the different branches, and this information
is added to our analysis. The code is still highly experimental, and the names
of annotations or the algorithm may be subject to change.
llvm-svn: 188206
|
| |
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D924
llvm-svn: 188133
|
| |
|
|
|
|
|
|
|
|
| |
comparing non-reference function parameters. The qualifiers don't matter for
comparisons.
This is a re-commit of r187769, which was accidentially reverted in r187770,
with a simplification at the suggestion of Eli Friedman.
llvm-svn: 188112
|
| |
|
|
|
|
|
|
|
|
|
| |
We were exposing the extra alignment given to large arrays. The new behavior
matches gcc, which is a good thing since this is a gcc extension.
Thanks to Joerg Sonnenberger for noticing it.
While at it, centralize the method description in the .h file.
llvm-svn: 187999
|
| |
|
|
|
|
| |
so that it can be toggled independently of other deprecated warnings.
llvm-svn: 187958
|
| |
|
|
|
|
| |
Fixes PR16394.
llvm-svn: 187955
|
| |
|
|
|
|
|
|
| |
decrements inside for loops. Idea for this warning proposed in PR15636:
http://llvm.org/bugs/show_bug.cgi?id=15636
llvm-svn: 187817
|
| |
|
|
|
|
| |
expression, truncate the stored value to the size of the bitfield.
llvm-svn: 187782
|
| |
|
|
|
|
| |
templates from Parser to Sema.
llvm-svn: 187770
|
| |
|
|
|
|
|
| |
comparing non-reference function parameters. The qualifiers don't matter for
comparisons.
llvm-svn: 187769
|
| |
|
|
|
|
| |
fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...
llvm-svn: 187762
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
function: it can't be 'void' and it can't be an initializer list. We give a
hard error for these rather than treating them as undefined behavior (we can
and probably should do the same for non-POD types in C++11, but as of this
change we don't).
Slightly rework the checking of variadic arguments in a function with a format
attribute to ensure that certain kinds of format string problem (non-literal
string, too many/too few arguments, ...) don't suppress this error.
llvm-svn: 187735
|
| |
|
|
|
|
|
|
|
| |
Sema::PerformObjectMemberConversion assumed that the Qualifier it was
given holds a type. However, the specifier could hold just a namespace.
In this case, we should ignore the qualifier and not attempt to cast to
it.
llvm-svn: 187715
|
| |
|
|
|
|
| |
resolved statically.
llvm-svn: 187564
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change unifies the logic for template instantiation of methods and
functions declared with typedefs.
It ensures that SubstFunctionType() always fills the Params out param
with non-null ParmVarDecls or returns null.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1135
llvm-svn: 187528
|
| |
|
|
| |
llvm-svn: 187521
|
| |
|
|
|
|
| |
changing '->' to '.' when there is no operator-> defined for a class.
llvm-svn: 187504
|
| |
|
|
| |
llvm-svn: 187467
|
| |
|
|
| |
llvm-svn: 187419
|
| |
|
|
|
|
|
|
|
|
| |
This matches how we normally perform semantic analysis for other sorts
of invalid expressions: it means we don't have to reason about invalid
sub-expressions.
Fixes PR16680.
llvm-svn: 187276
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 187096
|
| |
|
|
|
|
|
| |
objects to be used once their lifetimes end. This completes the C++1y
constexpr extensions.
llvm-svn: 187025
|
| |
|
|
|
|
|
|
| |
diagnostic for clarity; updated almost all of the affected test cases.
Thanks to Fariborz Jahanian for the suggestion!
llvm-svn: 186980
|