Eli Friedman
bb5c9ae425
Remove unused member of Builtin::Info.
...
llvm-svn: 134443
2011-07-05 21:53:01 +00:00
Joerg Sonnenberger
f8fa4443b3
Drop "soft" argument that would be considered as file argument by cc1.
...
llvm-svn: 134438
2011-07-05 19:52:46 +00:00
Douglas Gregor
b7c0083878
Look through parenthesized declarators when determining whether an
...
instantiated function template was written with a prototype or via
some kind of typedef. Fixes PR10273 / <rdar://problem/9723679>.
llvm-svn: 134426
2011-07-05 18:30:26 +00:00
Joerg Sonnenberger
8360e523cf
Hook up mipsel-netbsd and mipsel-freebsd for OS specific handling.
...
llvm-svn: 134425
2011-07-05 18:24:04 +00:00
Joerg Sonnenberger
d60cccfecc
Use OS-specific configuration for mips-netbsd and mips-freebsd.
...
llvm-svn: 134422
2011-07-05 18:05:54 +00:00
Douglas Gregor
6b9be0ffb3
Some documentation fixes for the parser, from John Freeman
...
llvm-svn: 134419
2011-07-05 17:13:11 +00:00
Douglas Gregor
1cb4290b89
StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!
...
llvm-svn: 134418
2011-07-05 16:56:25 +00:00
Douglas Gregor
9e66af44ad
Clean up and refactor ParseFunctionDeclarator to reduce code
...
repetition and better reflect the actual grammar, from John Freeman!
llvm-svn: 134417
2011-07-05 16:44:18 +00:00
Douglas Gregor
1fe12c9eba
ActOnCXXConditionDeclaration should take into account that
...
ActOnDeclarator can return NULL. Fixes PR10270, from Hans Wennborg!
llvm-svn: 134416
2011-07-05 16:13:20 +00:00
Fariborz Jahanian
bf3eec68dd
Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue.
...
Patch by Jean-Daniel Dupas.
llvm-svn: 134414
2011-07-05 16:00:59 +00:00
Joerg Sonnenberger
870b3c5429
Don't define _BIG_ENDIAN for NetBSD/PowerPC.
...
llvm-svn: 134411
2011-07-05 14:56:12 +00:00
Joerg Sonnenberger
a6d11777f9
Fix indentation
...
llvm-svn: 134410
2011-07-05 14:54:41 +00:00
Douglas Gregor
c9c40ce861
Teach Clang's <float.h> to also include MinGW's <float.h>, which provides additional system definitions, from Ruben Van Boxem
...
llvm-svn: 134407
2011-07-05 14:17:04 +00:00
Douglas Gregor
c750b6c436
Update header-search paths for MinGW, from Ruben Van Boxem
...
llvm-svn: 134406
2011-07-05 14:16:05 +00:00
Benjamin Kramer
e87c38b229
Don't overread the buffer when an %x escape in inline asm ends prematurely.
...
Tested by valgrind & Sema/asm.c.
llvm-svn: 134404
2011-07-05 11:13:37 +00:00
Benjamin Kramer
de1d62314a
Initialize member.
...
llvm-svn: 134403
2011-07-05 09:46:31 +00:00
Joerg Sonnenberger
f031fd9e77
Add explicit default case for -Wswitch-enum.
...
llvm-svn: 134399
2011-07-04 23:11:58 +00:00
Joerg Sonnenberger
025949c366
Use switch(os) style consistently. Add a bunch of NetBSD branches.
...
llvm-svn: 134393
2011-07-04 21:59:44 +00:00
Joerg Sonnenberger
e72d9b1f85
On PowerPC, both FreeBSD and NetBSD use ints for (s)size_t
...
llvm-svn: 134392
2011-07-04 21:57:55 +00:00
Anders Carlsson
1052fd76ab
Remove unused parameter from ActOnDeclarator.
...
llvm-svn: 134377
2011-07-04 16:28:17 +00:00
Chandler Carruth
bfb154ad3f
Switch the Decl and Stmt stats printing to use llvm::errs() instead of
...
fprintf, and to be more consistent in formatting with the other stats
printing routines.
llvm-svn: 134374
2011-07-04 06:13:27 +00:00
Chandler Carruth
3c147a7731
Start switching the AST stats printing to use llvm::errs() instead of
...
fprintf. There is more cleanup to be done to the AST stats printing...
llvm-svn: 134373
2011-07-04 05:32:14 +00:00
Abramo Bagnara
9ae292d810
Rewritten fix in r134139 to conform evaluation result to original evaluation context.
...
llvm-svn: 134320
2011-07-02 13:13:53 +00:00
Nick Lewycky
0bdf13ea9a
Fix a typo, remove a tab, canonicalize some spacing. No functional change.
...
llvm-svn: 134305
2011-07-02 02:05:12 +00:00
Douglas Gregor
4326dd9bcc
When producing -Wuninitialized Fix-Its for pointers, prefer " = NULL"
...
over "= 0". Fixes <rdar://problem/9714386>.
llvm-svn: 134302
2011-07-02 00:59:18 +00:00
Eli Friedman
1310c68bb0
Don't use x86_mmx where it isn't necessary.
...
The start of some work on getting -mno-mmx working the way we want it to.
llvm-svn: 134300
2011-07-02 00:57:27 +00:00
Chandler Carruth
42f96b78ec
Make the GCC version proliferation worse by N+1 for the sake of
...
ArchLinux. =/ Fixes PR10246.
llvm-svn: 134299
2011-07-02 00:51:03 +00:00
Eli Friedman
ad811f01d5
Make clang behave in a gcc-compatible way in the presence of multiple flags for the same x86 target feature (e.g. -mno-sse -msse). gcc uses a somewhat unintuitive algorithm here in that the enabled SSE instructions is based on the order of the *last* flag for *each* feature-level, so that "-mno-sse -msse2" only enables SSE2, but "-mno-sse -msse2 -msse" enables all SSE levels.
...
Issue reported on cfe-dev.
llvm-svn: 134296
2011-07-02 00:34:19 +00:00
Eric Christopher
bf15d2b311
Update for llvm commit r134291.
...
Fixes rdar://9714064
llvm-svn: 134292
2011-07-02 00:20:22 +00:00
Chandler Carruth
edc2c64630
Move the Sema argument to all of the Sema-using helper functions in
...
SemaDeclAttr to the first argument. This makes them follow the very
consistent policy elsewhere in Sema for helper functions.
Original patch by Caitlin Sadowski, with some tweaking by me.
llvm-svn: 134290
2011-07-02 00:01:44 +00:00
Chandler Carruth
3ed22c35d6
Rename static helpers to use 'camelCaseNames' per the new style
...
recommendations before adding more of them.
Patch by Caitlin Sadowski.
llvm-svn: 134289
2011-07-01 23:49:16 +00:00
Chandler Carruth
ff4c4f0f8a
Mechanical rename of 'd' Decl pointer parameters to 'D'. This is more
...
conventional in the rest of Clang's codebase, and closer to the current
style recommendations. It also makes the code more internally consistent
as FD, VD, etc are used frequently for particular decl variables.
Patch by Caitlin Sadowski.
llvm-svn: 134288
2011-07-01 23:49:12 +00:00
Argyrios Kyrtzidis
8e25253e14
-Fix mistake in ASTContext::getInnerObjCOwnership noticed by Doug
...
-Remove unnecessary 'return'.
-Remove unnecessary 'if' check (llvm_unreachable make sure attrStr will be non-null)
-Add a test of transferring ownership to a reference cast type.
llvm-svn: 134285
2011-07-01 23:01:46 +00:00
Douglas Gregor
9fabd851c8
Add initial *-*-rtems* target, from Joel Sherrill
...
llvm-svn: 134283
2011-07-01 22:41:14 +00:00
Argyrios Kyrtzidis
451ccc0892
Fix the warning that is emitted when an ownership attribute is applied incorrectly.
...
llvm-svn: 134278
2011-07-01 22:23:09 +00:00
Argyrios Kyrtzidis
9ab661b163
Use transferARCOwnershipToDeclaratorChunk in inferARCWriteback, no functionality change.
...
llvm-svn: 134277
2011-07-01 22:23:05 +00:00
Argyrios Kyrtzidis
ea57a9be17
Fix assertion hit in inferARCWriteback.
...
llvm-svn: 134276
2011-07-01 22:23:03 +00:00
Argyrios Kyrtzidis
7192a3b841
[ARC] When casting from a pointer to an objective-c object with known ownership, if the
...
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:
id x;
(NSString**)&x; // Casting as (__strong NSString**).
llvm-svn: 134275
2011-07-01 22:22:59 +00:00
Argyrios Kyrtzidis
d8701b60f7
-Remove Sema::ActOnCastOfParenListExpr and move most of its functionality to
...
newly introduced Sema::BuildVectorLiteral.
-Make Sema::ActOnCastExpr handle a vector initializer both when the cast'ed expression
is a ParenListExpr and when it is a ParenExpr.
-Ultimately make Sema::ActOnParenOrParenListExpr independent of what the cast type was.
llvm-svn: 134274
2011-07-01 22:22:54 +00:00
Argyrios Kyrtzidis
7451d1cd00
[ARC] When casting from a pointer to an objective-c object with known ownership, if the
...
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:
id x;
static_cast<NSString**>(&x); // Casting as (__strong NSString**).
This currently only works for C++ named casts, C casts to follow.
llvm-svn: 134273
2011-07-01 22:22:50 +00:00
Argyrios Kyrtzidis
e9b5c85041
Break Sema::GetTypeForDeclarator in 2 functions, one for DeclSpec processing and another for the rest.
...
No functionality change.
llvm-svn: 134272
2011-07-01 22:22:42 +00:00
Argyrios Kyrtzidis
774506918c
Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch.
...
llvm-svn: 134271
2011-07-01 22:22:40 +00:00
Douglas Gregor
fa918f69f6
Emit guard variables for any weak global that has a run-time
...
initializer. Previously, we only used guard variables for weak static
data members. Fixes <rdar://problem/9692249>.
llvm-svn: 134266
2011-07-01 21:54:36 +00:00
Douglas Gregor
3b22a88488
When adding boolean keywords for typo correction, add either "bool" or
...
"_Bool" (depending on dialect), but not both, since they have the same
edit distance from "Bool".
llvm-svn: 134263
2011-07-01 21:27:45 +00:00
Douglas Gregor
82e1af20cb
Don't zero-initialize default-initialized local variables that have
...
trivial default constructors. This generated-code regression was
caused by r131796, which had simplified the handling of default
initialization in Sema. Fixes <rdar://problem/9694300>.
llvm-svn: 134260
2011-07-01 21:08:19 +00:00
Richard Trieu
94942b32a3
For code such as:
...
int f(int x) {
if (int foo = f(bar)) {}
return 0;
}
Clang produces the following error messages:
paren_imbalance.cc:2:19: error: use of undeclared identifier 'bar'
if (int foo = f(bar)) {}
^
paren_imbalance.cc:2:26: error: expected ')'
if (int foo = f(bar)) {}
^
paren_imbalance.cc:2:6: note: to match this '('
if (int foo = f(bar)) {}
^
The second error is incorrect. This patch will stop Clang from producing an error on parenthesis imbalance during error recovery when there isn't one.
llvm-svn: 134258
2011-07-01 20:54:02 +00:00
Richard Trieu
95d880933b
Fix for PR7410. Allow functions in a derived class that improperly overwrite a virtual function in the base class to be inserted into the derived class function list to prevent extra errors every time the derived class is used.
...
llvm-svn: 134251
2011-07-01 20:02:53 +00:00
Richard Smith
cd1c055528
Fix AST representations of alias-declarations which define tag types. Inside classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch.
...
llvm-svn: 134250
2011-07-01 19:46:12 +00:00
Douglas Gregor
3cc1581020
When we create a precompiled preamble, don't copy the
...
CompilerInvocation on the stack, because other objects (e.g., the
CompilerInstance) maintain an intrusive reference-counted pointer to
the CompilerInvocation. This doesn't matter in the normal case,
because we take back the CompilerInvocation. However, during crash
recovery, this leads to us trying to free an object on the stack, and
hilarity ensues. Fixes <rdar://problem/9652540>.
llvm-svn: 134245
2011-07-01 18:22:13 +00:00
John McCall
2de1c33f77
Just mangle substituted template parameter types as unresolved types.
...
This is kindof questionable but seems to do more-or-less the right thing.
This is not a particularly friendly part of the ABI.
llvm-svn: 134227
2011-07-01 02:19:08 +00:00