Commit Graph

25502 Commits

Author SHA1 Message Date
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
Chris Lattner 9dd55103c1 print "const intptr_t" instead of "intptr_t const"
llvm-svn: 113091
2010-09-05 00:07:29 +00:00
Chris Lattner 53fa04909c make clang print types as "const int *" instead of "int const*",
which is should have done from the beginning.  As usual, the most
fun with this sort of change is updating all the testcases.

llvm-svn: 113090
2010-09-05 00:04:01 +00:00
Chris Lattner 1c2cc0adba revert this, it isn't safe.
llvm-svn: 113088
2010-09-04 23:43:40 +00:00
Chris Lattner 5ad6bc6f35 tidy up
llvm-svn: 113087
2010-09-04 23:37:43 +00:00
Chris Lattner edbdff64c7 revise r112365 to fix the actual problem: the isa<TagType>(Underlying)
check in the "typedef for anonymous type" check should have been a
getAs.

llvm-svn: 113085
2010-09-04 23:16:01 +00:00
Fariborz Jahanian 60babfb8a1 Casting of a property reference to 'void' did not
generate the necessary code. This patch fixes it.
// rdar://8389655

llvm-svn: 113079
2010-09-04 19:49:18 +00:00
Chris Lattner a3d232ad27 zap more dead code.
llvm-svn: 113076
2010-09-04 18:19:08 +00:00
Chris Lattner 9795b39113 zap dead code.
llvm-svn: 113074
2010-09-04 18:12:20 +00:00
John McCall 2917bd0fb4 Petty optimization.
llvm-svn: 113049
2010-09-04 01:26:37 +00:00
Zhanyong Wan 18ca8bf850 fix a crash in RecursiveASTVisitor's child classes (PR8403); reviewed by chandlerc.
llvm-svn: 113038
2010-09-03 23:50:56 +00:00
Douglas Gregor 09c0eb1510 Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!

llvm-svn: 113033
2010-09-03 23:30:36 +00:00
Fariborz Jahanian 087206dbcd Truncate block variable of bool type to i1 when its
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).

llvm-svn: 113027
2010-09-03 23:07:53 +00:00
Chandler Carruth f92bd8cf22 Fix PR7402 when it strikes via template instantiation.
llvm-svn: 113019
2010-09-03 21:54:20 +00:00