Ted Kremenek
54ad1ab56f
Add the BlockDecl to the DeclContext.
...
llvm-svn: 90808
2009-12-07 22:01:30 +00:00
Eli Friedman
f6c175b745
Correctly handle conditional operators involving throw.
...
llvm-svn: 90800
2009-12-07 20:25:53 +00:00
Eli Friedman
5445f6e5b6
Make the comma operator consistently call EnsureInsertPoint.
...
llvm-svn: 90799
2009-12-07 20:18:11 +00:00
Mike Stump
62afe99814
Work around emitters that can't deal with dead code contexts yet.
...
llvm-svn: 90796
2009-12-07 20:12:14 +00:00
Fariborz Jahanian
c2949f9f26
Allow accessing 'isa' via '->' operator.
...
(fixes radar 7447251).
llvm-svn: 90795
2009-12-07 20:09:25 +00:00
Anders Carlsson
1aaecfa02d
Mangle basic_ostream and basic_iostream specializations.
...
llvm-svn: 90794
2009-12-07 19:56:42 +00:00
Mike Stump
52d7141186
Remove obsolete fallback code for objectsize.
...
llvm-svn: 90780
2009-12-07 18:58:11 +00:00
Nuno Lopes
7251327d75
implement PR5274: mark 'restrict' parameters as noalias
...
llvm-svn: 90778
2009-12-07 18:30:06 +00:00
Rafael Espindola
59ae799efa
Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
...
claim it in Driver.cpp instead of Tools.cpp.
llvm-svn: 90777
2009-12-07 18:28:29 +00:00
Fariborz Jahanian
1b31c37922
Patch to allow restrict applied to id/Class types.
...
(fixes radar 7442244).
llvm-svn: 90773
2009-12-07 18:08:58 +00:00
Nuno Lopes
c4413fbb88
add fedora 12 include path
...
llvm-svn: 90772
2009-12-07 17:18:48 +00:00
Chris Lattner
3ababf5340
reduce nesting.
...
llvm-svn: 90769
2009-12-07 16:33:19 +00:00
Douglas Gregor
9225369891
When in an Objective-C instance method, super is a valid code-completion result
...
llvm-svn: 90758
2009-12-07 09:54:55 +00:00
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
Anders Carlsson
a95d4c51dc
Make sure that hte vtable always has an i8* array type.
...
llvm-svn: 90675
2009-12-05 21:09:05 +00:00
Anders Carlsson
c8e39ec79f
Add a function for getting the vtable address point of a class.
...
llvm-svn: 90674
2009-12-05 21:03:56 +00:00
Anders Carlsson
b694f05ffb
Simplify BuildVTT.
...
llvm-svn: 90673
2009-12-05 21:02:25 +00:00
Anders Carlsson
b78d093fcc
Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.
...
llvm-svn: 90672
2009-12-05 20:58:49 +00:00
Anders Carlsson
78c2898e02
Change getCtorVtable to not return the address point offset, but the global variable.
...
llvm-svn: 90671
2009-12-05 20:42:53 +00:00
Anders Carlsson
5a1a84f9fa
Simplify some code.
...
llvm-svn: 90670
2009-12-05 18:38:15 +00:00
Anders Carlsson
21bbc1e705
Factor vtable related GlobalVariable creation out into a separate function. Add vtable linkage test.
...
llvm-svn: 90667
2009-12-05 17:04:47 +00:00
Steve Naroff
e70a52a00c
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=71086
http://llvm.org/viewvc/llvm-project?view=rev&revision=71107
Note: This fixes <rdar://problem/6845623> from protocol to template.
llvm-svn: 90665
2009-12-05 15:55:59 +00:00
Steve Naroff
c275f70bf9
Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642 ).
...
Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.
Sorry for the confusion!
llvm-svn: 90664
2009-12-05 12:23:07 +00:00
Benjamin Kramer
4053e5db54
Avoid trashing two temporary strings.
...
llvm-svn: 90663
2009-12-05 10:22:15 +00:00
Benjamin Kramer
ed60635d70
strcasecmp is unportable.
...
llvm-svn: 90662
2009-12-05 10:07:04 +00:00
Douglas Gregor
249d6826cd
Improve the performance of code completion by 2.2x when completing for ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting.
...
llvm-svn: 90661
2009-12-05 09:08:56 +00:00
Chris Lattner
e99c110d06
implement rdar://7346691 by codegen'ing struct/array initializers
...
to a memset or a memcpy from a global when possible.
llvm-svn: 90658
2009-12-05 08:22:11 +00:00
Chris Lattner
e08ea7874a
various cleanups.
...
llvm-svn: 90657
2009-12-05 08:21:30 +00:00
Chris Lattner
ffcd06ea7c
simplify a condition and add a testcase.
...
llvm-svn: 90652
2009-12-05 06:49:57 +00:00
Chris Lattner
9a152e2570
fix rdar://7446395, a crash on invalid, by fixing a broken assertion.
...
llvm-svn: 90647
2009-12-05 05:40:13 +00:00
Eli Friedman
0846d52f70
Tweak "key function" rules so that they work for templates with virtual
...
inline functions.
llvm-svn: 90645
2009-12-05 04:55:55 +00:00
Steve Naroff
4fb3d9fcd7
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=71086
Note - This commit only includes the fix for:
<rdar://problem/6309338> slightly different error message format for Visual Studio.
The fix for <rdar://problem/6845623> from protocol to template. is separate/forthcoming.
llvm-svn: 90642
2009-12-05 02:14:08 +00:00
Eli Friedman
6c08ce7706
Skip actually generating the vtable unless we are defining it. This avoids
...
the side-effects of generating the methods in the vtable (including PR5676).
llvm-svn: 90635
2009-12-05 01:05:03 +00:00
Daniel Dunbar
1b52d8c4ec
Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.
...
llvm-svn: 90629
2009-12-05 00:13:59 +00:00
Anders Carlsson
a30e1750cd
Don't emit explicit specializations of static member variable declarations.
...
llvm-svn: 90624
2009-12-04 23:50:01 +00:00
Mike Stump
bee78dd31b
Add support for function try blocks.
...
llvm-svn: 90622
2009-12-04 23:26:17 +00:00
John McCall
b96ec56871
Fix "using typename" and the instantiation of non-dependent using declarations.
...
llvm-svn: 90614
2009-12-04 22:46:56 +00:00
Benjamin Kramer
62ab616666
Return bool as a bool instead of a uint64_t.
...
llvm-svn: 90610
2009-12-04 22:45:27 +00:00
Anders Carlsson
cfb65d7432
Be a little more clever about inline member functions that are marked inline in the inline class declaration but not in the actual definition:
...
class A {
inline void f();
}
void A::f() { }
This is not the most ideal solution, since it doesn't work 100% with regular functions (as my FIXME comment states).
llvm-svn: 90607
2009-12-04 22:35:50 +00:00
Anders Carlsson
1f78b2bf62
Diagnose declarations of implicit member functions.
...
llvm-svn: 90605
2009-12-04 22:33:25 +00:00
Daniel Dunbar
acd6957b59
Driver: Switch -ccc-* options to using the standard options functionality.
...
- I still want to get rid of them, but manually handling them isn't adding value.
llvm-svn: 90602
2009-12-04 21:55:23 +00:00
John Thompson
47981226d5
Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized.
...
llvm-svn: 90600
2009-12-04 21:51:28 +00:00
Steve Naroff
b0e3390f53
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=70978
llvm-svn: 90597
2009-12-04 21:36:32 +00:00
Steve Naroff
f0df20a5ba
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=70926
llvm-svn: 90596
2009-12-04 21:29:41 +00:00
Steve Naroff
3ce3af2cb6
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=70922
llvm-svn: 90595
2009-12-04 21:18:19 +00:00
Alexis Hunt
9b3a395bf3
Put in FIXME that this mangling is not official in.
...
llvm-svn: 90594
2009-12-04 21:11:13 +00:00
Daniel Dunbar
78e9de56f4
OptTable: Allow option groups to be used to define "help groups", which will
...
collate the options inside that group.
llvm-svn: 90592
2009-12-04 21:08:40 +00:00
Daniel Dunbar
250bd17374
OptParser: Add HelpHidden flag.
...
llvm-svn: 90591
2009-12-04 21:08:25 +00:00
Alexis Hunt
bf2f0c2e34
Switch mangling of literal operator names to a string that's
...
a) legal
b) likely to be chosen as the official mangling
This will break ABI compatibility with all literal operator names,
so you may need to recompile any such code. Sorry.
llvm-svn: 90587
2009-12-04 21:01:37 +00:00
Mike Stump
afe4764fa5
Be sure to instantiate rtti for non-polymorphic bases.
...
llvm-svn: 90586
2009-12-04 20:55:13 +00:00
Ted Kremenek
45805b9a50
Teach AnalysisContext::getBody() about BlockDecls.
...
llvm-svn: 90585
2009-12-04 20:34:55 +00:00
Ted Kremenek
ed2246aa2a
Teach 'ExecutionContinues' (part of BugReporter's diagnostic generation) about BlockDecls.
...
llvm-svn: 90584
2009-12-04 20:34:31 +00:00
Ted Kremenek
75d6fa27bd
Include BlockDeclRefExprs in constructed CFGs.
...
llvm-svn: 90583
2009-12-04 20:33:25 +00:00
Ted Kremenek
c32f2c2e0f
Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).
...
llvm-svn: 90582
2009-12-04 20:32:20 +00:00
Anders Carlsson
ce460529c0
When generating a virtual destructor, don't try to make a virtual call to the base class destructor because then we'll just re-enter the same destructor!
...
This was done to fix PR5619, so I went ahead and passed a dummy VTT pointer for now.
llvm-svn: 90578
2009-12-04 19:33:17 +00:00
Rafael Espindola
73d4637545
Add gcc's -no-canonical-prefixes option to clang.
...
llvm-svn: 90577
2009-12-04 19:31:58 +00:00
Mike Stump
875912ac13
Fixup nested try blocks.
...
llvm-svn: 90576
2009-12-04 19:21:57 +00:00
Mike Stump
5c820758f5
Fix warning and be sure to set up the rethrow pointer if we fall off
...
the end of all the catches.
llvm-svn: 90574
2009-12-04 19:03:47 +00:00
Anders Carlsson
bad80eb792
Rename 'Class' to 'MostDerivedClass'
...
llvm-svn: 90573
2009-12-04 18:36:22 +00:00
Anders Carlsson
19462d681a
Store the vtable components in a SmallVector.
...
llvm-svn: 90571
2009-12-04 16:24:46 +00:00
Anders Carlsson
4e1d75f3ed
Use a different ConstantArray::get.
...
llvm-svn: 90570
2009-12-04 16:22:27 +00:00
Anders Carlsson
472404f8a6
Move the vtable vector directly into the Vtable builder.
...
llvm-svn: 90569
2009-12-04 16:19:30 +00:00
Anders Carlsson
7bb7076b51
Change getIndex to return false if the index wasn't found. Avoids an extra hash lookup.
...
llvm-svn: 90568
2009-12-04 15:49:02 +00:00
Eli Friedman
65d87222b2
Minor cleanup; no functionality change.
...
llvm-svn: 90565
2009-12-04 08:52:11 +00:00
Eli Friedman
81fb0d2656
Remove unused argument.
...
llvm-svn: 90563
2009-12-04 08:40:51 +00:00
Eli Friedman
c07aebee90
Eliminate submethods vector.
...
llvm-svn: 90562
2009-12-04 08:36:58 +00:00
Eli Friedman
3d2e9de337
Eliminate the inner loop in VtableBuilder::OverrideMethod.
...
llvm-svn: 90561
2009-12-04 08:34:14 +00:00
Daniel Dunbar
20c13165a0
PR5684: Fix refacto, the backend consumer was copying the Diagnostic object,
...
which meant that hasErrorOccurred() checks to prevent codegen-on-invalid weren't
working.
llvm-svn: 90560
2009-12-04 08:17:40 +00:00
Daniel Dunbar
644dca07b9
ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
...
from a source file.
- This allows CIndex to avoid iterating over all the top-level decls when using
a PCH, which means we deserialize far fewer decls.
llvm-svn: 90559
2009-12-04 08:17:33 +00:00
Eli Friedman
78cde14444
Make sure to call PerformObjectMemberConversion where necessary.
...
llvm-svn: 90555
2009-12-04 07:18:51 +00:00
Chris Lattner
2474a7e9c2
Use PresumedLoc when emitting the 'included from' diagnostics. For a malformed
...
test like this:
#line 4 "foo"
#define XX ?
#if XX
#endif
We now emit:
In file included from t.c:7:
foo:7:5: error: invalid token at start of a preprocessor expression
#if XX
^
foo:5:12: note: instantiated from:
#define XX ?
^
instead of:
In file included from t.c:7:
foo:7:5: error: invalid token at start of a preprocessor expression
#if XX
^
./t.h:6:12: note: instantiated from:
#define XX ?
^
(where the note doesn't obey #line or print the include stack when needed).
This fixes PR5617
llvm-svn: 90554
2009-12-04 07:06:35 +00:00
Ted Kremenek
6e8541ddd0
Rename instance variable to avoid name conflict with parameters, and modify addTransition() to compare the correct state values.
...
llvm-svn: 90552
2009-12-04 06:57:49 +00:00
Eli Friedman
3de20c55e9
Missed change from last commit.
...
llvm-svn: 90550
2009-12-04 06:46:54 +00:00
Eli Friedman
2cfcef65b7
Make the type of the Decl referred to by a MemberExpr a bit more precise.
...
llvm-svn: 90549
2009-12-04 06:40:45 +00:00
Anders Carlsson
5c9e7b16a5
Correctly mangle the 'std' namespace inside extern "C++" blocks.
...
llvm-svn: 90544
2009-12-04 06:23:23 +00:00
Chris Lattner
6aab73137a
minor tidy.
...
llvm-svn: 90543
2009-12-04 06:14:03 +00:00
Anders Carlsson
f3935b4d4b
Make sure that overridden method decls are always canonical.
...
llvm-svn: 90542
2009-12-04 05:51:56 +00:00
Eli Friedman
94bc2dade6
Fix regression in vtable improvements.
...
llvm-svn: 90540
2009-12-04 04:30:03 +00:00
Mike Stump
8c1253b4c2
Try/catch statements seem to be working well enough to turn on.
...
llvm-svn: 90538
2009-12-04 03:57:07 +00:00
Mike Stump
2ab55765f7
Disable for now, doesn't play nice with the temporary code.
...
llvm-svn: 90537
2009-12-04 03:55:53 +00:00
Eli Friedman
b05eb963e0
Rename method to something easier to search for.
...
llvm-svn: 90536
2009-12-04 03:54:56 +00:00
Anders Carlsson
a93e980fbc
More work in preparation of getting rid of the submethods loop.
...
llvm-svn: 90535
2009-12-04 03:52:52 +00:00
Anders Carlsson
f2f31f4371
Remove an unused member variable.
...
llvm-svn: 90534
2009-12-04 03:46:21 +00:00
Anders Carlsson
e609636e0d
Add a way to get the index of a method. Assert that we have the same index for now.
...
llvm-svn: 90533
2009-12-04 03:41:37 +00:00
Anders Carlsson
b07567c315
Add a premature optimization.
...
llvm-svn: 90532
2009-12-04 03:07:26 +00:00
Anders Carlsson
50f147460a
Add the method directly to the vtable.
...
llvm-svn: 90531
2009-12-04 03:06:03 +00:00
Anders Carlsson
79bce40365
Get rid of the PureVirtualMethods map.
...
llvm-svn: 90530
2009-12-04 02:58:12 +00:00
Anders Carlsson
ddf42c8d80
Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).
...
llvm-svn: 90529
2009-12-04 02:56:03 +00:00
Anders Carlsson
5b3ea9bf1c
Move covariant thunk handling to AppendMethods too.
...
llvm-svn: 90528
2009-12-04 02:52:22 +00:00
Anders Carlsson
86809cd8ab
Move 'this' pointer adjustment thunks to AppendMethods.
...
llvm-svn: 90527
2009-12-04 02:43:50 +00:00
Eli Friedman
4b1942cb8b
Make functions returning a struct indirectly evaluate the returned struct
...
directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.
llvm-svn: 90526
2009-12-04 02:43:40 +00:00
Anders Carlsson
495634e5ac
Factor appending methods to a vtable out into a separate function.
...
llvm-svn: 90525
2009-12-04 02:39:04 +00:00
Anders Carlsson
4c837d258f
Get rid of the Thunks struct too.
...
llvm-svn: 90524
2009-12-04 02:26:15 +00:00
Anders Carlsson
c521f952d6
Remove the CovariantThunk struct.
...
llvm-svn: 90523
2009-12-04 02:22:02 +00:00
Anders Carlsson
597c776c41
Remove the GlobalDecl from the Thunk as well.
...
llvm-svn: 90522
2009-12-04 02:14:12 +00:00
Eli Friedman
f3da334da6
Fix for PR5447: teach Evaluate to deal with floating-point conditionals.
...
llvm-svn: 90521
2009-12-04 02:12:53 +00:00
Anders Carlsson
8c889abc1a
Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
...
llvm-svn: 90519
2009-12-04 02:11:21 +00:00
Anders Carlsson
cdf1898086
Start populating the VtableMembers structure.
...
llvm-svn: 90517
2009-12-04 02:08:24 +00:00
Ted Kremenek
c7916f9ff2
Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.
...
llvm-svn: 90516
2009-12-04 02:03:51 +00:00
Anders Carlsson
a84b6e85f0
Add a data structure for efficient storing of vtable methods. Not used yet.
...
llvm-svn: 90515
2009-12-04 02:01:07 +00:00
Mike Stump
114ab9f695
Fixup reference binding for catch parameters.
...
Fixup throws and rethrows to use invoke as appropriate.
llvm-svn: 90513
2009-12-04 01:51:45 +00:00