| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
hopefully fix MSVC failures.
llvm-svn: 133119
|
| |
|
|
|
|
| |
on all platforms in non-ARC mode.
llvm-svn: 133114
|
| |
|
|
|
|
| |
for this.
llvm-svn: 133104
|
| |
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
| |
|
|
| |
llvm-svn: 133079
|
| |
|
|
| |
llvm-svn: 133073
|
| |
|
|
|
|
| |
on gcc-testsuite bot.)
llvm-svn: 133069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
were just punting on template argument deduction for a number of type
nodes. Most of them, obviously, didn't matter.
As a consequence of this, make extended vector types (via the
ext_vector_type attribute) actually work properly for several
important cases:
- If the attribute appears in a type-id (i.e, not attached to a
typedef), actually build a proper vector type
- Build ExtVectorType whenever the size is constant; previously, we
were building DependentSizedExtVectorType when the size was constant
but the type was dependent, which makes no sense at all.
- Teach template argument deduction to handle
ExtVectorType/DependentSizedExtVectorType.
llvm-svn: 133060
|
| |
|
|
|
|
|
|
|
|
| |
before the template parameters have acquired a proper context (e.g.,
because the enclosing context has yet to be built), provide empty
parameter lists for all outer template parameter scopes to inhibit any
substitution for those template parameters. Fixes PR9643 /
<rdar://problem/9251019>.
llvm-svn: 133055
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- (bounded copies) Be more conservative about how much is being copied.
- (str(n)cat) If we can't compute the exact final length of an append operation, we can still lower-bound it.
- (stpcpy) Fix the conjured return value at the end to actually be returned.
This requires these supporting changes:
- C string metadata symbols are still live even when buried in a SymExpr.
- "Hypothetical" C string lengths, to represent a value that /will/ be passed to setCStringLength() if all goes well. (The idea is to allow for temporary constrainable symbols that may end up becoming permanent.)
- The 'checkAdditionOverflow' helper makes sure that the two strings being appended in a strcat don't overflow size_t. This should never *actually* happen; the real effect is to keep the final string length from "wrapping around" in the constraint manager.
This doesn't actually test the "bounded" operations (strncpy and strncat) because they can leave strings unterminated. Next on the list!
llvm-svn: 133046
|
| |
|
|
|
|
|
| |
either imlicitly (for builtins) or explicitly (due to multiple
specification of the same attributes). Fixes <rdar://problem/9612060>.
llvm-svn: 133045
|
| |
|
|
| |
llvm-svn: 133039
|
| |
|
|
|
|
|
| |
protected in the case where a variable is being initialized by a
trivial default constructor but has a non-trivial destructor.
llvm-svn: 133037
|
| |
|
|
| |
llvm-svn: 133036
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the output for -Wshift-overflow and
-Wshift-sign-overflow to an unsigned hexadecimal. It makes
more sense for looking at bits than a signed decimal does.
Also, change the diagnostic's wording from "overrides"
to "sets".
This uses a new optional argument in APInt::toString()
that adds the '0x' prefix to hexademical numbers.
This fixes PR 9651.
Patch by nobled@dreamwidth.org!
llvm-svn: 133033
|
| |
|
|
|
|
| |
inference, to be used (only) by the Objective-C rewriter.
llvm-svn: 133025
|
| |
|
|
|
|
| |
<rdar://problem/9607158>.
llvm-svn: 133024
|
| |
|
|
|
|
|
| |
no-format-y2k turn off -Wformat altogether.
// rdar://9504680
llvm-svn: 133015
|
| |
|
|
|
|
| |
2 of 3.
llvm-svn: 133011
|
| |
|
|
|
|
|
|
|
|
| |
lexer is not a paste operator, it is a normal token. This fixes a conformance
issue shown here:
http://p99.gforge.inria.fr/c99-conformance/c99-conformance-clang-2.9.html
and it defines away the crash from before.
llvm-svn: 133005
|
| |
|
|
| |
llvm-svn: 133003
|
| |
|
|
|
|
|
|
|
|
| |
in a noexcept exception specification because it isn't part of the
canonical type. This ensures that we keep the exact expression written
in the noexcept exception specification, rather than accidentally
"adopting" a previously-written and canonically "equivalent" function
prototype. Fixes PR10087.
llvm-svn: 132998
|
| |
|
|
| |
llvm-svn: 132996
|
| |
|
|
| |
llvm-svn: 132989
|
| |
|
|
|
|
|
|
|
|
| |
folded to a constant
as constant size arrays. This has slightly different semantics in some insane cases, but allows
us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other
modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code
llvm-svn: 132983
|
| |
|
|
|
|
| |
as an extension.
llvm-svn: 132980
|
| |
|
|
|
|
|
| |
- Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there
- Incomplete and abstract types are considered hard errors
llvm-svn: 132979
|
| |
|
|
| |
llvm-svn: 132975
|
| |
|
|
|
|
| |
C++. Its external name is now unix.experimental.CString.
llvm-svn: 132958
|
| |
|
|
|
|
|
|
|
|
| |
if the alignment of an argument to a call is less than the specified byval alignment for that argument, there is no way to specify the alignment of the implied copy. Therefore, we must ensure that the alignment of the argument is at least the byval alignment. To do this, we have to mess with the alignment of relevant alloca's in some cases, and insert a copy that conceptually shouldn't be necessary in some cases.
This patch tries relatively hard to avoid creating an extra copy if it can be avoided (see test3 in the included testcase), but it is not possible to avoid in some cases (like test2 in the included testcase).
rdar://9483886
llvm-svn: 132957
|
| |
|
|
|
|
| |
can't properly model (yet?) to string-fail.c.
llvm-svn: 132955
|
| |
|
|
|
|
|
|
| |
functions in gnu89 mode in terms of redefinitions.
rdar://9559708 .
llvm-svn: 132953
|
| |
|
|
| |
llvm-svn: 132948
|
| |
|
|
|
|
| |
1 of 3 or so.
llvm-svn: 132945
|
| |
|
|
|
|
| |
reason to allow the user to control these semantics through a flag.
llvm-svn: 132919
|
| |
|
|
| |
llvm-svn: 132918
|
| |
|
|
| |
llvm-svn: 132905
|
| |
|
|
|
|
|
| |
- Move the diagnostic to the case statement instead of at the end of the switch
- Add a fix-it hint as to how to fix the compilation error
llvm-svn: 132903
|
| |
|
|
|
|
|
|
|
|
|
|
| |
struct {
typedef int A = 0;
};
According to the C++11 standard, this is not ill-formed, but does not have any ascribed meaning. We can't reasonably accept it, so treat it as ill-formed.
Also switch C++ from an incorrect 'fields can only be initialized in constructors' diagnostic for this case to C's 'illegal initializer (only variables can be initialized)'
llvm-svn: 132890
|
| |
|
|
| |
llvm-svn: 132889
|
| |
|
|
| |
llvm-svn: 132878
|
| |
|
|
|
|
| |
keyword in objc property decl.
llvm-svn: 132877
|
| |
|
|
| |
llvm-svn: 132874
|
| |
|
|
|
|
|
| |
pointer assignment in C++. This was a longstanding problem spotted by
Jordy Rose.
llvm-svn: 132873
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:
t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^
It also means that we get decent type inference when writing code in
Objective-C++0x:
auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id
llvm-svn: 132868
|
| |
|
|
|
|
| |
properties.
llvm-svn: 132866
|
| |
|
|
|
|
|
|
| |
determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates.
While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp.
llvm-svn: 132861
|
| |
|
|
| |
llvm-svn: 132842
|
| |
|
|
|
|
|
|
| |
expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary.
Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary.
llvm-svn: 132840
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Wmismatched-tags.
- Removed fix-it hints from template instaniations since changes to the
templates are rarely helpful.
- Changed the caret in template instaniations from the class/struct name to the
class/struct keyword, matching the other warnings.
- Do not offer fix-it hints when multiple declarations disagree. Warnings are
still given.
- Once a definition is found, offer a fix-it hint to all previous declarations
with wrong tag.
- Declarations that disagree with a previous definition will get a fix-it hint
to change the declaration.
llvm-svn: 132831
|