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

15899 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor cf3293eaeb 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).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 20:32:48 +00:00
Douglas Gregor 7a34314290 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85718 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01 17:08:18 +00:00
Benjamin Kramer 3114af3f79 Add missing colons for FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85683 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 20:42:26 +00:00
Mike Stump 4d63f8bc26 Fix -pthread on dragonfly. Patch by Sascha Wildner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 20:11:46 +00:00
Mike Stump 6a9612f384 Refine vcall/vbase ordering with vtable construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 20:06:59 +00:00
Douglas Gregor 550d9b28fd 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.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 17:21:17 +00:00
Douglas Gregor df7c3b955e Fix the type of __builtin_expect, from Ed Schouten!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85666 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 16:04:14 +00:00
Douglas Gregor 08b0e8daeb Add two missing CINDEX_LINKAGE uses, in libCIndex, from Kovarththanan
Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85665 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 15:48:08 +00:00
Benjamin Kramer 7e36e95e21 Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 12:15:23 +00:00
Zhongxing Xu 9e56d2360b Move CheckDivZero into its own files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 10:02:37 +00:00
Zhongxing Xu 246a9ade3e Move UndefDerefChecker into its own file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 08:44:33 +00:00
Zhongxing Xu 507eec8d84 Add header comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 04:12:21 +00:00
Zhongxing Xu ff04174fc6 fix 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31 03:36:08 +00:00
Douglas Gregor 87a924e37d 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 :(


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 22:56:57 +00:00
Douglas Gregor 682054c52e When looking for a copy-assignment operator to determine the cv-qualifiers on its argument type, ignore assignment operator templates
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 22:48:49 +00:00
Douglas Gregor 259571e27e When a friend is declared in a dependent context, don't even try to
match it up with a declaration in the outer scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85628 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 22:42:42 +00:00
Douglas Gregor c78c06d81f Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 22:09:44 +00:00
Ted Kremenek 12e6f03412 Tighten computation of ExprVal using ?: expression. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 22:01:29 +00:00
Douglas Gregor 2cc782f793 Improve diagnostics when parsing something like
template<> struct foo<int> { ... };

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 21:46:58 +00:00
Douglas Gregor e8c01bdb56 Instantiate class template friends better; fixes PR5332.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 21:07:27 +00:00
Daniel Dunbar 7c15e71fb2 Remove clang-cc code for handling -mmacosx-version-min and
-miphoneos-version-min.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 18:12:31 +00:00
Daniel Dunbar dd4fe00f03 Change the driver to do the Darwin triple mangling itself instead of forwarding
-mmacosx-version-min and -miphoneos-version-min to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 18:12:20 +00:00
John McCall cbe1273837 Finally suppress a compiler warning from gcc on release-asserts. Also fixes
a crash on <vector> in same, which bears additional investigation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 17:53:18 +00:00
Ted Kremenek 094bef56a7 Make checkers run in deterministic order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 17:47:32 +00:00
Ted Kremenek d86caaa6c3 Move NullDerefChecker.h instead a 'Checkers' subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 17:28:40 +00:00
Ted Kremenek bc3a021df7 Move all logic for the null dereference checker from GRExprEngineInternalChecks.cpp to a separate .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 17:24:47 +00:00
Douglas Gregor 3f7c7f4865 Include macros in code-completion results
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 16:50:04 +00:00
Benjamin Kramer 31abe8ce85 Doug says this is medium done.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 14:54:38 +00:00
Benjamin Kramer cec517bf75 cxx_status: fix some missing/wrong cells.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 14:41:58 +00:00
John Thompson a28cc090f2 Re-arranged some internal functions for coming __has_include changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85589 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 13:49:06 +00:00
Benjamin Kramer 5d7a188cbc Add C++ include paths for Exherbo. Patch by Daniel Mierswa!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 12:57:13 +00:00
Zhongxing Xu 662174ca20 Fix PR5316: make assignment expressions can be visited as lvalue. Then we
can get the correct base lvalue.
Revert r85578.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 07:19:39 +00:00
Ted Kremenek 5bbe789e10 Handle loading of field values from LazyCompoundVals in GRExprEngine::VisitMemberExpr().
This fixes the crash reported in PR 5316.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 05:48:30 +00:00
Chris Lattner 9e6b37a9f1 warn about returning the address of a label.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 04:01:58 +00:00
Anders Carlsson d3379292f9 Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 02:27:02 +00:00
Anders Carlsson d313e40ff8 Fix thinko, mangleCXXRtti should obviously take a QualType!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:52:02 +00:00
Anders Carlsson 756b5c4f9d Add CGException.cpp, to be used for exception related code generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:42:31 +00:00
Anders Carlsson 731f7f9583 mangleCXXRtti obviously needs to take a type, what was I thinking...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:26:12 +00:00
Fariborz Jahanian e23fa2d0e8 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).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 01:13:23 +00:00
Anders Carlsson 1a31a18db9 Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 00:46:35 +00:00
John McCall ac406052f7 Include pointee type information in the diagnostic for creating bad pointers or
arrays.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 00:37:20 +00:00
John McCall 85737a71fe Report accurate source-location information when rebuilding types during
template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 00:06:24 +00:00
Mike Stump 3f0147e161 Fix one more bug with __builtin_object_size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85538 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 23:34:20 +00:00
Mike Stump 2623aa2837 Add yet more testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 23:29:54 +00:00
Mike Stump 48c2af821e Add some more testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85534 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 23:22:14 +00:00
John McCall 7c475ee133 Silence a gcc warning where it notices that default-constructing a class
doesn't initialize anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 23:20:43 +00:00
Douglas Gregor 2685eab9d3 We may need to instantiate a class template specialization as part of a derived-to-base pointer case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 23:08:22 +00:00
Douglas Gregor fbf2c945f8 Slightly improve source-location information during template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 22:21:39 +00:00
Steve Naroff 0d69b8cc8e - Add/tweak some comments.
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 21:11:04 +00:00
Daniel Dunbar 8cb6562f7b Move some clang-cc errors to use diagnostics, and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 21:05:18 +00:00