Commit Graph

9284 Commits

Author SHA1 Message Date
Fariborz Jahanian a386d9533b Assortment of property attributes declared in continuation
class must match those of same property declared
in its primary class. (Fixes radar 7352425)

llvm-svn: 85843
2009-11-03 00:01:38 +00:00
Mike Stump 31e1d43729 Add basic codegen for thunks that return values.
llvm-svn: 85842
2009-11-02 23:47:45 +00:00
Mike Stump 33ccd9e354 Refine codegen for thunks.
llvm-svn: 85839
2009-11-02 23:22:01 +00:00
Ted Kremenek fac290d359 Remove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().
llvm-svn: 85838
2009-11-02 23:19:29 +00:00
Fariborz Jahanian de8db16a7d Property declared in continuation class can only be used to
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).

llvm-svn: 85836
2009-11-02 22:45:15 +00:00
John Thompson ac0b098d4d Added __has_include and __has_include_next.
llvm-svn: 85834
2009-11-02 22:28:12 +00:00
Daniel Dunbar 1e6add1fbb Remove unused header.
llvm-svn: 85828
2009-11-02 22:11:26 +00:00
Chris Lattner 3fab58d867 clean up namespace.
llvm-svn: 85826
2009-11-02 21:48:09 +00:00
Edward O'Callaghan 06231460b3 Add note to FIXME about PR5371.
llvm-svn: 85825
2009-11-02 21:25:11 +00:00
Fariborz Jahanian ec344ed2f5 Diagnose implementation of a property declared in a category
in its class implementation instead of crashing. Fixes radar 7350345.

llvm-svn: 85813
2009-11-02 18:45:36 +00:00
Douglas Gregor 0840cc02ce When determining whether a reference to a static data member is an
integral constant expression, make sure to find where the initializer
was provided---inside or outside the class definition---since that can
affect whether we have an integral constant expression (and, we need
to see the initializer itself).

llvm-svn: 85741
2009-11-01 20:32:48 +00:00
Douglas Gregor 5897e097a6 Within a template, qualified name lookup can refer to a non-dependent type
that is not known to be a base class at template definition time due
to some dependent base class. Treat qualified name lookup that refers
to a non-static data member or function as implicit class member
access when the "this" type would be dependent.

llvm-svn: 85718
2009-11-01 17:08:18 +00:00
Mike Stump 0a65b636ce Fix -pthread on dragonfly. Patch by Sascha Wildner.
llvm-svn: 85679
2009-10-31 20:11:46 +00:00
Mike Stump 75ce573815 Refine vcall/vbase ordering with vtable construction.
llvm-svn: 85677
2009-10-31 20:06:59 +00:00
Douglas Gregor 954de17977 Implement "incremental" template instantiation for non-type template
parameters and template type parameters, which occurs when
substituting into the declarations of member templates inside class
templates. This eliminates errors about our inability to "reduce
non-type template parameter depth", fixing PR5311.

Also fixes a bug when instantiating a template type parameter
declaration in a member template, where we weren't properly reducing
the template parameter's depth.

LLVM's StringSwitch header now parses.

llvm-svn: 85669
2009-10-31 17:21:17 +00:00
Benjamin Kramer 6b289a9cf6 Update CMake file.
llvm-svn: 85652
2009-10-31 12:15:23 +00:00
Zhongxing Xu b1c24724dd Move CheckDivZero into its own files.
llvm-svn: 85651
2009-10-31 10:02:37 +00:00
Zhongxing Xu 358ced08d0 Move UndefDerefChecker into its own file.
llvm-svn: 85645
2009-10-31 08:44:33 +00:00
Zhongxing Xu 5f5c954329 fix 80-col.
llvm-svn: 85642
2009-10-31 03:36:08 +00:00
Douglas Gregor 326b2fa03e Fix a crazy canonical-types bug because canonicalizing a
dependently-sized array type with a given expression might end up
returning a non-canonical type; see through that non-canonical type to
the underlying canonical type. Yes, I have a test case; no, I can't
reduce it to the point where it's worth checking in :(

llvm-svn: 85633
2009-10-30 22:56:57 +00:00
Douglas Gregor 62b885d43c When looking for a copy-assignment operator to determine the cv-qualifiers on its argument type, ignore assignment operator templates
llvm-svn: 85629
2009-10-30 22:48:49 +00:00
Douglas Gregor bb3b46eb74 When a friend is declared in a dependent context, don't even try to
match it up with a declaration in the outer scope.

llvm-svn: 85628
2009-10-30 22:42:42 +00:00
Douglas Gregor 1d0015f8e1 Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.

llvm-svn: 85620
2009-10-30 22:09:44 +00:00
Ted Kremenek 5c2040b182 Tighten computation of ExprVal using ?: expression. No functionality change.
llvm-svn: 85618
2009-10-30 22:01:29 +00:00
Douglas Gregor 916462b2f7 Improve diagnostics when parsing something like
template<> struct foo<int> { ... };

where "foo" does not refer to a template. Fixes PR3844.

llvm-svn: 85616
2009-10-30 21:46:58 +00:00
Douglas Gregor 412e8bc56d Instantiate class template friends better; fixes PR5332.
llvm-svn: 85612
2009-10-30 21:07:27 +00:00
Daniel Dunbar 624c21b029 Change the driver to do the Darwin triple mangling itself instead of forwarding
-mmacosx-version-min and -miphoneos-version-min to clang-cc.

llvm-svn: 85600
2009-10-30 18:12:20 +00:00
Ted Kremenek 6f2a705a24 Make checkers run in deterministic order.
llvm-svn: 85597
2009-10-30 17:47:32 +00:00
Ted Kremenek 89f5c189db Move NullDerefChecker.h instead a 'Checkers' subdirectory.
llvm-svn: 85596
2009-10-30 17:28:40 +00:00
Ted Kremenek f613e89617 Move all logic for the null dereference checker from GRExprEngineInternalChecks.cpp to a separate .cpp file.
llvm-svn: 85595
2009-10-30 17:24:47 +00:00
Douglas Gregor f329c7c3c0 Include macros in code-completion results
llvm-svn: 85594
2009-10-30 16:50:04 +00:00
John Thompson b535352681 Re-arranged some internal functions for coming __has_include changes.
llvm-svn: 85589
2009-10-30 13:49:06 +00:00
Benjamin Kramer 305f9f8fed Add C++ include paths for Exherbo. Patch by Daniel Mierswa!
llvm-svn: 85588
2009-10-30 12:57:13 +00:00
Zhongxing Xu b9eda67380 Fix PR5316: make assignment expressions can be visited as lvalue. Then we
can get the correct base lvalue.
Revert r85578.

llvm-svn: 85579
2009-10-30 07:19:39 +00:00
Ted Kremenek e96a30a531 Handle loading of field values from LazyCompoundVals in GRExprEngine::VisitMemberExpr().
This fixes the crash reported in PR 5316.

llvm-svn: 85578
2009-10-30 05:48:30 +00:00
Chris Lattner 252d36e74c warn about returning the address of a label.
llvm-svn: 85576
2009-10-30 04:01:58 +00:00
Anders Carlsson 32e1b1c169 Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)
llvm-svn: 85574
2009-10-30 02:27:02 +00:00
Anders Carlsson 958c9f8524 Fix thinko, mangleCXXRtti should obviously take a QualType!
llvm-svn: 85565
2009-10-30 01:52:02 +00:00
Anders Carlsson 4b08db7a62 Add CGException.cpp, to be used for exception related code generation.
llvm-svn: 85560
2009-10-30 01:42:31 +00:00
Anders Carlsson 430046321b mangleCXXRtti obviously needs to take a type, what was I thinking...
llvm-svn: 85555
2009-10-30 01:26:12 +00:00
Fariborz Jahanian 6c5a8e2555 This patch computes composite type of two objective-c expressions
used in a conditional expression by finding the most-derived common
super class of the two and qualifies the resulting type by the
intersection of the protocl qualifier list of the two objective-c
pointer types. ( this is continuation of radar 7334235).

llvm-svn: 85554
2009-10-30 01:13:23 +00:00
Anders Carlsson 3f0db2beb1 Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).
llvm-svn: 85552
2009-10-30 00:46:35 +00:00
John McCall 41b215eef6 Include pointee type information in the diagnostic for creating bad pointers or
arrays.

llvm-svn: 85550
2009-10-30 00:37:20 +00:00
John McCall 70dd5f6574 Report accurate source-location information when rebuilding types during
template instantiation.

llvm-svn: 85545
2009-10-30 00:06:24 +00:00
Mike Stump f3eb5ec2c0 Fix one more bug with __builtin_object_size.
llvm-svn: 85538
2009-10-29 23:34:20 +00:00
Douglas Gregor e6fb91f2cb We may need to instantiate a class template specialization as part of a derived-to-base pointer case
llvm-svn: 85532
2009-10-29 23:08:22 +00:00
Douglas Gregor 07cc4ac606 Slightly improve source-location information during template instantiation
llvm-svn: 85529
2009-10-29 22:21:39 +00:00
Steve Naroff f406f4d99b - Add/tweak some comments.
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().

No functionality change.

llvm-svn: 85528
2009-10-29 21:11:04 +00:00
Mike Stump fa50290b49 Fix some issues Daniel pointed out.
llvm-svn: 85526
2009-10-29 20:48:09 +00:00
Sebastian Redl adba46edc2 Properly instantiate usage of overloaded operator []. Fixes PR5345.
llvm-svn: 85524
2009-10-29 20:17:01 +00:00