|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| | literal types, as well as derived-to-base casts for lvalues and
derived-to-virtual-base casts.
llvm-svn: 144265 | 
| | 
| 
| 
| 
| 
| 
| | but it is sometimes useful to track blocks.  Do so.  Also
optimize the storage of these expressions.
llvm-svn: 144263 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes PR11320.
llvm-svn: 144110 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The Neon load/store intrinsics need to be implemented as macros to avoid
hiding alignment attributes on the pointer arguments, and the macros can
only evaluate those pointer arguments once (in case they have side effects),
so it has been hard to get the right type checking for those pointers.
I tried various alternatives in the arm_neon.h header, but it's much more
straightforward to just check directly in Sema.
llvm-svn: 144075 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now.  Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.
llvm-svn: 144054 | 
| | 
| 
| 
| | llvm-svn: 143910 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | string is part of the function call, then there is no difference.  If the
format string is not, the warning will point to the call site and a note
will point to where the format string is.
Fix-it hints for strings are moved to the note if a note is emitted.  This will
prevent changes to format strings that may be used in multiple places.
llvm-svn: 143168 | 
| | 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| | code.  Apparently this is what GCC does, and some code depends on this.  Fixes <rdar://problem/10321089>.
llvm-svn: 142716 | 
| | 
| 
| 
| | llvm-svn: 142465 | 
| | 
| 
| 
| 
| 
| 
| 
| | For PR11152. Make PrintSpecifier::fixType() suggest "%zu" for size_t, etc.
rather than looking at the underlying type and suggesting "%llu" or other
platform-specific length modifiers. Applies to C99 and C++11.
llvm-svn: 142342 | 
| | 
| 
| 
| | llvm-svn: 142157 | 
| | 
| 
| 
| | llvm-svn: 142012 | 
| | 
| 
| 
| | llvm-svn: 141955 | 
| | 
| 
| 
| 
| 
| | This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives.
llvm-svn: 141902 | 
| | 
| 
| 
| | llvm-svn: 141632 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | - 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 | 
| | 
| 
| 
| 
| 
| | subexpressions. Fixes PR10291.
llvm-svn: 141552 | 
| | 
| 
| 
| 
| 
| 
| | for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355 | 
| | 
| 
| 
| 
| 
| 
| 
| | C-style and functional casts are built in SemaCXXCast.cpp.
Introduce a helper class to encapsulate most of the random
state being passed around, at least one level down.
llvm-svn: 141170 | 
| | 
| 
| 
| 
| 
| | Fixes <rdar://problem/9473155>.
llvm-svn: 140777 | 
| | 
| 
| 
| | llvm-svn: 140775 | 
| | 
| 
| 
| 
| 
| | macro whose only replacement token is '_Bool'.
llvm-svn: 140656 | 
| | 
| 
| 
| 
| 
| 
| | 'bool' rather than '_Bool' within types, to make things a bit more
readable. Fixes <rdar://problem/10063263>.
llvm-svn: 140650 | 
| | 
| 
| 
| | llvm-svn: 140478 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | is cast to a boolean.  An exception has been made for string literals in
logical expressions to allow the common case of use in assert statements.
bool x;
x = "hi";  // Warn here
void foo(bool x);
foo("hi");  // Warn here
assert(0 && "error");
assert("error);  // Warn here
llvm-svn: 140405 | 
| | 
| 
| 
| | llvm-svn: 140367 | 
| | 
| 
| 
| 
| 
| | It already works (and is useful with) macro locs as well.
llvm-svn: 140057 | 
| | 
| 
| 
| 
| 
| | Fixes PR10771.
llvm-svn: 139990 | 
| | 
| 
| 
| | llvm-svn: 139856 | 
| | 
| 
| 
| 
| 
| | their semantic attributes and then to take advantage of that.
llvm-svn: 139615 | 
| | 
| 
| 
| | llvm-svn: 139466 | 
| | 
| 
| 
| 
| 
| 
| | annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.
llvm-svn: 139423 | 
| | 
| 
| 
| 
| 
| 
| | construct a new DeclRefExpr rather than re-using the existing
DeclRefExpr. Patch by Likai Liu, fixes PR8345.
llvm-svn: 139373 | 
| | 
| 
| 
| | llvm-svn: 139334 | 
| | 
| 
| 
| | llvm-svn: 139326 | 
| | 
| 
| 
| 
| 
| 
| 
| | builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985 | 
| | 
| 
| 
| 
| 
| 
| | of default argument promotion and needs to happen unconditionally.
This is particularly semantically important in C++0x.
llvm-svn: 138691 | 
| | 
| 
| 
| 
| 
| | -Wdynamic-class-memaccess
llvm-svn: 138074 | 
| | 
| 
| 
| 
| 
| | are flexible arrays or have size 1.
llvm-svn: 138004 | 
| | 
| 
| 
| 
| 
| 
| 
| | __SIZE_TYPE__ (and hence be portable).
Also, change the warning to -Wstrl-incorrect-size.
llvm-svn: 137980 | 
| | 
| 
| 
| 
| 
| 
| 
| | if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*.  This warning is off by default (for now)."
This currently doesn't work on Windows.
llvm-svn: 137920 | 
| | 
| 
| 
| 
| 
| 
| 
| | argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*.  This warning is off by default (for now).
Warning logic provided by Geoff Keating.
llvm-svn: 137903 | 
| | 
| 
| 
| | llvm-svn: 137240 | 
| | 
| 
| 
| | llvm-svn: 137234 | 
| | 
| 
| 
| 
| 
| | field in a record.
llvm-svn: 137009 |