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

1396 Коммитов

Автор SHA1 Сообщение Дата
Eli Friedman 8de8d1d3f2 Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 16:02:46 +00:00
Sebastian Redl cee63fbf0e Handle new by passing the Declaration to the Action, not a processed type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 14:43:59 +00:00
Douglas Gregor 26236e8b75 A little more scaffolding for parsing templates:
- Template parameter scope to hold the template parameters
  - Template parameter context for parsing declarators
  - Actions for template type parameters and non-type template
    parameters



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 00:41:28 +00:00
Douglas Gregor adcac8824a Basic support for parsing templates, from Andrew Sutton
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 23:54:00 +00:00
Douglas Gregor bec1c9d6f3 Objective-C keywords are not always identifiers. Some are also C++ keywords
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 21:46:47 +00:00
Douglas Gregor ec0bf0500c Fix RUN line
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 21:17:52 +00:00
Douglas Gregor b65f2425e9 Test blocks in C++ mode
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 19:48:06 +00:00
Daniel Dunbar 5bea06ad9e Add test case for __ASSEMBLER__ definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 19:23:47 +00:00
Douglas Gregor 473e70de24 Make sure __null test runs in both 32- and 64-bit. Thanks Anders
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60360 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 18:05:11 +00:00
Douglas Gregor a4745616eb Parse the exception-specification throw(...), a Microsoft extension
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60359 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 18:00:20 +00:00
Douglas Gregor ac72d40340 Add the test for __null
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60357 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 17:31:21 +00:00
Anders Carlsson 4cfc6fe9ed Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 06:27:38 +00:00
Anders Carlsson 4000ea685a Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60319 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:17:22 +00:00
Anders Carlsson d3a61d5ec5 Use VerifyIntegerConstantExpression for case values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:13:02 +00:00
Zhongxing Xu 34a83474c8 remove a test case that causes compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60282 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 05:59:27 +00:00
Zhongxing Xu 27cae9e327 Add test for initializing array with string literal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60281 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 05:51:19 +00:00
Douglas Gregor 7ca09760ee Add implicit conversions for Objective-C qualified ids, e.g.,
id<P0>

The intended overloading behavior of these entities isn't entirely
clear, and GCC seems to have some strange limitations (e.g., the
inability to overload on id<P0> vs. id<P1>). We'll want to revisit
these semantics and determine just how Objective-C++ overloading
should really work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-27 01:19:21 +00:00
Douglas Gregor 0f669f54f1 Test conversion from apointer to incomplete type to void* in C++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60131 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 23:33:36 +00:00
Douglas Gregor cb7de523cc Implement implicit conversions for Objective-C specific types, e.g.,
converting a pointer to one Objective-C interface into a pointer to another
Objective-C interface, and conversions with 'id'. The semantics seems
to match GCC, although they seem somewhat ad hoc.

Fixed a few cases where we assumed the C++ definition of isObjectType,
but were getting the C definition, causing failures in trouble with
conversions to void pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 23:31:11 +00:00
Fariborz Jahanian b2eb0b494c Another test for property code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60128 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 23:20:29 +00:00
Fariborz Jahanian 6010bca98a Code gen for aggregate-valued properties and a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60122 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 22:36:09 +00:00
Fariborz Jahanian b16308f1b3 Removed a FIXME. Added a test case for anonymous category.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60115 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 20:33:54 +00:00
Fariborz Jahanian 8cf0bb3c2a Set default property attributes on each property.
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in 
propgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60114 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 20:01:34 +00:00
Anders Carlsson 4d6e8dd587 Convert incomplete array types before emitting debug info for them, fixes PR3134.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60109 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 17:40:42 +00:00
Nuno Lopes a8a6ef82ce add missing RUN lines
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60107 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 15:50:12 +00:00
Douglas Gregor 7ffd0defb9 Fix a minor typo in the handling of the conditional operator for Objective-C interface pointers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60096 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 06:43:45 +00:00
Anders Carlsson ad3d6917da Handle returning complex types that get coerced. Fixes PR3131
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60058 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 22:21:48 +00:00
Fariborz Jahanian 6669db9d80 Patch to allow over-riding of readonly property to
a writable property in one of its category.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 17:56:43 +00:00
Douglas Gregor c83ed049af Test another error message, make sure to verify C++ new and delete tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 04:08:05 +00:00
Douglas Gregor 0fe7bea6fc Simple parsing of exception specifications, with no semantic analysis yet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 03:22:00 +00:00
Zhongxing Xu 661fc39abc Add documentation for test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-25 01:45:11 +00:00
Zhongxing Xu 33d7cbfc0a Add no-warning to test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 23:45:56 +00:00
Fariborz Jahanian e793a6ec16 Patch to remove bogus waring when a property declaration
is imported from a protocol into the implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 22:16:00 +00:00
Chris Lattner d162584991 Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first.  This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 06:25:27 +00:00
Chris Lattner d9d22dd9c9 Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName().  This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 05:29:24 +00:00
Anders Carlsson e8a32b855c Reimplement Expr::isConstantExpr in terms of Expr::Evaluate. This fixes PR2832.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 05:23:59 +00:00
Zhongxing Xu 4b89e034a7 Strings are NULL terminated. So the region size should plus one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 05:16:01 +00:00
Anders Carlsson f2e8d98f7a Forgot the newline :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 05:13:45 +00:00
Anders Carlsson 338f858b17 Add test case for bug that's been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 05:11:21 +00:00
Anders Carlsson 35873c49ad The address of a variable is only constant if the variable has global storage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 04:41:22 +00:00
Anders Carlsson 4bbc0e05a7 Fix bug in the constant evaluator. Fixes PR3115.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59938 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 04:21:33 +00:00
Chris Lattner 8ec03f58c3 Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier.  Update callers to do the right
thing and avoid this method in unsafe cases.  This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 03:54:41 +00:00
Zhongxing Xu 20f0178a23 Add test case for out-of-bound memory access checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59931 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 02:19:49 +00:00
Chris Lattner 0947b4e6c7 Rewrite FindDiagnostics to be more strict about the formatting of the
expected-foo strings.  Now the only allowed characters between 
expected-error and {{  is whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 01:28:17 +00:00
Chris Lattner b2c8c55d81 clean up -verify mode output. If the expected-error string is
mangled, report it using the diagnostics machinery instead of printf.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 23:38:26 +00:00
Chris Lattner 1326a3dcbb convert some more warnings to NOTEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 23:26:13 +00:00
Chris Lattner 8b265bd5eb remove warn_previous_declaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 23:20:13 +00:00
Chris Lattner 28eb7e992b make the 'to match this' diagnostic a note.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59921 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 23:17:07 +00:00
Chris Lattner 5f4a6829dc Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 23:12:31 +00:00
Chris Lattner b8b96aff63 make some objc redefinition warnings more consistent: call definitions
"definitions", not declarations.  Point out the location of the 
original definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-23 22:46:27 +00:00