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

210 Коммитов

Автор SHA1 Сообщение Дата
Jakob Stoklund Olesen b7ec67a43d Clang should not warn on code in clang that is only there to remove warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122941 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-06 01:37:28 +00:00
Abramo Bagnara c4bf2b9afb Introduced raw_identifier token kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 08:23:18 +00:00
Michael J. Spencer d5b08bee79 Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 04:13:32 +00:00
Abramo Bagnara 723df24530 Added missing IgnoreParens().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-14 22:11:44 +00:00
John McCall e23cf437fe Restore r121752 without modification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-14 08:05:40 +00:00
John McCall 5bfe232d1f Pull out r121752 in case it's causing the selfhost breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-14 07:30:51 +00:00
John McCall 0e88aa7100 Factor out most of the extra state in a FunctionProtoType into a separate
class to be passed around.  The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121752 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-14 06:51:39 +00:00
Argyrios Kyrtzidis f40f0d5a38 Keep the source location of the selector in ObjCMessageExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:08:27 +00:00
Fariborz Jahanian 3cd1ea32c3 Fix rewriter to match recent changes in property ref
AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-04 21:22:13 +00:00
John McCall 12f78a6741 Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 01:19:52 +00:00
Michael J. Spencer 03013fa9a0 Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:12:39 +00:00
Nico Weber 59b173d81b Minor whitespace fix, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119965 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-22 10:26:41 +00:00
Argyrios Kyrtzidis dea22a399d Keep track of errors/warnings in FixItRewriter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 21:13:54 +00:00
Argyrios Kyrtzidis 33e4e70c8c Refactoring of Diagnostic class.
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
   SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 20:06:41 +00:00
John McCall 0943168ac1 Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 19:01:18 +00:00
John McCall f89e55ab1b Calculate the value kind of an expression when it's created and
store it on the expression node.  Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.

Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 06:31:45 +00:00
John McCall a5bbc50b1e Kill CK_Unknown references in the ObjC rewriter. The actual
choice of cast doesn't matter here, but I've tried to choose
the right one anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 09:46:46 +00:00
Fariborz Jahanian da4ad9fa26 Fixes a rewrite bug, rewriting nested property usage
inside blocks. Fixes //rdar: //8608293.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 18:37:50 +00:00
Fariborz Jahanian 8188e5f636 Proper rewriting of block envokation with
qualified ObjC pointer types in its argument list.
// rdar: //8608902


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118286 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 18:34:46 +00:00
Fariborz Jahanian 06de2cfe0b Fixes a rewriting bug when type in a block argument type
is a objc qualified class type. // rdar: //8608902


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118208 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 23:50:34 +00:00
Fariborz Jahanian e985d01390 Patch to rewrite objc qualified types which occur in
block pointer type arguments. Partial fix for 
// rdar: //8608902


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 23:29:24 +00:00
Nick Lewycky 7e7492442f Correct typos and whitespace, spotted by Nico Weber!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117871 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-31 21:07:24 +00:00
Benjamin Kramer 79ba2a6379 More class anonymization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-22 16:48:22 +00:00
Fariborz Jahanian e0f8386359 Fixes a potential crash in rewriter when sending message
to 'super'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 16:07:20 +00:00
Duncan Sands 54bd457776 GCC 4.4 warns that Receiver may be used uninitialized in this function.
As far as I can see, gcc is right to think this!  The following change
will cause a nice segfault rather than undefined behaviour if this case
occurs.  Someone who understands what this code is supposed to do should
probably take a proper look.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 08:21:16 +00:00
Fariborz Jahanian ec3683b3f3 Do not rewrite new accessor if user has defined accessors.
Fixes //rdar: // 8570020.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116882 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 23:47:54 +00:00
Ted Kremenek 3b562af1b3 Silence uninitialized value warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116877 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 23:10:22 +00:00
Fariborz Jahanian 2d8c1fdef9 Fix a rewriting bug of rewriting properties declared in
protocols. // rdar: //8558702


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-16 00:29:27 +00:00
Fariborz Jahanian f2c6fa4eca Rewrite bug fix rewriting a property assignment when
its RHS is an ivar. Fixes //rdar: //8541517.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116539 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 23:31:39 +00:00
Fariborz Jahanian 8ac2d44982 Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 16:04:05 +00:00
Fariborz Jahanian 8537f7b494 Some refactoring of property rewriting stuff
in rewriter. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 22:21:03 +00:00
Fariborz Jahanian f2ad2c9272 This patch does a few things in the area of objective-c
properties.
1. Generates the AST for lexical info. of accessing 
   getter/setter methods using dot-syntax notation.
   This fixes //rdar: //8528170.
2. Modifes rewriter to handle the AST putout in 1.
3. Supportes in rewriter ObjCImplicitSetterGetter ASTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:29:12 +00:00
Fariborz Jahanian 90fe4bc75d When dealing with an assignment with LHS being a property reference
expression, the entire assignment tree is rewritten into a property
setter messaging. This includes rewriting the RHS. 
Do not attempt to rewrite RHS again. Never rewrite a rewritten text!
Fixes //rdar: //8527018.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 21:12:22 +00:00
Fariborz Jahanian 92c8568856 Fix a block rewriter bug where copy/dispose entries in
block descriptor for outer block was missing even though
the block was importing objects into its inner blocks.
//rdar://84995992


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 18:05:06 +00:00
Fariborz Jahanian 24f9cab928 Rewriting array element type of qualified-id.
Fixes rdra://8475819.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30 20:41:32 +00:00
Fariborz Jahanian 07acdf4c77 Fix rewriting of property declared in @protocol's.
Fixed //rdar://8472487.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114741 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24 18:36:58 +00:00
Michael J. Spencer 560a921b85 Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
This reverts commit r113631

Conflicts:

	CMakeLists.txt
	lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 23:54:41 +00:00
Michael J. Spencer 5a7f34958c CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:13:16 +00:00
Douglas Gregor ec9bf47565 Clean up CMake dependencies
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 15:44:58 +00:00
Douglas Gregor bfae8bd625 Clean up some of the CMake dependencies
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 21:40:53 +00:00
Chris Lattner 24dce6ef2f zap more dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-04 18:19:08 +00:00
Chris Lattner fae962200e "I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's useful


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 04:34:38 +00:00
Fariborz Jahanian f9b949fecf AST work to support [C++] [IRgen] for ?: with missing LHS
This is also pr7726 and wip. No change in functionality
at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-31 18:02:20 +00:00
Douglas Gregor 40a9168928 Fix CMake dependencies
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-30 14:31:03 +00:00
Argyrios Kyrtzidis 9996a7f06a Fix the memory leak of FloatingLiteral/IntegerLiteral.
For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers.
Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
the APFloat/APInt values will never get freed.
I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral.

Fixes rdar://7637185

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 09:06:06 +00:00
John McCall d931b08698 De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 03:08:43 +00:00
John McCall 2de56d1d0c GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 11:45:40 +00:00
John McCall 5baba9d983 More incremental progress towards not including Expr.h in Sema.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 10:28:54 +00:00
Douglas Gregor 2e3741760f Fix crasher with IgnoringDiagClient
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 23:03:13 +00:00
Douglas Gregor bdbb004f38 Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111437 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:29:43 +00:00