Douglas Gregor
bc7c5e471a
Code completion for Objective-C @ keywords that are statements or expressions
...
llvm-svn: 90757
2009-12-07 09:51:25 +00:00
Douglas Gregor
f48706c787
Code completion for Objective-C @ directives
...
llvm-svn: 90756
2009-12-07 09:27:33 +00:00
Zhongxing Xu
175447f743
Add EvalCallExpr interface to checker, and migrate the no-return function
...
handler to this interface.
GRExprEngine::CheckerEvalCall() will return true if one of the checkers has
processed the node. In the future this might return void when we have some
default checker.
llvm-svn: 90755
2009-12-07 09:17:35 +00:00
Anders Carlsson
8e0317bf05
Instantiated or specialized class templates never have a key function. This (and the previous check-in) fixes PR5557.
...
llvm-svn: 90753
2009-12-07 08:29:39 +00:00
Anders Carlsson
82fccd014a
Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557.
...
llvm-svn: 90752
2009-12-07 08:24:59 +00:00
Anders Carlsson
e1b3e6292a
It's OK to try to emit a vtable definition more than once. Fixes PR5697.
...
llvm-svn: 90751
2009-12-07 07:59:52 +00:00
Anders Carlsson
27cfc6e144
getTemplateSpecializationKind should be const.
...
llvm-svn: 90750
2009-12-07 06:33:48 +00:00
Eli Friedman
c0dacee1e0
Erm, revert for the moment; I didn't test this as thoroughly as I should have
...
(although it does pass regression tests).
llvm-svn: 90747
2009-12-07 04:45:50 +00:00
Eli Friedman
c5d3a6ae3d
Tweak the formula for non-virtual offsets to something which appears a bit
...
more accurate.
llvm-svn: 90746
2009-12-07 04:38:34 +00:00
Anders Carlsson
5ebf8b44e9
Move key functions to a separate map.
...
llvm-svn: 90745
2009-12-07 04:35:11 +00:00
John McCall
bcd035061d
DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
...
but the results are imperfect.
For posterity, I did:
cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF
find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;
llvm-svn: 90743
2009-12-07 02:54:59 +00:00
Chris Lattner
9dfed9fdb6
fix -dM with variadic macros, PR5699
...
llvm-svn: 90735
2009-12-07 01:58:34 +00:00
Chris Lattner
76b4445d6f
some code cleanup.
...
llvm-svn: 90732
2009-12-07 01:42:56 +00:00
Chris Lattner
d62268a668
remove some defaulted params for consistency.
...
llvm-svn: 90731
2009-12-07 01:38:03 +00:00
Chris Lattner
1c4280328d
reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
...
This time with a fix to bail out when in a dependent context.
llvm-svn: 90730
2009-12-07 01:36:53 +00:00
Chris Lattner
045cbffb65
fix a crash on invalid I found when working on something unrelated.
...
llvm-svn: 90729
2009-12-07 00:48:47 +00:00
Eli Friedman
d0e8de2cd8
Move RequireCompleteType requirement for fields early into ActOnField so that
...
subsequent code which depends on a complete type does the right thing.
llvm-svn: 90727
2009-12-07 00:22:08 +00:00
Sam Weinig
d060ed4d70
Don't print a void return type for C++ constructors and destructors when generating a predefined expr for them.
...
llvm-svn: 90725
2009-12-06 23:55:13 +00:00
Eli Friedman
f2eda5efd2
Be a bit more complete about accumulating SavedThisAdjustments.
...
llvm-svn: 90723
2009-12-06 22:33:51 +00:00
Eli Friedman
8174f2c23c
Work-in-progess rewrite of thunks: move thunk generation outside of vtable
...
generation, and make sure we generate thunks when the function is defined
rather than when the vtable is defined.
llvm-svn: 90722
2009-12-06 22:01:30 +00:00
Douglas Gregor
94bb5e8d75
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call.
...
llvm-svn: 90719
2009-12-06 21:27:58 +00:00
Steve Naroff
30484700c5
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=81871
http://llvm.org/viewvc/llvm-project?view=rev&revision=81936
http://llvm.org/viewvc/llvm-project?view=rev&revision=81945
llvm-svn: 90718
2009-12-06 21:14:13 +00:00
Chris Lattner
ed085234dc
revert my previous patch, it is breaking something and I don't have time
...
to fix it ATM.
llvm-svn: 90717
2009-12-06 20:58:07 +00:00
Eli Friedman
71a26d8f82
Move helper onto CXXMethodDecl.
...
llvm-svn: 90716
2009-12-06 20:50:05 +00:00
Douglas Gregor
05e7ca3659
Switch the std::multimap shadow map used in code completion to an
...
llvm::DenseMap, for a 20% performance improvement in the
Cocoa-big-list performance benchmark.
llvm-svn: 90715
2009-12-06 20:23:50 +00:00
Chris Lattner
71d5bf1c5d
implement PR4451, improving error recovery for a mistaken : where a :: was
...
intended. On the first testcase in the bug, we now produce:
cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::
instead of:
t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^
llvm-svn: 90713
2009-12-06 19:08:11 +00:00
Chris Lattner
8c56c49fe0
simplify logic.
...
llvm-svn: 90712
2009-12-06 18:34:27 +00:00
Anders Carlsson
3efc6e6f46
Add rudimentary support for member pointers to CGDebugInfo.
...
llvm-svn: 90711
2009-12-06 18:00:51 +00:00
Chris Lattner
3c7b86f4ee
remove some extraneous syntax: sourceloc implicitly converts to sourcerange.
...
llvm-svn: 90710
2009-12-06 17:36:05 +00:00
Chris Lattner
72ecc68e11
use new helpers to simplify code.
...
llvm-svn: 90709
2009-12-06 17:22:42 +00:00
Daniel Dunbar
a6cb9f21be
Fix an off by one in findEndOfWord, which could scan past the end of the string in a corner case.
...
llvm-svn: 90703
2009-12-06 09:56:18 +00:00
Eli Friedman
eddf1213e2
Fix a slight oversight in computing whether a copy constructor is elidable.
...
Fixes PR5695.
llvm-svn: 90702
2009-12-06 09:26:33 +00:00
Daniel Dunbar
58ecb2ab51
Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.
...
Also, update SourceManager.h doxyments for getBuffer() to reflect reality.
llvm-svn: 90701
2009-12-06 09:19:25 +00:00
Daniel Dunbar
1776679e71
Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.
...
llvm-svn: 90700
2009-12-06 09:19:12 +00:00
Daniel Dunbar
7cea5f1747
Add a pretty horrible hack to prevent clang from crashing with inconsistent PCH
...
files.
- The issue is that PCH uses a stat cache, which may reference files which have
been deleted or moved. In such cases ContentCache::getBuffer was returning 0
but most clients are incapable of dealing with this (i.e., they don't).
For the time being, resolve this issue by just making up some invalid file
contents and. Eventually we should detect that we are in an inconsistent
situation and error out with a nice message that the PCH is out of date.
llvm-svn: 90699
2009-12-06 05:43:36 +00:00
Steve Naroff
287a2bfc03
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=86026
Note: The 'improved debugging' changes weren't integrated (since they were later reverted, since they didn't improve debugging).
llvm-svn: 90693
2009-12-06 01:52:22 +00:00
Steve Naroff
94ed6dc906
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=82174
llvm-svn: 90692
2009-12-06 01:48:44 +00:00
Steve Naroff
2b3843df1b
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=72893
llvm-svn: 90690
2009-12-06 01:33:56 +00:00
Anders Carlsson
fe5f7d916f
Set the correct linkage for VTTs as well.
...
llvm-svn: 90689
2009-12-06 01:09:21 +00:00
Steve Naroff
66aaa39568
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=71473
llvm-svn: 90688
2009-12-06 01:02:14 +00:00
Anders Carlsson
232324c5c0
More linkage improvements.
...
llvm-svn: 90687
2009-12-06 00:53:22 +00:00
Anders Carlsson
0911ae8ef2
Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.
...
llvm-svn: 90686
2009-12-06 00:23:49 +00:00
Anders Carlsson
7e28c5f2e2
Make GenerateVtable a private member function of CGVtableInfo.
...
llvm-svn: 90684
2009-12-06 00:01:05 +00:00
Eli Friedman
89c038e518
Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that
...
it gets called during template instantiation.
llvm-svn: 90682
2009-12-05 23:03:49 +00:00
Anders Carlsson
4ed44eb7d9
Only emit the vtable definition if the class has a key function and we're emitting it, or if the class doesn't have a key function and we are emitting the complete constructor.
...
llvm-svn: 90681
2009-12-05 22:42:54 +00:00
Anders Carlsson
0ab79e22ab
If a class does not have a key function, its linkage should be weak_odr.
...
llvm-svn: 90680
2009-12-05 22:24:38 +00:00
Anders Carlsson
58b271d450
Use createGlobalVariable for creating vtable variables too.
...
llvm-svn: 90679
2009-12-05 22:19:10 +00:00
Benjamin Kramer
acc5fa153d
Don't call back() on an empty vector.
...
llvm-svn: 90678
2009-12-05 22:16:51 +00:00
Steve Naroff
ec60b43ee2
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=71225
http://llvm.org/viewvc/llvm-project?view=rev&revision=73207
http://llvm.org/viewvc/llvm-project?view=rev&revision=73414
llvm-svn: 90677
2009-12-05 21:43:12 +00:00
Anders Carlsson
b3f54b748d
CodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not to the address point.
...
llvm-svn: 90676
2009-12-05 21:28:12 +00:00