Zhongxing Xu
bfb000f337
move the check into MarkNoReturnFunction.
...
llvm-svn: 80980
2009-09-04 02:17:35 +00:00
Zhongxing Xu
1748d8a43d
Extract mark-no-return-function code into a function.
...
llvm-svn: 80979
2009-09-04 02:13:36 +00:00
John McCall
06f6fe8df7
Correctly handle elaborated template ids. Still not handled properly for friends.
...
llvm-svn: 80977
2009-09-04 01:14:41 +00:00
Fariborz Jahanian
37d065680b
Patch to instantiate destructors used to destruct
...
base and data members when they are needed.
llvm-svn: 80967
2009-09-03 23:18:17 +00:00
Anders Carlsson
0e91275ab4
If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.
...
llvm-svn: 80964
2009-09-03 22:56:02 +00:00
Douglas Gregor
f816bd70ce
Implement tree transformations for DeclarationNames. Among other
...
things, this means that we can properly cope with member access
expressions such as
t->operator T()
where T is a template parameter (or other dependent type).
llvm-svn: 80957
2009-09-03 22:13:48 +00:00
Douglas Gregor
7a0f1105ce
Update C++ status, since a bunch of the comments were out-of-date
...
llvm-svn: 80954
2009-09-03 21:51:43 +00:00
Douglas Gregor
2b6ca46c6b
Improve template instantiation for member access expressions that
...
involve qualified names, e.g., x->Base::f. We now maintain enough
information in the AST to compare the results of the name lookup of
"Base" in the scope of the postfix-expression (determined at template
definition time) and in the type of the object expression.
llvm-svn: 80953
2009-09-03 21:38:09 +00:00
Fariborz Jahanian
59a1cd4a06
Mark constructors used in initialization of base(s) and fields
...
as referecned with location where they are used. Still
need to look at destructor aspects of them.
llvm-svn: 80950
2009-09-03 21:32:41 +00:00
Fariborz Jahanian
3501bcec7d
Issue diagnostics in variety of situations involving
...
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.
llvm-svn: 80934
2009-09-03 19:36:46 +00:00
Daniel Dunbar
fe07aecd37
Don't use '%ll', this doesn't workin on Win32.
...
llvm-svn: 80933
2009-09-03 19:23:49 +00:00
Steve Naroff
c0683b909a
Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().
...
llvm-svn: 80932
2009-09-03 18:19:54 +00:00
Douglas Gregor
c26e0f626b
Improved handling for dependent, qualified member access expressions, e.g.,
...
t->Base::f
where t has a dependent type. We save the nested-name-specifier in the
CXXUnresolvedMemberExpr then, during instantiation, substitute into
the nested-name-specifier with the (transformed) object type of t, so
that we get name lookup into the type of the object expression.
Note that we do not yet retain information about name lookup into the
lexical scope of the member access expression, so several regression
tests are still disabled.
llvm-svn: 80925
2009-09-03 16:14:30 +00:00
Steve Naroff
38c1a7ba12
- Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
...
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.
llvm-svn: 80921
2009-09-03 15:49:00 +00:00
Douglas Gregor
b3286fe685
Save/load POSIXThreads flag for PCH
...
llvm-svn: 80916
2009-09-03 14:36:33 +00:00
Daniel Dunbar
3a0637b06b
Revert "Visit function/method bodies and issue callback for parameters and local
...
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.
llvm-svn: 80896
2009-09-03 05:59:50 +00:00
Daniel Dunbar
2d9c740cc5
Revert "Remove redundant local variable (use newly created instance data).", the
...
previous commit this depends on is breaking x86_64-apple-darwin10 and Linux tests.
llvm-svn: 80895
2009-09-03 05:59:35 +00:00
Daniel Dunbar
a77eaeb1e6
Add basic support for -pthread.
...
- Patch by David Chisnall, with PCH and Darwin support mixed in.
llvm-svn: 80883
2009-09-03 04:54:28 +00:00
Daniel Dunbar
57f2224c79
Tweak comment.
...
llvm-svn: 80882
2009-09-03 04:54:12 +00:00
Ted Kremenek
17a0296a09
Fix 80 column violations.
...
llvm-svn: 80873
2009-09-03 03:02:58 +00:00
David Chisnall
2c5bef2a74
Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing the ABIs and breaking both platforms.
...
llvm-svn: 80870
2009-09-03 01:48:05 +00:00
Ted Kremenek
b117fd9168
Fix regression introduced in r80786 and reported in PR 4867. We should use
...
'dyn_cast' instead of 'cast' as the denominator value could be UnknownVal (and
is not guaranteed to be a DefinedVal).
llvm-svn: 80869
2009-09-03 01:48:03 +00:00
Zhongxing Xu
677e6a2faf
remove a debug output I introduced in the last commit.
...
llvm-svn: 80865
2009-09-03 01:31:59 +00:00
Mike Stump
850cc1c5a4
Update.
...
llvm-svn: 80864
2009-09-03 01:30:36 +00:00
Anders Carlsson
496335ea1a
Add CastExpr::getCastKindName and use it in the StmtDumper.
...
llvm-svn: 80862
2009-09-03 00:59:21 +00:00
Steve Naroff
517ea46e2e
Remove redundant local variable (use newly created instance data).
...
llvm-svn: 80861
2009-09-03 00:43:52 +00:00
Fariborz Jahanian
f15d4b6050
This patch does the following.
...
1) Issue digsnostics in non-fragile ABI, when an expression
evaluates to an interface type (except when it is used to
access a non-fragile ivar).
2) Issue unsupported error in fragile ABI when an expression
evaluates to an interface type (except when it is used to
access a fragile ivar).
llvm-svn: 80860
2009-09-03 00:43:07 +00:00
Steve Naroff
ef3cf2a576
Visit function/method bodies and issue callback for parameters and local variables.
...
Add clang_getTranslationUnitSpelling().
llvm-svn: 80859
2009-09-03 00:32:06 +00:00
Douglas Gregor
64792e021d
Add a wicked little test-case that illustrates what we have to deal
...
with to properly support member access expressions in templates. This
test is XFAIL'd, because we get it completely wrong, but I've made the
minimal changes to the representation to at least avoid a crash.
llvm-svn: 80856
2009-09-02 23:58:38 +00:00
Douglas Gregor
e5feb51624
Don't try to CodeGen using directives, from Anders Johnsen
...
llvm-svn: 80853
2009-09-02 23:49:23 +00:00
Daniel Dunbar
1268851c51
Initialize targets before parsing command line options, so --version shows registered targets.
...
llvm-svn: 80849
2009-09-02 23:20:15 +00:00
Fariborz Jahanian
cc043a7154
Minor refactoring of my last patch.
...
llvm-svn: 80847
2009-09-02 23:11:48 +00:00
Fariborz Jahanian
3117e2b9d4
Referenced instatiated default constructors
...
must be defined. Fixed pr4853.
llvm-svn: 80846
2009-09-02 23:02:57 +00:00
Douglas Gregor
b7bfe79412
Rewrite of our handling of name lookup in C++ member access expressions, e.g.,
...
x->Base::f
We no longer try to "enter" the context of the type that "x" points
to. Instead, we drag that object type through the parser and pass it
into the Sema routines that need to know how to perform lookup within
member access expressions.
We now implement most of the crazy name lookup rules in C++
[basic.lookup.classref] for non-templated code, including performing
lookup both in the context of the type referred to by the member
access and in the scope of the member access itself and then detecting
ambiguities when the two lookups collide (p1 and p4; p3 and p7 are
still TODO). This change also corrects our handling of name lookup
within template arguments of template-ids inside the
nested-name-specifier (p6; we used to look into the scope of the
object expression for them) and fixes PR4703.
I have disabled some tests that involve member access expressions
where the object expression has dependent type, because we don't yet
have the ability to describe dependent nested-name-specifiers starting
with an identifier.
llvm-svn: 80843
2009-09-02 22:59:36 +00:00
Fariborz Jahanian
589202d8e6
Added a FIXME to the test case.
...
llvm-svn: 80840
2009-09-02 21:24:14 +00:00
Anders Carlsson
35dca26835
Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).
...
llvm-svn: 80837
2009-09-02 21:14:47 +00:00
Fariborz Jahanian
3a964ebdc4
Changed abi mode for these test which are dereferencing
...
an interface pointer.
llvm-svn: 80836
2009-09-02 21:06:27 +00:00
Anders Carlsson
8943e2b8a0
Fix a crash when referencing static data members.
...
llvm-svn: 80835
2009-09-02 21:01:21 +00:00
Ted Kremenek
e93b4b8fe1
Update checker build.
...
llvm-svn: 80834
2009-09-02 20:27:08 +00:00
Eli Friedman
b041c75f09
Fix warnings.
...
llvm-svn: 80833
2009-09-02 20:07:26 +00:00
John McCall
f8bd861ce9
Borrow a friend class's previous declaration's access specifier regardless of
...
whether the current context is dependent.
Thanks to Anders for pointing this out.
llvm-svn: 80828
2009-09-02 19:32:14 +00:00
Anders Carlsson
2e56cc6e6c
Fix a codegen crash when a class template has a constructor that does member initialization of an anonymous union.
...
llvm-svn: 80826
2009-09-02 19:17:55 +00:00
Steve Naroff
b92c73a02a
Fix some newly added bugs uncovered by the RELEASE build.
...
llvm-svn: 80813
2009-09-02 18:58:52 +00:00
Steve Naroff
80a766bf50
Start issuing callback for references (add some predicates, refactor some code).
...
llvm-svn: 80810
2009-09-02 18:26:48 +00:00
Anders Carlsson
09a3774cd3
Packed unions should be packed. Fixes an assert Daniel reported.
...
llvm-svn: 80808
2009-09-02 17:51:33 +00:00
Fariborz Jahanian
fc60ca8801
Allow null initialization of scalara data members
...
in constructors's initializer list. pr4854
llvm-svn: 80802
2009-09-02 17:10:17 +00:00
Steve Naroff
3645f5a99b
Flesh out CXCursorKind...
...
- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).
Add client data to clang_loadDeclaration() and implement.
llvm-svn: 80787
2009-09-02 13:28:54 +00:00
Zhongxing Xu
6e4232c79c
Refactor the check for bad divide into a checker.
...
Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.
llvm-svn: 80786
2009-09-02 13:26:26 +00:00
Douglas Gregor
c707da6866
Document how we intepret C++ DR 382
...
llvm-svn: 80785
2009-09-02 13:12:51 +00:00
Douglas Gregor
2575dfc7ff
Add a few more typename-specifier tests that involve simple-template-ids in the nested-name-specifier
...
llvm-svn: 80784
2009-09-02 13:07:20 +00:00
Douglas Gregor
12bbfe1d31
When parsing typename specifiers (with either the identifier or
...
simple-template-id form), check whether the scope specifier is
computable as a declaration context rather than checking whether it is
dependent, so that we properly cope with members of the current
instantiation.
Improve testing for typename specifiers that terminate in a
simpe-template-id.
llvm-svn: 80783
2009-09-02 13:05:45 +00:00
Zhongxing Xu
79affb7b94
Refactor bad callee check into a Checker.
...
Now bad callee is checked as a PreVisit to the CallExpr.
llvm-svn: 80771
2009-09-02 08:10:35 +00:00
Zhongxing Xu
656b10a1fa
Still use BadArg bugtype in the checker. This saves us implement registerInitialVisitors
...
in the BugReport.
When all internal bug checking logic are moved to checkers, BuiltinBug will
not reference GRExprEngine, and FlushReports() will be not necessary, since
all bugs are emitted into the equivalent classes immediately.
For now just add a ctor with no arguments.
llvm-svn: 80770
2009-09-02 07:09:39 +00:00
Ted Kremenek
cf768cd202
Replace uses of ImmutableSet in SymbolReaper with DenseSet. This was
...
motivated from Shark profiles that shows that 'markLive' was very
heavy when using --analyzer-store=region. On my benchmark file, this
reduces the analysis time for --analyzer-store=region from 19.5s to
13.5s and for --analyzer-store=basic from 5.3s to 3.5s. For the
benchmark file, this is a reduction of about 30% analysis time for
both analysis modes (a huge win).
llvm-svn: 80765
2009-09-02 06:03:18 +00:00
Ted Kremenek
ad5a600a24
Implement: <rdar://problem/6337100> CWE-338: Use of cryptographically weak prng
...
Patch by Geoff Keating!
llvm-svn: 80752
2009-09-02 02:47:41 +00:00
John McCall
e94dd7ccf5
When adding a friend class declaration to the lookup tables, use the access specifier
...
of any previous declaration in case we replace it in a class's declaration table.
Fixes bug 4858. This sort of thing makes me reconsider putting friend declarations in
declaration lists.
llvm-svn: 80750
2009-09-02 02:15:17 +00:00
John McCall
e8dbaef730
Fix a little crasher in friend decls. Thanks again to Eli for finding this.
...
llvm-svn: 80748
2009-09-02 01:07:03 +00:00
Mike Stump
3f707e9f14
Add mangling for covariant thunks.
...
llvm-svn: 80747
2009-09-02 00:56:18 +00:00
John McCall
2dc078f24e
Ensure that the tag decls of friend decls aren't added to the friending class's
...
decl list, and remove some workarounds that were due to this. Thanks to Eli for
pointing this out and providing the test case.
llvm-svn: 80745
2009-09-02 00:55:30 +00:00
Mike Stump
a119813218
Shorten name.
...
llvm-svn: 80744
2009-09-02 00:28:47 +00:00
Mike Stump
9cc7d30435
Add mangling for thunks.
...
llvm-svn: 80743
2009-09-02 00:25:38 +00:00
Fariborz Jahanian
f40183f436
Test for my last patch.
...
llvm-svn: 80740
2009-09-02 00:05:10 +00:00
Fariborz Jahanian
086ac11606
It is illegal to derefrercne to an interface in
...
objc's non-fragile ABI.
llvm-svn: 80739
2009-09-02 00:00:05 +00:00
Mike Stump
2348e62498
More overriding base work and some cleanups. WIP.
...
llvm-svn: 80737
2009-09-01 23:22:44 +00:00
Fariborz Jahanian
5083e2623b
After a conversation with Doug. I added a fix me to
...
where we build the constructor's initializer list.
llvm-svn: 80735
2009-09-01 23:08:16 +00:00
Mike Stump
40dc64bcfc
Split out overriding. WIP.
...
llvm-svn: 80732
2009-09-01 22:20:28 +00:00
Mike Stump
843b78412a
Testcase for recent checkin.
...
llvm-svn: 80725
2009-09-01 22:01:25 +00:00
Anders Carlsson
c82555fb85
Handle member expressions that return references correctly.
...
llvm-svn: 80723
2009-09-01 21:18:52 +00:00
Anders Carlsson
783ab50b33
Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.
...
llvm-svn: 80722
2009-09-01 21:12:16 +00:00
Douglas Gregor
a3a3f6fecd
In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
...
AnonUnionMember. Fixes PR4826.
llvm-svn: 80721
2009-09-01 21:04:42 +00:00
Anders Carlsson
f1ae6d45dd
Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.
...
llvm-svn: 80720
2009-09-01 20:52:42 +00:00
Anders Carlsson
6904f644e7
Add a CK_FunctionToPointerDecay cast kind.
...
llvm-svn: 80719
2009-09-01 20:37:18 +00:00
Anders Carlsson
6b8b4b459d
We can generate constructors/destructors with base classes and non-trivial fields just fine now.
...
llvm-svn: 80701
2009-09-01 18:33:46 +00:00
Ted Kremenek
745c0fa407
Add test case from <rdar://problem/7184450>.
...
llvm-svn: 80700
2009-09-01 18:33:16 +00:00
Douglas Gregor
2ffd96549d
Implement proper substitution for OverloadedFunctionDecls, but substituting each of the functions in the overload set
...
llvm-svn: 80692
2009-09-01 17:53:10 +00:00
Douglas Gregor
d51896311d
Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons
...
llvm-svn: 80690
2009-09-01 17:22:34 +00:00
Steve Naroff
95908b373a
Tweak comment based on Daniel's recently added '-emit-ast' option.
...
llvm-svn: 80684
2009-09-01 17:13:31 +00:00
Douglas Gregor
8bce25f2fe
"The attached patch moves AttributeList::addAttributeList outside the
...
class so as to accomodate one or both parameters being NULL, " from Sean Hunt!
llvm-svn: 80683
2009-09-01 17:10:19 +00:00
Fariborz Jahanian
1a50477385
Fixed a property getter ir-gen crash.
...
llvm-svn: 80681
2009-09-01 17:02:21 +00:00
Douglas Gregor
32e2c8472e
Fix a crasher involving template instantiation of non-dependent
...
expressions making use of an overloaded operator. Thanks for the test
case, Anders!
llvm-svn: 80679
2009-09-01 16:58:52 +00:00
Daniel Dunbar
6cdf83c192
Add driver support for -emit-ast and AST compilation steps.
...
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'
llvm-svn: 80678
2009-09-01 16:57:46 +00:00
Douglas Gregor
770a532fa1
Tip-toe around strict-aliasing violation. Fixes PR4061.
...
llvm-svn: 80674
2009-09-01 16:13:00 +00:00
Steve Naroff
69b10fd2c5
Add explicit "blind" client data to callback function (since we aren't using blocks).
...
llvm-svn: 80673
2009-09-01 15:55:40 +00:00
Douglas Gregor
810f7a9d95
Move C++ test over to CodeGenCXX, since it requires CodeGen to reproduce
...
llvm-svn: 80672
2009-09-01 15:39:05 +00:00
Anders Carlsson
bcec05c9fd
Don't assume that a base is always a RecordType, it can also be a TemplateSpecializationType. Also, make sure to get the instantiated union member.
...
llvm-svn: 80662
2009-09-01 06:22:14 +00:00
Anders Carlsson
62215c4fb5
Add pretty stack traces when instantiating functions and static data members.
...
llvm-svn: 80661
2009-09-01 05:12:24 +00:00
Anders Carlsson
17dc7e2007
Handle member initializers that point to fields in anonymous structs.
...
llvm-svn: 80659
2009-09-01 04:31:02 +00:00
Anders Carlsson
5da848427a
Don't assert when instantiating member references to fields in anonymous structs.
...
llvm-svn: 80657
2009-09-01 04:26:58 +00:00
Eli Friedman
1c277d0fe8
PR4836, part 2: CodeGen for __builtin_isnan.
...
llvm-svn: 80655
2009-09-01 04:19:44 +00:00
Douglas Gregor
84f14dd674
Preliminary AST representation and semantic analysis for
...
explicitly-specified template argument lists in member reference
expressions, e.g.,
x->f<int>()
llvm-svn: 80646
2009-09-01 00:37:14 +00:00
Daniel Dunbar
b1b2016b83
Force triple for this test (non-fragile ABI is default on x86_64-apple-darwin9).
...
llvm-svn: 80645
2009-09-01 00:36:20 +00:00
Ted Kremenek
3aff920676
Sentence-case bug category.
...
llvm-svn: 80644
2009-09-01 00:17:12 +00:00
Douglas Gregor
f4b34ba326
Remember to write the qualifier of a MemberExpr to the PCH file when we get to C++ PCH
...
llvm-svn: 80643
2009-08-31 23:44:04 +00:00
Douglas Gregor
f405d7e6f1
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
...
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.
llvm-svn: 80642
2009-08-31 23:41:50 +00:00
John McCall
759e32bdc6
Fix bug 4784 and allow friend declarations to properly extend
...
existing declaration chains.
llvm-svn: 80636
2009-08-31 22:39:49 +00:00
Devang Patel
124095bb18
Rename DIBlock as DILexicalBlock.
...
llvm-svn: 80634
2009-08-31 22:00:32 +00:00
Douglas Gregor
96ee789d33
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
...
also be adding explicit template arguments as an additional
"adornment". No functionality change.
llvm-svn: 80628
2009-08-31 21:41:48 +00:00
Douglas Gregor
fbc1823451
Add parsing for references to member function templates with explicit
...
template argument lists, e.g., x.f<int>().
Semantic analysis will be a separate commit.
llvm-svn: 80624
2009-08-31 21:16:32 +00:00
Eli Friedman
7e4faaccda
PR4836, part 1: add Sema support for __builtin_isnan and friends; they
...
are apparently used by Solaris libc despite the fact that clang claims
to be compatible with gcc 4.2, which doesn't support them.
llvm-svn: 80610
2009-08-31 20:06:00 +00:00
Douglas Gregor
f14b46f9a8
Implement template instantiation for member operator access.
...
llvm-svn: 80609
2009-08-31 20:00:26 +00:00
Douglas Gregor
522fbc4969
Support explicit C++ member operator syntax, from James Porter!
...
llvm-svn: 80608
2009-08-31 19:52:13 +00:00
Fariborz Jahanian
879d726608
Re-implemented generation of objc_memmove_collectable
...
API for copying GC'able aggregates (Next runtime only).
llvm-svn: 80607
2009-08-31 19:33:16 +00:00
Daniel Dunbar
6733a7ec15
Fix a -Asserts warning.
...
llvm-svn: 80606
2009-08-31 19:16:38 +00:00
David Chisnall
4dc74a0d9f
Added test cases for presence and absence of __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi.
...
llvm-svn: 80593
2009-08-31 16:53:06 +00:00
David Chisnall
5778fce141
Updated GNU runtime non-fragile ABI.
...
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.
llvm-svn: 80591
2009-08-31 16:41:57 +00:00
Steve Naroff
772c1a4574
Implement source/line/column hooks.
...
llvm-svn: 80585
2009-08-31 14:26:51 +00:00
Steve Naroff
1054e60334
More fleshing out the C-based indexing API (under construction).
...
llvm-svn: 80529
2009-08-31 00:59:03 +00:00
Anders Carlsson
b533df02b5
More missing member goodness.
...
llvm-svn: 80491
2009-08-30 07:09:50 +00:00
Anders Carlsson
0d2a51b61f
Improve missing error messages as suggested by Doug.
...
llvm-svn: 80489
2009-08-30 06:49:43 +00:00
Anders Carlsson
5167a4644d
Use DiagnoseMissingMember for UsingDecls.
...
llvm-svn: 80470
2009-08-30 00:58:45 +00:00
Anders Carlsson
896c230a19
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.
...
llvm-svn: 80469
2009-08-30 00:54:35 +00:00
Eli Friedman
744a249493
Unbreak tests. I'll look into why this is necessary later.
...
llvm-svn: 80468
2009-08-30 00:53:54 +00:00
Argyrios Kyrtzidis
321995b5e5
Fix the start source location for type-specs like long, short, etc.
...
llvm-svn: 80448
2009-08-29 22:39:34 +00:00
Argyrios Kyrtzidis
9d7ab42eb6
Fix TypeLoc::operator bool().
...
llvm-svn: 80447
2009-08-29 22:39:19 +00:00
Eli Friedman
15e05261d4
Make instantiating initializers for classes with a dependent base type
...
work correctly.
The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I
couldn't figure out a good way to avoid it.
llvm-svn: 80446
2009-08-29 22:22:07 +00:00
Eli Friedman
033e8d4ae6
Make IRGen for initializing a member reference work correctly.
...
llvm-svn: 80439
2009-08-29 20:58:20 +00:00
Anders Carlsson
adf36b2379
Add a workaround for decls that come from friend decls pointing to undeclared classes.
...
llvm-svn: 80438
2009-08-29 20:47:47 +00:00
Anders Carlsson
6df9e076ea
In DeclPrinter, assert when asked to print AS_None.
...
llvm-svn: 80437
2009-08-29 20:36:12 +00:00
Fariborz Jahanian
0a484d007b
Patch to ir-gen user-defined conversions used in expressions
...
[12.3.2-p3]
llvm-svn: 80436
2009-08-29 20:33:32 +00:00
Anders Carlsson
7b194b780d
Set the access specifier for using decls.
...
llvm-svn: 80435
2009-08-29 19:54:19 +00:00
Anders Carlsson
4bb87ce33e
Improve instantiation of UnresolvedUsingDecls.
...
llvm-svn: 80434
2009-08-29 19:37:28 +00:00
Fariborz Jahanian
3df8767869
Patch for code gen. for c-style cast which ends in
...
using class's conversion functions [12.3.2-p2]
llvm-svn: 80433
2009-08-29 19:15:16 +00:00
Eli Friedman
9ab0319b2b
Get rid of mostly-unused, buggy method.
...
llvm-svn: 80432
2009-08-29 19:09:59 +00:00
Benjamin Kramer
8b83f5dfb8
gcc 4.4 needs cstdio for printf. Reorder includes while at it.
...
llvm-svn: 80430
2009-08-29 12:56:35 +00:00
John McCall
9dc2aa0c45
Test case.
...
llvm-svn: 80426
2009-08-29 08:20:44 +00:00
John McCall
5966088621
Fix the breakage by handling indirect instantiations. This would be much
...
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes. Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.
llvm-svn: 80425
2009-08-29 08:11:13 +00:00
Anders Carlsson
705539441b
Instantiate member and base initializers. Patch by Anders Johnsen! (tweaked slightly by me)
...
llvm-svn: 80422
2009-08-29 05:16:22 +00:00
Eli Friedman
2624be4fd4
Fix a couple issues with parsing invalid nested-name-specifiers.
...
llvm-svn: 80421
2009-08-29 04:08:08 +00:00
John McCall
75c03bbb0c
For consistency, just make friend declarations AS_public.
...
llvm-svn: 80420
2009-08-29 03:50:18 +00:00
John McCall
e3e2047873
Fix a last-minute typo and make the test not emit temporaries.
...
llvm-svn: 80419
2009-08-29 03:28:20 +00:00
John McCall
970d530a84
Ensure code generation for friend declarations in class templates.
...
llvm-svn: 80418
2009-08-29 03:16:09 +00:00
Zhongxing Xu
6fd66d4588
Refactor undefined argument checking into a Checker.
...
llvm-svn: 80417
2009-08-29 02:11:01 +00:00
Anders Carlsson
1e172e068f
Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen!
...
llvm-svn: 80416
2009-08-29 01:31:33 +00:00
Anders Carlsson
6e1ca8315c
Don't assert that friend declarations must have access specifiers for now.
...
llvm-svn: 80415
2009-08-29 01:13:02 +00:00
Anders Carlsson
938b10079a
CreateDeclRefExprs that point to UnresolvedUsingDecls.
...
llvm-svn: 80413
2009-08-29 01:06:32 +00:00
Anders Carlsson
a884e67485
Add another check for UnresolvedUsingDecl.
...
llvm-svn: 80412
2009-08-29 00:56:38 +00:00
Mike Stump
beefdc8948
iGenerate vcalls as we build up the methods. WIP.
...
llvm-svn: 80405
2009-08-28 23:22:54 +00:00
Douglas Gregor
90820ee62a
Make sure we actually found a redeclaration before complaining about attributes added to a redeclaration in C++
...
llvm-svn: 80403
2009-08-28 22:54:55 +00:00
Anders Carlsson
601d6e4c7b
Add printing of access specifiers to DeclPrinter. The formatting is pretty bad but it works :)
...
llvm-svn: 80402
2009-08-28 22:39:52 +00:00
Douglas Gregor
c37709b3c5
Remove #if 0'd code that is clearly not needed
...
llvm-svn: 80399
2009-08-28 22:06:43 +00:00
Fariborz Jahanian
2fee79a9a1
path to ir-gen 12.3.1 Conversion by constructor
...
llvm-svn: 80398
2009-08-28 22:04:50 +00:00
Douglas Gregor
f3db003358
Don't crash when instantiating templates containing anonymous structs/unions
...
llvm-svn: 80397
2009-08-28 22:03:51 +00:00
Douglas Gregor
11395b66c6
Test instantiation of static data members that live within nested
...
member templates.
llvm-svn: 80396
2009-08-28 21:41:19 +00:00
Douglas Gregor
5c58093178
Test instantiations of out-of-line member definitions of nested templates.
...
llvm-svn: 80395
2009-08-28 21:15:08 +00:00
Douglas Gregor
d99bb43068
Fix and test template instantiation for nested member templates.
...
llvm-svn: 80394
2009-08-28 21:09:48 +00:00
Douglas Gregor
39cacdb04b
Tighten up the conversion from a single-level template argument list
...
to a multi-level template argument list by making it explicit. The
forced auditing of callers found a bug in the instantiation of member
classes inside member templates.
I *love* static type systems.
llvm-svn: 80391
2009-08-28 20:50:45 +00:00
Douglas Gregor
6533292684
Remove the conversion from a multi-level template argument list back to a single template argument list. We no longer need this crutch
...
llvm-svn: 80390
2009-08-28 20:33:09 +00:00
Douglas Gregor
01afeeff1d
Implement template instantiation for member class templates.
...
When performing template instantiation of the definitions of member
templates (or members thereof), we build a data structure containing
the template arguments from each "level" of template
instantiation. During template instantiation, we substitute all levels
of template arguments simultaneously.
llvm-svn: 80389
2009-08-28 20:31:08 +00:00
Ted Kremenek
d65d22a0c5
Add uninitialized values test case.
...
llvm-svn: 80388
2009-08-28 20:25:33 +00:00
Ted Kremenek
52ac2b5735
retain/release checker: [CIContext createCGImage...] and friends returned CF
...
objects that are not automatically garbage collected. This fixes
<rdar://problem/7174400>.
llvm-svn: 80387
2009-08-28 19:52:12 +00:00