Francois Pichet
9f4f2078d6
Microsoft's __uuidof operator implementation part 1.
...
llvm-svn: 113356
2010-09-08 12:20:18 +00:00
Francois Pichet
4ad4b58639
Allow type definitions inside anonymous struct/union in Microsoft mode.
...
llvm-svn: 113354
2010-09-08 11:32:25 +00:00
Sebastian Redl
02f1eebdc0
Don't give 'global constructor' warnings for function statics, even if they have a direct initializer. Fixes PR8095.
...
llvm-svn: 113344
2010-09-08 04:46:19 +00:00
John McCall
83556c1a80
Put the tautological-comparison-of-unsigned-against-zero warnings in
...
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.
Restoration of r112877.
llvm-svn: 113334
2010-09-08 02:01:27 +00:00
John McCall
68ff03728a
Implement ARM static local initialization guards, which are more compact than
...
Itanium guards and use a slightly different compiled-in API.
llvm-svn: 113330
2010-09-08 01:44:27 +00:00
Sebastian Redl
a190d3605f
Allow (cv) void and incomplete arrays to be passed to the type traits.
...
Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard.
llvm-svn: 113326
2010-09-08 00:48:43 +00:00
Gabor Greif
80c218386f
add a fixit when 'main' does ot return 'int'; review welcome
...
llvm-svn: 113324
2010-09-08 00:31:13 +00:00
Douglas Gregor
2b88c115f9
Provide proper type-source location information for
...
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.
llvm-svn: 113319
2010-09-08 00:15:04 +00:00
Fariborz Jahanian
366a94822b
Local static block variable referecned in its
...
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).
llvm-svn: 113307
2010-09-07 23:26:17 +00:00
Daniel Dunbar
53c9ac30f9
tests: Use -ffreestanding when including stdint.h, to avoid platform dependencies.
...
llvm-svn: 113301
2010-09-07 22:54:28 +00:00
Ted Kremenek
41994fd45d
Fix DeclPrinter to not include '=' in printing when no initializer is provided for a VarDecl. Patch by Jim Goodnow II!
...
llvm-svn: 113296
2010-09-07 22:21:59 +00:00
Gabor Greif
7af952801e
typo
...
llvm-svn: 113295
2010-09-07 22:17:12 +00:00
Douglas Gregor
0744ef6371
Improve source-location information for CXXNewExpr, by hanging on to
...
the TypeSourceInfo for the allocated type. Fixes PR7501.
llvm-svn: 113291
2010-09-07 21:49:58 +00:00
Ted Kremenek
aba4958db2
Fix null pointer dereference in StreamChecker::Fseek (reported in PR 8081) and simplify surrounding checking logic.
...
llvm-svn: 113282
2010-09-07 20:45:26 +00:00
Tom Care
bc9eaef24c
Re-enabled truncation/extension checking in IdempotentOperationChecker and added a test case.
...
llvm-svn: 113269
2010-09-07 20:27:56 +00:00
Douglas Gregor
e9b76c2a41
Add function attributes to the output of -ast-print-xml, from Martin Vejnar!
...
llvm-svn: 113266
2010-09-07 20:16:43 +00:00
Fariborz Jahanian
535618b927
get rid of a warning.
...
llvm-svn: 113256
2010-09-07 19:57:04 +00:00
Fariborz Jahanian
56603ef7b2
Have Sema check for validity of CGString literal
...
instead of asserting in IRGen. Fixes radar 8390459.
llvm-svn: 113253
2010-09-07 19:38:13 +00:00
Dale Johannesen
8499f47ef4
Allow 'o' and 'V' as constraints for output asm operands.
...
Allow '<' and '>' as constraints for input or output.
llvm-svn: 113246
2010-09-07 18:40:41 +00:00
John McCall
1ca73da0e6
Improve error recovery when we see ':' and expect a ';'.
...
I, at least, make this typo all the time.
llvm-svn: 113243
2010-09-07 18:31:03 +00:00
Dale Johannesen
2002e1f1bf
Adjust a test that's expecting optimizations to be done
...
on MMX palignr; we don't do this for the intrinsics.
llvm-svn: 113234
2010-09-07 18:11:53 +00:00
Daniel Dunbar
3d7e0e2c6b
Driver/Darwin: Catch another case where ld ends up using ld_classic.
...
llvm-svn: 113226
2010-09-07 17:50:41 +00:00
Daniel Dunbar
1eaf5c6abb
Driver/Darwin: Don't pass -demangle to the linker when we know it is going to
...
use ld_classic. This is a temporary workaround, the linkr itself should handle
this.
llvm-svn: 113212
2010-09-07 17:07:49 +00:00
Douglas Gregor
a7d6e3d0f5
Provide a specific diagnostic when trying to redefine an "extern
...
inline" function outside of GNU89 mode. Fixes
<rdar://problem/6880464>.
llvm-svn: 113204
2010-09-07 15:51:01 +00:00
Douglas Gregor
45d6bdfa88
Improve recovery when there is a stray ']' or ')' before the ';' at
...
the end of a statement. Fixes <rdar://problem/6896493>.
llvm-svn: 113202
2010-09-07 15:23:11 +00:00
Douglas Gregor
ce66d02877
Improve recovery when a comma is missing between enumerators in an
...
enumeration definition. Fixes <rdar://problem/7159693>.
llvm-svn: 113201
2010-09-07 14:51:08 +00:00
Douglas Gregor
3465e26102
Improve diagnostic and recovery when missing a comma between base or
...
member initializers in a C++ constructor. Fixes <rdar://problem/7796492>.
llvm-svn: 113199
2010-09-07 14:35:10 +00:00
Benjamin Kramer
25f9ea6f0a
Replace loops with SmallVector::append.
...
llvm-svn: 113185
2010-09-06 23:43:28 +00:00
Chris Lattner
03483613c2
Due to asmparser improvements, this error message is now better
...
llvm-svn: 113177
2010-09-06 22:09:27 +00:00
Argyrios Kyrtzidis
d05f3e3730
Fix a C++ PCH problem which was exposed by r113019. CXXBaseOrMemberInitializer's IsWritten and source order is not set.
...
llvm-svn: 113161
2010-09-06 19:04:27 +00:00
Chris Lattner
d7ff9f91bf
remove curly quotes, patch by Dimitry Andric!
...
llvm-svn: 113156
2010-09-06 17:52:29 +00:00
Argyrios Kyrtzidis
2fdb5b5955
LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
...
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).
llvm-svn: 113154
2010-09-06 12:00:10 +00:00
Zhongxing Xu
33dfc07b00
FinishBlock() is essentially doing nothing except returning '!badCFG'.
...
llvm-svn: 113149
2010-09-06 07:32:31 +00:00
Zhongxing Xu
b1e10aa670
Simplify CFG construction: bail out early when we have a bad CFG.
...
llvm-svn: 113148
2010-09-06 07:04:06 +00:00
Rafael Espindola
b2d0d40c3d
Make "-ccc-cxx" option work on Linux.
...
Patch by nobled.
I also took the opportunity to make the field private since now it is only ready from the
outside.
llvm-svn: 113138
2010-09-06 02:36:23 +00:00
Eli Friedman
08e3cdcffa
Get rid of unnecessary return.
...
llvm-svn: 113132
2010-09-06 00:31:37 +00:00
Eli Friedman
abebebf742
Update test for r113128.
...
llvm-svn: 113131
2010-09-06 00:30:50 +00:00
Chris Lattner
52bcf96384
move the hackaround for PR6537 to catch unions as well,
...
fixing the ICE in PR7151
llvm-svn: 113130
2010-09-06 00:13:11 +00:00
Chris Lattner
f53c096813
clean up some formatting.
...
llvm-svn: 113129
2010-09-06 00:11:41 +00:00
Eli Friedman
0b1fbd1394
PR7242: Make sure to use a different context for evaluating constant
...
initializers, so the result of the evaluation doesn't leak through
inconsistently. Also, don't evaluate references to variables with
initializers with side-effects.
llvm-svn: 113128
2010-09-06 00:10:32 +00:00
Chris Lattner
ee8df8f167
fix PR7192 by defining wchar_t in a more conventional way. The
...
type of L"x" can change based on command line arguments.
llvm-svn: 113127
2010-09-05 23:29:49 +00:00
Steven Watanabe
2ba828f36d
Tell the VS headers that char16_t and char32_t are keywords, so yvals.h doesn't try to define them as typedefs.
...
llvm-svn: 113126
2010-09-05 23:16:22 +00:00
Chris Lattner
f0b0497343
fix 7320: we can't delete a trailing space if it doesn't exist.
...
llvm-svn: 113125
2010-09-05 23:16:09 +00:00
Eli Friedman
8ed2bac65d
PR8023: Don't crash on invalid uses of __real__ on class types in C++.
...
llvm-svn: 113124
2010-09-05 23:15:52 +00:00
Nick Lewycky
1b36b55f89
No functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
...
David Vandevoorde's name correctly.
llvm-svn: 113103
2010-09-05 03:40:33 +00:00
Chris Lattner
938cebc076
"const id<NSFoo> *" instead of "id<NSFoo> const *".
...
I think this wraps up all the legal cases.
llvm-svn: 113096
2010-09-05 00:43:21 +00:00
Chris Lattner
edead1266e
"const id<NSFoo> *" not "id<NSFoo> const*"
...
llvm-svn: 113095
2010-09-05 00:36:44 +00:00
Chris Lattner
7f2c7f4ef3
"const std::vector<int>*" not "std::vector<int> const*"
...
llvm-svn: 113094
2010-09-05 00:27:00 +00:00
Chris Lattner
c4bf372e43
"const _Complex float *" not "_Complex float const *"
...
llvm-svn: 113093
2010-09-05 00:22:25 +00:00
Chris Lattner
24b89469ac
'const std::type_info*' instead of 'std::type_info const*'
...
llvm-svn: 113092
2010-09-05 00:17:29 +00:00