Mike Stump
63bb7c2b28
Fixup codegen for static dispatch to a virtual function that was
...
almost correct. :-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 23:38:08 +00:00
Douglas Gregor
76c5b55a5e
Tweak the list of open projects for C++
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 23:34:30 +00:00
Fariborz Jahanian
64e690ecf7
ir-gen for type convesion of class objects. WIP.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 23:31:30 +00:00
Douglas Gregor
e9f8eb64ed
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 23:26:04 +00:00
Anders Carlsson
c56642301e
Remove another unused argument.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 23:00:36 +00:00
Anders Carlsson
d497ba7ca5
Remove the PrintType argument from RequireCompleteType.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:59:12 +00:00
Douglas Gregor
bd4c4aebe6
When a member reference expression includes a qualifier on the member
...
name, e.g.,
x->Base::f()
retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.
When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:36:53 +00:00
Ted Kremenek
d2fa56687f
Add initial boilerplate for CIndex, a shared library that will vend high-level
...
source symbol information (harvested by Clang) through a C API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:36:44 +00:00
Anders Carlsson
91a0cc913e
Add a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireCompleteType now creates a PartialDiagnostic and calls the new function.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:33:56 +00:00
Anders Carlsson
022fb28d79
The PartialDiagnostic constructor doesn't need to be explicit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:31:44 +00:00
Mike Stump
1feade8e52
Regularize the case and sort.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:31:08 +00:00
Anders Carlsson
21c2e20a00
More improvements to PartialDiagnostic.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 21:48:37 +00:00
Douglas Gregor
83ddad3ab5
Implement support for C++ direct initializers that involve dependent
...
types or type-dependent expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 21:14:46 +00:00
Mike Stump
be3289d0e0
More work for conversion functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 21:11:25 +00:00
Mike Stump
f0070dbae9
Implement virtual dispatch. :-) This is self-consistent with clang,
...
but not yet necessarily perfectly consistent with gcc. Also addressed
Doug and John's comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:46:33 +00:00
Fariborz Jahanian
58d3f1af9b
Fixes a comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:37:03 +00:00
Fariborz Jahanian
9099ff0cf9
AST for conversion by conversion functions. WIP.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:34:58 +00:00
Eli Friedman
47421a2dda
As far as I know, there aren't any warning differences between -std=gnu99 and
...
-std=c99 modes, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:18:00 +00:00
Eli Friedman
ab24c8dfb4
Since the HexFloats option only controls a warning, it shouldn't depend
...
on whether we're in GNUMode. Adjust the code appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:15:14 +00:00
Eli Friedman
d15d8c6395
Make address-space qualification work correctly for compound literals.
...
Issue reported on cfe-dev.
Also fixed the code to use isConstant to determine whether to generate a
constant global, to be consistent with CodeGenModule. This probably
needs to be refactored to deal with C++, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:01:39 +00:00
Anders Carlsson
2cf738f194
More support for pseudo dtors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80129 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 19:22:42 +00:00
Fariborz Jahanian
e9f42087aa
update to CXXFunctionalCastExpr to support ir-gen for
...
type convesions of class objects [class.conv]. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 18:55:36 +00:00
Douglas Gregor
db3a0f543e
Make sure to compare primary declaration contexts when determining whether a declaration is in scope
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 18:54:58 +00:00
Douglas Gregor
42c39f3918
When we know that we are parsing a class-name, implicitly construct a
...
TypenameType if getTypeName is looking at a member of an unknown
specialization. This allows us to properly parse class templates that
derived from type that could only otherwise be described by a typename type,
e.g.,
template<class T> struct X {};
template<typename T> struct Y : public X<T>::X { };
Fixes PR4381.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 18:27:52 +00:00
Anders Carlsson
8f28f99019
Add Sema::BuildMemberReferenceExpr and have Sema::ActOnMemberReferenceExpr call it.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 18:25:21 +00:00
Anders Carlsson
3aa4ca439d
Address some of Doug's comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 17:36:19 +00:00
Douglas Gregor
c3384cba39
Fix for overloaded binary operators whose operands need implicit
...
conversions, from Sylvere Teissier!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 17:08:25 +00:00
Anders Carlsson
b2153946ff
Add the partially implemented PartialDiagnostic class.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 16:23:53 +00:00
Douglas Gregor
47e1f7c68b
Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 14:37:04 +00:00
Douglas Gregor
91a2886d55
Fix bug in __extension__ handling for declarations, from Abramo
...
Bagnara with a fix from Enea Zaffanella!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 14:27:30 +00:00
Anders Carlsson
eb1a1b6df0
Revert r80064 since it broke the build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 03:30:14 +00:00
Mike Stump
78e7d3af10
Implement virtual dispatch. :-) This is self-consistent with clang, but not yet
...
necessarily perfectly consistent with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 01:54:35 +00:00
Fariborz Jahanian
4f68d537c3
Simplified default construction of array data members
...
in the constructor prologue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 00:23:27 +00:00
Douglas Gregor
dacd434c49
Improve diagnostics and recovery when the nested-name-specifier of a
...
qualified name does not actually refer into a class/class
template/class template partial specialization.
Improve printing of nested-name-specifiers to eliminate redudant
qualifiers. Also, make it possible to output a nested-name-specifier
through a DiagnosticBuilder, although there are relatively few places
that will use this leeway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 00:04:55 +00:00
Anders Carlsson
ec7738776b
Parsing of pseudo-destructors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 23:46:41 +00:00
Ted Kremenek
11401c6611
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 23:46:25 +00:00
Ted Kremenek
ab2f43cfe7
Fix regression in BasicStoreManager caused by implicitly casting loaded values and trying to load/store from arrays. RegionStoreManager already properly handles these cases well; we just need to gracefully not handle this case in BasicStoreManager. This fixes PR 4781.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 23:29:04 +00:00
Ted Kremenek
bcf62a9f5b
Handle pointer arithmetic in RegionStoreManager involving Objective-C pointers
...
when using the non-fragile Objective-C ABI. This fixes <rdar://problem/7168531>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 22:55:09 +00:00
Douglas Gregor
bc047ba733
Test out-of-line definition of a static data member of a member class of a nested class template. Phew
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 22:54:02 +00:00
Douglas Gregor
c131ebb5cb
Test out-of-line definitions of static data members of nested member class templates
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 22:53:07 +00:00
Douglas Gregor
495c35d291
Improve support for out-of-line definitions of nested templates and
...
their members, including member class template, member function
templates, and member classes and functions of member templates.
To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,
template<typename X> template<typename Y>
X Outer<X>::Inner1<Y>::foo(Y) {
return X();
}
we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.
Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 22:51:20 +00:00
John McCall
ce3ff2bd3a
Clarify the difference between substitution and instantiation by renaming
...
functions that don't instantiate definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 22:02:44 +00:00
Ted Kremenek
3ac6a0b8a3
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 21:14:54 +00:00
Ted Kremenek
1894dce964
Fix crash reported in <rdar://problem/7124210> by "back-porting" some of the
...
implicit cast logic in RegionStoreManager to BasicStoreManager. This involved
moving CastRetriedVal from RegionStoreManager to StoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 20:51:30 +00:00
Steve Naroff
78ca7b3d34
Update Xcode project file to include indexing source files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 19:57:00 +00:00
Fariborz Jahanian
cf5c19b9b7
Changed condition of an assert.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 18:53:16 +00:00
Ted Kremenek
ff4264dae3
Move logic of GRExprEngine::EvalBinOp to SValuator::EvalBinOp.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 18:44:25 +00:00
John McCall
91cf4199cc
Modify an assert to capture the restriction on friend declarations more
...
accurately. Prevents the assert from triggering incorrectly when friending
functions first declared in extern "C" contexts. Fixes bug 4757.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 17:53:59 +00:00
Douglas Gregor
05396e20d6
Implement out-of-line definitions of nested class templates. Most of
...
the logic is there for out-of-line definitions with multiple levels of
nested templates, but this is still a work-in-progress: we're having
trouble determining when we should look into a dependent
nested-name-specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 17:23:04 +00:00
Fariborz Jahanian
c87efbd2cb
Skip over bases/fields with dependent types.
...
Fixes pr4771.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 16:37:49 +00:00