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

20800 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor caff6ea818 Grrrr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:47:48 +00:00
Douglas Gregor f9b14a7af9 Try to de-bork build of WPA
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:47:24 +00:00
Daniel Dunbar f0fe5bc0e4 IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.
- Unfortunately, this requires some horrible code in CGObjCMac which always
   allocats a CGBitFieldInfo because we don't currently build a proper layout
   for Objective-C classes. It needs to be cleaned up, but I don't want the
   bit-field cleanups to be blocked on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:36:35 +00:00
Douglas Gregor 84139d6ef8 Extend the type printing policy to allow one to turn off the printing
of file locations for anonymous tag types (e.g., "enum <anonymous at
t.h:15:6>"), which can get rather long.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:25:31 +00:00
Jeffrey Yasskin e32be1d07c Print the errors when a clang test fails instead of just listing the
failing test files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:20:38 +00:00
Douglas Gregor 3687e9d3a5 Clarify the ownership semantics of the Diagnostic object used by
ASTUnit. Previously, we would end up with use-after-free errors
because the Diagnostic object would be creating in one place (say,
CIndex) and its ownership would not be transferred into the
ASTUnit. Fixes <rdar://problem/7818608>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100464 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:10:19 +00:00
Devang Patel 4800ea6ff8 Emit debug info for objc getters and setters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:09:15 +00:00
Chris Lattner 018b54e5c3 fix PR6780, properly handling the IR {|} escapes in inline asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:44:00 +00:00
Douglas Gregor 8b96253907 Make the ASTUnit constructor private; all ASTUnit clients should be using the static factory functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:20:14 +00:00
Chris Lattner 5c5db553b5 fix PR6782, an accept invalid. We weren't emitting the diagnostic
returned by SetTypeSpecType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100443 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:18:31 +00:00
Douglas Gregor 405634b215 Minor ASTUnit cleanups:
- Rename "Diagnostics" and related to "StoredDiagnostics", to better
  capture what we're actually storing.
  - Move SourceManager and FileManager to the heap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 18:10:21 +00:00
Daniel Dunbar 2eec0b2e3e IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 16:20:44 +00:00
Daniel Dunbar 56229f5889 Add a FIXME and reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 16:20:33 +00:00
Douglas Gregor 09d9fa1933 Code completion results that refer to macros now get the cursor kind
of macro definitions when passed to CIndex. Add test for code
completion of macros via CIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 16:10:30 +00:00
Zhongxing Xu 7b73b92870 Always assume block-level expressions in the caller are alive when analyzing
the callee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 13:16:29 +00:00
Zhongxing Xu b3e485c835 Since now we process regions in clusters when removing dead bindings, this
code can be removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 13:00:12 +00:00
Mon P Wang 3ecd785aff Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100305 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 03:10:52 +00:00
Rafael Espindola 35d646133b Don't produce a vtable for a class if we have an explicit template instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation.
Fixes PR6748



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-03 04:26:42 +00:00
Eric Christopher eea12d17ec Add option and macro definition for AES instructions. Now produces real
assembly for testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100253 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 23:50:19 +00:00
Fariborz Jahanian 05511fa634 Improve diagnosing when a method type does not start with '-'|'+'
when parsing. Fixes radar 7822196.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 23:15:40 +00:00
Daniel Dunbar 61ac1d2749 IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:29:40 +00:00
Daniel Dunbar c7cbed069e Avoid unneeded calls to opt/llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:29:38 +00:00
Daniel Dunbar fae7bf2690 Merge several tests into switch.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 22:29:35 +00:00
Daniel Dunbar e83be12280 IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done.
- This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 21:14:02 +00:00
Daniel Dunbar 27a961a6ad AST: Add ObjCIvarDecl::getContainingInterface().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 21:13:59 +00:00
Fariborz Jahanian 24e14089cc diagnose declaring class extension after its implementation
(radar 7822210).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 20:53:05 +00:00
Chris Lattner e541d01cc8 NewDebugLoc got renamed to DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100219 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 20:21:43 +00:00
Daniel Dunbar a06549226f Sema/Obj-C: Narrow type of ObjCIvarDecl::Create, and check additional invariants on the provided DeclContext.
- Doug, please see the FIXME in DeclObjC.cpp -- I am not sure what the right fix is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 20:10:03 +00:00
Fariborz Jahanian 6aae87d383 Diagnose invalid code with -fobjc-nonfragile-abi2 when
property is being accessed without the dot-syntax notation.
(radar 7822344).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100212 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 20:09:24 +00:00
Daniel Dunbar 29fa69addf Sema/Obj-C: Narrow type, and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100210 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 19:44:54 +00:00
Douglas Gregor b5b3b304a7 We seem to get an inconsistent alignment value in the generated
assembly for the global "d7". We were previously testing for alignment
3, which seems to happen for some builders and not for others. I've
eliminated the alignment check and added a FIXME to unbreak the
buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 19:02:06 +00:00
Mon P Wang c90f56d9f1 Revert r100193 since it causes failures in objc in clang
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 18:43:42 +00:00
Daniel Dunbar a19331f156 Sema/Obj-C: Simplify -- eliminate dead casts & provable asserts, and narrow type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 18:29:09 +00:00
Douglas Gregor 2f59979a7c Rework our handling of copy construction of temporaries, which was a
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.

The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.

This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.

Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 18:24:57 +00:00
Mon P Wang 8facca6caf Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 18:04:30 +00:00
Daniel Dunbar 3a2c80fe4c CG/NeXT: Assert some invariants on an ivar's containing decl context that I am about to refactor based on, following some testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 15:43:29 +00:00
Anders Carlsson bcc12fdaa7 If a constructor is a dependent context, just set the base and member initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100180 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 06:26:44 +00:00
Anders Carlsson ea356fb65c Diagnose multiple base and member initializers in class templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 05:42:15 +00:00
Anders Carlsson ec3332bcae More cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 03:43:34 +00:00
Anders Carlsson 071d61043a Constify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 03:38:04 +00:00
Anders Carlsson 58cfbdef4d Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100173 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 03:37:03 +00:00
Chandler Carruth 47c24b1d94 Resolve a layering violation by making AddTaggedVal public for
PartialDiagnostic objects, and hoisting the stream operator for QualType into
Type.h with the operator for the normal DiagnosticBuilder. Also remove the no
longer needed friend declaration for the DeclarationName stream operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100169 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 01:39:03 +00:00
John McCall 7bbe5f6bfc Check in a motivating test for the revised access semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:11:49 +00:00
John McCall db73c684ba Correct the calculation of access to more closely model the wording in
the standard.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:03:43 +00:00
Ted Kremenek 26ad5c0858 Update analyzer build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100153 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 23:25:38 +00:00
Douglas Gregor 1927b1f1d3 Minor cleanup with the ternary operator
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 22:47:07 +00:00
Fariborz Jahanian 699fca2d7a Relax the typesafty rules of block pointers types which
take'id' or return 'id' in their type. Fixes radar 7814131.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 19:50:22 +00:00
Douglas Gregor b7a0926020 Overhaul checking of non-type template arguments that should refer to
an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.

Fixes PR6563 and PR6749.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 18:32:35 +00:00
Daniel Dunbar 5d93ed3c7a Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 18:21:41 +00:00
Daniel Dunbar 12c0ade49d Fix -Asserts warning, and protect against missing case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100115 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 16:50:48 +00:00