Eli Friedman
56bea43ac1
Back out bad piece of r80272. Will look at fixing this a different way.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 18:44:04 +00:00
Eli Friedman
c5c54f2c7b
PR4794: Make instantiating friend class decls not crash.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 18:38:56 +00:00
Anders Carlsson
7b361b5880
Add an InOverloadResolution flag to TryCopyInitialization.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80261 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:37:39 +00:00
Anders Carlsson
2de3aced4c
Remove more default arguments.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80260 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:30:43 +00:00
Anders Carlsson
da7a18be8f
Remove default arguments from TryImplicitConversion and fix a bug found in the process.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:24:15 +00:00
Eli Friedman
cbdebdd113
PR4800: Implement -Wpointer-arith. I think this is the correct behavior
...
per the documentation, although I'm not completely sure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:20:36 +00:00
Anders Carlsson
d28b42862b
Remove default argument from TryCopyInitialization.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:18:13 +00:00
Anders Carlsson
2974b5cd26
Revert the flags change for now, I have a better idea for this.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:14:02 +00:00
Douglas Gregor
d60e105e6d
Implement instantiation of the declarations of member function
...
templates within class templates, producing a member function template
of a class template specialization. If you can parse that, I'm
sorry. Example:
template<typename T>
struct X {
template<typename U> void f(T, U);
};
When we instantiate X<int>, we now instantiate the declaration
X<int>::f, which looks like this:
template<typename U> void X<int>::f(int, U);
The path this takes through
TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and
ugly, but I don't know how to improve it yet. I'm resting my hopes on
the multi-level substitution required to instantiate definitions of
nested templates, which may simplify this code as well.
More testing to come...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 16:57:43 +00:00
Anders Carlsson
1937738953
Add a OverloadResolutionFlags and start converting some of the overload methods over to using it instead of bools arguments.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 16:01:18 +00:00
Zhongxing Xu
1d8bdd3410
Remove unused utility methods of GRStmtNodeBuilder.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 09:14:03 +00:00
Zhongxing Xu
99330ca3e3
Remove unused utility methods of GRStmtNodeBuilder.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 08:52:44 +00:00
Gabor Greif
cf78271b0a
restore indentation
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 07:30:55 +00:00
Gabor Greif
156c4134fc
add missing header
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80228 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 07:10:46 +00:00
Zhongxing Xu
c99949653f
Remove a unused member variable. Instead query the option from AnalysisManager.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:55:26 +00:00
Gabor Greif
f5afb5e1fa
iterator.h is no more. Be standards compliant.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80225 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:49:21 +00:00
Douglas Gregor
6dd38daf14
When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80212 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 06:03:53 +00:00
Anders Carlsson
8d4c5ea0ee
Don't check member and base initializers if the constructor is dependent.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 05:57:30 +00:00
Anders Carlsson
5c36fb22d9
Use early returns to avoid indentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 05:45:01 +00:00
Eli Friedman
2a16a13881
Stub out an error so we don't crash.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 05:09:36 +00:00
Anders Carlsson
e7624a75b7
Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be instantiated correctly for temporary object expressions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80206 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 05:08:22 +00:00
Anders Carlsson
bb60a509f4
In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 03:53:50 +00:00
Ted Kremenek
0fb0bc4067
Simplify 'Environment' to contain only one map from 'const Stmt*' to SVals, greatly simplifying the logic of the analyzer in many places. We now only distinguish between block-level expressions and subexpressions in Environment::RemoveDeadBindings and GRState pretty-printing.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 01:39:13 +00:00
Mike Stump
bf3fe20f60
Testcase for an almost recent checkin.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 01:09:45 +00:00
Mike Stump
0e88b16fe8
Cleanups.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80185 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 00:29:21 +00:00
Anders Carlsson
a6ec7ad25a
New RequireNonAbstractType function.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 00:13:57 +00:00
Anders Carlsson
b790661a15
Bye-bye old RequireCompleteType.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 23:45:07 +00:00
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