| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The way we handle this implicitly removes the ability to use
property l-values in this position, but that's really okay.
llvm-svn: 153729
|
| |
|
|
|
|
| |
methods with related result types. PR12384.
llvm-svn: 153716
|
| |
|
|
|
|
|
| |
the diagnostic instead of displaying ''.
// rdar://11082110
llvm-svn: 153219
|
| |
|
|
| |
llvm-svn: 153217
|
| |
|
|
|
|
|
| |
c-mode to match behavior with void functions in c. Issue
warning with -pedantic. // rdar://11069896
llvm-svn: 153200
|
| |
|
|
| |
llvm-svn: 153193
|
| |
|
|
|
|
|
| |
pointer field declarations in several meta-data.
// rdar://11079898
llvm-svn: 153192
|
| |
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
| |
|
|
| |
llvm-svn: 151173
|
| |
|
|
|
|
| |
direct member initializers.
llvm-svn: 151155
|
| |
|
|
| |
llvm-svn: 150586
|
| |
|
|
| |
llvm-svn: 150585
|
| |
|
|
|
|
|
| |
return statements within a lambda; this diagnostic previously referred
to blocks.
llvm-svn: 150584
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* if, switch, range-based for: warn if semicolon is on the same line.
* for, while: warn if semicolon is on the same line and either next
statement is compound statement or next statement has more
indentation.
Replacing the semicolon with {} or moving the semicolon to the next
line will always silence the warning.
Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.
llvm-svn: 150515
|
| |
|
|
|
|
| |
list; it is not an expression.
llvm-svn: 150194
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
array new expression. This lays some groundwork for the implicit conversion to
integral or unscoped enumeration which C++11 ICEs undergo.
llvm-svn: 149772
|
| |
|
|
|
|
| |
indirect goto.
llvm-svn: 149441
|
| |
|
|
| |
llvm-svn: 149127
|
| |
|
|
|
|
| |
expressions and block literals. As it turns out, almost all the logic can be shared.
llvm-svn: 149031
|
| |
|
|
|
|
| |
lvalue-to-rvalue conversion.
llvm-svn: 149003
|
| |
|
|
|
|
|
| |
This suppresses typo correction for auto-generated call expressions such
as to 'begin' or 'end' within a C++0x for-range statement.
llvm-svn: 148979
|
| |
|
|
|
|
|
|
| |
Fix some review comments.
Add a test for deduction when std::initializer_list isn't available yet.
Fix redundant error messages. This fixes and outstanding FIXME too.
llvm-svn: 148735
|
| |
|
|
|
|
|
|
| |
Clang previously implemented -Wswitch-enum the same as -Wswitch. This patch
corrects the behavior to match GCC's. The critical/only difference being that
-Wswitch-enum is not silenced by the presence of a default case in the switch.
llvm-svn: 148679
|
| |
|
|
|
|
| |
appropriate.
llvm-svn: 148673
|
| |
|
|
|
|
|
|
|
| |
For consistency with GCC & reasonable sanity. The FIXME suggests that the
original author was perhaps using the default check for some other purpose,
not realizing the more obvious limitation/false-negatives it creates, but this
doesn't seem to produce any regressions & fixes the included test.
llvm-svn: 148649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This warning acts as the complement to the main -Wswitch-enum warning (which
warns whenever a switch over enum without a default doesn't cover all values of
the enum) & has been an an-doc coding convention in LLVM and Clang in my
experience. The purpose is to ensure there's never a "dead" default in a
switch-over-enum because this would hide future -Wswitch-enum errors.
The name warning has a separate flag name so it can be disabled but it's grouped
under -Wswitch-enum & is on-by-default because of this.
The existing violations of this rule in test cases have had the warning disabled
& I've added a specific test for the new behavior (many negative cases already
exist in the same test file - and none regressed - so I didn't add more).
Reviewed by Ted Kremenek ( http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120116/051690.html )
llvm-svn: 148640
|
| |
|
|
|
|
|
|
|
|
| |
values and non-type template arguments of integral and enumeration types.
This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.
llvm-svn: 148439
|
| |
|
|
|
|
|
|
| |
support. This means you can now write:
for (int i : {1, 4, 512, 23, 251}) {}
llvm-svn: 148353
|
| |
|
|
|
|
|
| |
Along the way, move a helper function from SemaChecking.cpp to a more
accessible home in SourceManager.
llvm-svn: 147692
|
| |
|
|
| |
llvm-svn: 147582
|
| |
|
|
|
|
| |
clients. No functionality change.
llvm-svn: 147318
|
| |
|
|
|
|
| |
Function or array lvalue conversions happens.
llvm-svn: 145782
|
| |
|
|
|
|
|
| |
inferred from return types. All the return statements have to agree about the type.
// rdar://10466373
llvm-svn: 145774
|
| |
|
|
|
|
|
|
|
|
| |
Objective-C classes. This has two purposes: to consistently provide
"forward declaration here" notes when we hit an incomplete type, and
to give LLDB a chance to complete the type.
RequireCompleteType bits from Sean Callanan!
llvm-svn: 144573
|
| |
|
|
|
|
| |
guarantees alignment up to the ABI alignment of the return type.
llvm-svn: 144364
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.
Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.
I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.
llvm-svn: 143867
|
| |
|
|
|
|
|
|
| |
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.
llvm-svn: 143263
|
| |
|
|
|
|
|
|
|
| |
rvalue. An assertion to catch this is in ImpCastExprToType will follow, but
vector operations currently trip over this (due to omitting the usual arithmetic
conversions). Also add an assert to catch missing lvalue-to-rvalue conversions
on the LHS of ->.
llvm-svn: 143155
|
| |
|
|
|
|
| |
property refactoring. // rdar://10327068
llvm-svn: 143139
|
| |
|
|
|
|
| |
GCC compiler workaround.
llvm-svn: 142931
|
| |
|
|
|
|
| |
r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."
llvm-svn: 142921
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.
Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.
llvm-svn: 142914
|
| |
|
|
|
|
|
|
|
|
| |
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".
llvm-svn: 142901
|
| |
|
|
|
|
|
|
|
|
| |
in multiple subexpressions. This breaks the tree structure
of the AST and completely breaks the CFG invariants.
Patch by Jim Goodnow II and reviewed by Richard Smith!
llvm-svn: 141586
|
| |
|
|
|
|
|
|
|
|
|
| |
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
|
| |
|
|
| |
llvm-svn: 140407
|
| |
|
|
| |
llvm-svn: 140367
|
| |
|
|
|
|
| |
operands with dependent type. Patch by Likai Liu.
llvm-svn: 139716
|