Граф коммитов

4732 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek b951d9dee5 Remove some old text.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54095 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 05:21:44 +00:00
Chris Lattner 06036d3709 Pull protocol resolution of out ActOnStartClassInterface, this is also the
last client of the old ParseObjCProtocolReferences, so it also removes it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 04:13:19 +00:00
Chris Lattner 6bd6d0b9d8 refactor protocol resolution out of ActOnStartCategoryInterface
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54093 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 04:07:02 +00:00
Chris Lattner e13b9595dc pull protocol resolution out into ActOnStartProtocolInterface.
This temporarily duplicates ParseObjCProtocolReferences, but it
will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 04:03:38 +00:00
Chris Lattner eacc39212e simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 03:47:43 +00:00
Chris Lattner e281c86515 remove duplicate error message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54090 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 03:40:25 +00:00
Chris Lattner f3948c41ca < only starts a declspec in objc mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54089 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 03:38:44 +00:00
Chris Lattner fc416a4e0d remove fixed fixme
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 01:56:46 +00:00
Chris Lattner ae4da6150b make DeclSpec manage its own protocol qualifier list memory instead of having
clients allocate the memory and it delete it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 01:53:50 +00:00
Chris Lattner 3bd934a624 Fix hte next wave of problems with protocol qualified ID:
1) reject stuff like "id<foo> short" and "<foo> short".  2) set
the declspec range correctly 3) only parse protocol qualifiers
when in objc mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54086 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 01:18:38 +00:00
Chris Lattner 666871a826 remove objc prefixes from these tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54085 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 01:04:40 +00:00
Chris Lattner 6ac6ddc861 move all objc sema tests into a new SemaObjC directory. Next step is to
remove the objc- prefix from the tests that use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54084 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 00:57:24 +00:00
Chris Lattner 62f5f7ffad fix several problems with the protocol qualified id handling where id was implicit.
First, fix canonical type handling of these, since protocol qualified id's are always
canonical.  Next, enhance SemaType to actually make these when used (instead of int)
allowing them to actually be used when appropriate.  Finally remove a bunch of logic
relating to the mishandling of canonical types with protocol-qual id's.  This fixes
rdar://5986251


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 00:46:50 +00:00
Chris Lattner bce6135441 improve handling of the horrible GCC objc extension that treats "<foo>"
like "id<foo>".  This 1) fixes an infinite loop in the parser on things
like "short<foo>" 2) emits a warning about this bogus construct and 3)
changes the testcase to be substantially reduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54082 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 00:20:22 +00:00
Chris Lattner 844cef32e4 add a new diag helper that takes a range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-26 00:16:04 +00:00
Chris Lattner 02a65146aa GCC supports the complex conjugate operator (an extension) on complex int
as well as complex float. rdar://6097730


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54080 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:52:49 +00:00
Chris Lattner d67cd9ef4c fix diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:41:08 +00:00
Chris Lattner 1e9660e1fb Fix rdar://6103124, the only dummy blocks are ones without names. Named blocks
are important part of control flow structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54078 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:40:10 +00:00
Ted Kremenek ffc8a6172e Added project idea for a doxygen-like tool built using clang
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:34:29 +00:00
Chris Lattner 7c4a191d8b fix 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54075 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:30:42 +00:00
Chris Lattner 834a72ac74 Fix rdar://6095136, various crashes with incomplete enum types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:18:17 +00:00
Chris Lattner e8e4f928e5 minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54073 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:07:18 +00:00
Daniel Dunbar fb754b6db2 Remove unused ASTConsumer::HandleTopLevelDeclaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54071 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 22:39:30 +00:00
Chris Lattner 05faf17d45 move a method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54069 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 22:25:12 +00:00
Chris Lattner 32b62b6c68 Fix a couple bugs in aggregate cast processing: 1) fix precedecence
problem with &&/||.  2) use canonical types for comparison instead 
of raw types. 3) emit an ext-warn for a gnu extension.

Also simplify the code to make it less nested.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 22:06:10 +00:00
Ted Kremenek 9801c8b47a Format string errors should underling the format string, not the function name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54067 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 22:03:03 +00:00
Chris Lattner bb280a482b make sizeof/alignof diagnostics highlight their operand with a sourcerange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54066 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 21:45:37 +00:00
Chris Lattner 67d33d8535 c89 does not perform array -> pointer promotion unless the array is an lvalue. This
is different than C99.  This fixes the rest of rdar://6095180.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54064 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 21:33:13 +00:00
Chris Lattner e7a2e91ac6 move some code, no other change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54063 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 21:10:04 +00:00
Ted Kremenek 2ecc0cf59d Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54060 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 21:05:04 +00:00
Daniel Dunbar 0d834b1cfb Fix long double test case
- Had wrong sizeof(long double) encoded into test case
 - Results now agree with llvm-gcc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54059 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:54:30 +00:00
Chris Lattner 53fcaa9409 In c99 mode, comma does do function/array promotion even though
it does not do unary promotions (like short->int).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54058 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:54:07 +00:00
Ted Kremenek be57c3a3fe Refine ObjCPropertyImplDecl:
- Remove a bunch of setXXX methods until we actually need them. This cleans up the
interface, and makes the object immutable until we have a reason to be mutable.

- Remove enum value OBJC_PR_IMPL_None since it was never used.

- Remove instance variable 'PropertyImplKind PropertyImplementation;'. This is
  not needed because we can tell if ObjCPropertyImplDecl represents @synthesize
  if 'ObjCPropertyDecl *PropertyDecl' is not null.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54055 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:43:38 +00:00
Ted Kremenek bde3a05193 Enabled 'unused ivars' check by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:35:01 +00:00
Ted Kremenek f19f911916 Remove '.' in expected warning
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54051 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:30:34 +00:00
Ted Kremenek 694eefb745 Have the UnusedIvar check skip ivars with setters/getters created by @synthesize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:28:02 +00:00
Nate Begeman abfaf9984e X86 builtin fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:17:24 +00:00
Nate Begeman 7a66d7b6c0 Generate vector compares in codegen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:16:05 +00:00
Nate Begeman 69ce1dff4a Move comment to match style
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54047 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:15:41 +00:00
Nate Begeman 82354bcedd De-tabify
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:15:14 +00:00
Chris Lattner 080b332959 Comma does not perform unary promotions, rdar://6095180
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 20:02:29 +00:00
Chris Lattner 3872b5cadd gcc requires a semicolon at the end of an interface, unlike its extension for structs.
rdar://6095245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54044 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 19:54:55 +00:00
Steve Naroff 7c778f1c54 Cleaunup Sema::ActOnClassMessage(). This commit:
(a) removes a bogus warning.
(b) removes an undesirable usage of the ObjCMessageExpr constructor that takes an IdentifierInfo * (which I will abolish).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54042 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 19:39:00 +00:00
Chris Lattner 99cb9976ef Reject typedef redefinitions when the underlying types are not identical,
even if in a system header etc.  rdar://6079937



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54038 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:44:27 +00:00
Chris Lattner 806c3b9478 update this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54037 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:42:46 +00:00
Daniel Dunbar 4f97e019ba Add test case for hex floating point constants in < C99 mode
- For: rdar://6096838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:41:57 +00:00
Chris Lattner 6ea623823f In c89 mode accept hex fp constants as an extension:
t2.c:1:17: warning: hexadecimal floating constants are a C99 feature
long double d = 0x0.0000003ffffffff00000p-16357L;
                ^

instead of emitting a weird error message that doesn't make sense:

t2.c:1:41: error: hexadecimal floating constants require an exponent
long double d = 0x0.0000003ffffffff00000p-16357L;
                                        ^

rdar://6096838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:18:34 +00:00
Ted Kremenek a95acd672d Remove call to isSEL and isSEL itself since the call is dead (isObjCObjectPointerType() will never return true for selectors).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:17:35 +00:00
Chris Lattner baf0d66784 Add support for __extension__ as an lvalue. rdar://6097308
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 18:07:19 +00:00
Steve Naroff 394f3f483f Move fix in r54013 from the parser to sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54032 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 17:57:26 +00:00