]>
granicus.if.org Git - clang/log
Douglas Gregor [Mon, 7 Dec 2009 06:11:34 +0000 (06:11 +0000)]
Remove empty test cases
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 7 Dec 2009 04:45:50 +0000 (04:45 +0000)]
Erm, revert for the moment; I didn't test this as thoroughly as I should have
(although it does pass regression tests).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90747
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 7 Dec 2009 04:38:34 +0000 (04:38 +0000)]
Tweak the formula for non-virtual offsets to something which appears a bit
more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90746
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 7 Dec 2009 04:35:11 +0000 (04:35 +0000)]
Move key functions to a separate map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 7 Dec 2009 02:54:59 +0000 (02:54 +0000)]
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 '{}' \;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 02:09:14 +0000 (02:09 +0000)]
add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
pointed out by Charles Davis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 01:58:34 +0000 (01:58 +0000)]
fix -dM with variadic macros, PR5699
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 01:57:13 +0000 (01:57 +0000)]
rename names for consistency
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 01:49:36 +0000 (01:49 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 01:42:56 +0000 (01:42 +0000)]
some code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 01:38:03 +0000 (01:38 +0000)]
remove some defaulted params for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 01:36:53 +0000 (01:36 +0000)]
reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 7 Dec 2009 00:48:47 +0000 (00:48 +0000)]
fix a crash on invalid I found when working on something unrelated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 7 Dec 2009 00:22:08 +0000 (00:22 +0000)]
Move RequireCompleteType requirement for fields early into ActOnField so that
subsequent code which depends on a complete type does the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Weinig [Sun, 6 Dec 2009 23:57:56 +0000 (23:57 +0000)]
Remove a now out of date and out of place comment about predefined exprs from the FloatingLiteral class declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90726
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Weinig [Sun, 6 Dec 2009 23:55:13 +0000 (23:55 +0000)]
Don't print a void return type for C++ constructors and destructors when generating a predefined expr for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90725
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 6 Dec 2009 22:33:51 +0000 (22:33 +0000)]
Be a bit more complete about accumulating SavedThisAdjustments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 6 Dec 2009 22:01:30 +0000 (22:01 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 6 Dec 2009 21:27:58 +0000 (21:27 +0000)]
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90719
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 6 Dec 2009 21:14:13 +0000 (21:14 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90718
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 20:58:07 +0000 (20:58 +0000)]
revert my previous patch, it is breaking something and I don't have time
to fix it ATM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 6 Dec 2009 20:50:05 +0000 (20:50 +0000)]
Move helper onto CXXMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90716
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 6 Dec 2009 20:23:50 +0000 (20:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 19:11:41 +0000 (19:11 +0000)]
this is really about both PR's, 4452 is "don't crash", 4451 is "recover nicely".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90714
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 19:08:11 +0000 (19:08 +0000)]
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;
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 18:34:27 +0000 (18:34 +0000)]
simplify logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 6 Dec 2009 18:00:51 +0000 (18:00 +0000)]
Add rudimentary support for member pointers to CGDebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 17:36:05 +0000 (17:36 +0000)]
remove some extraneous syntax: sourceloc implicitly converts to sourcerange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90710
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 6 Dec 2009 17:22:42 +0000 (17:22 +0000)]
use new helpers to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 6 Dec 2009 12:45:46 +0000 (12:45 +0000)]
Add test case for mktemp. Patch by Lei Zhang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90706
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 6 Dec 2009 10:07:46 +0000 (10:07 +0000)]
Drop Preprocessor/open-failure test, it breaks running the test suite as root,
and I can't figure out how to write it more portably.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 6 Dec 2009 09:56:30 +0000 (09:56 +0000)]
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90704
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 6 Dec 2009 09:56:18 +0000 (09:56 +0000)]
Fix an off by one in findEndOfWord, which could scan past the end of the string in a corner case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 6 Dec 2009 09:26:33 +0000 (09:26 +0000)]
Fix a slight oversight in computing whether a copy constructor is elidable.
Fixes PR5695.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 6 Dec 2009 09:19:25 +0000 (09:19 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 6 Dec 2009 09:19:12 +0000 (09:19 +0000)]
Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 6 Dec 2009 05:43:36 +0000 (05:43 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 6 Dec 2009 01:52:22 +0000 (01:52 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90693
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 6 Dec 2009 01:48:44 +0000 (01:48 +0000)]
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=82174
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 6 Dec 2009 01:33:56 +0000 (01:33 +0000)]
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=72893
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90690
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 6 Dec 2009 01:09:21 +0000 (01:09 +0000)]
Set the correct linkage for VTTs as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90689
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 6 Dec 2009 01:02:14 +0000 (01:02 +0000)]
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=71473
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 6 Dec 2009 00:53:22 +0000 (00:53 +0000)]
More linkage improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 6 Dec 2009 00:23:49 +0000 (00:23 +0000)]
Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 6 Dec 2009 00:01:05 +0000 (00:01 +0000)]
Make GenerateVtable a private member function of CGVtableInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 5 Dec 2009 23:03:49 +0000 (23:03 +0000)]
Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that
it gets called during template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90682
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 22:42:54 +0000 (22:42 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 22:24:38 +0000 (22:24 +0000)]
If a class does not have a key function, its linkage should be weak_odr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 22:19:10 +0000 (22:19 +0000)]
Use createGlobalVariable for creating vtable variables too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 5 Dec 2009 22:16:51 +0000 (22:16 +0000)]
Don't call back() on an empty vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 5 Dec 2009 21:43:12 +0000 (21:43 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 21:28:12 +0000 (21:28 +0000)]
CodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not to the address point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 21:09:05 +0000 (21:09 +0000)]
Make sure that hte vtable always has an i8* array type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 21:03:56 +0000 (21:03 +0000)]
Add a function for getting the vtable address point of a class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 21:02:25 +0000 (21:02 +0000)]
Simplify BuildVTT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90673
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 20:58:49 +0000 (20:58 +0000)]
Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90672
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 20:42:53 +0000 (20:42 +0000)]
Change getCtorVtable to not return the address point offset, but the global variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 18:38:15 +0000 (18:38 +0000)]
Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90670
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 17:04:47 +0000 (17:04 +0000)]
Factor vtable related GlobalVariable creation out into a separate function. Add vtable linkage test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 5 Dec 2009 16:07:02 +0000 (16:07 +0000)]
Update .xcodeproj file
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 5 Dec 2009 15:55:59 +0000 (15:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 5 Dec 2009 12:23:07 +0000 (12:23 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 5 Dec 2009 10:22:15 +0000 (10:22 +0000)]
Avoid trashing two temporary strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 5 Dec 2009 10:07:04 +0000 (10:07 +0000)]
strcasecmp is unportable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 5 Dec 2009 09:08:56 +0000 (09:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Dec 2009 08:33:21 +0000 (08:33 +0000)]
fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90660
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Dec 2009 08:30:04 +0000 (08:30 +0000)]
consolidate some tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Dec 2009 08:22:11 +0000 (08:22 +0000)]
implement rdar://
7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90658
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Dec 2009 08:21:30 +0000 (08:21 +0000)]
various cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90657
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Dec 2009 06:49:57 +0000 (06:49 +0000)]
simplify a condition and add a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90652
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 5 Dec 2009 05:40:13 +0000 (05:40 +0000)]
fix rdar://
7446395 , a crash on invalid, by fixing a broken assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 5 Dec 2009 04:55:55 +0000 (04:55 +0000)]
Tweak "key function" rules so that they work for templates with virtual
inline functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 5 Dec 2009 02:17:18 +0000 (02:17 +0000)]
CIndex: For the time being, don't return translation units if we encounter an error during parsing.
- We need to be more careful in the rest of CIndex if we are to handle
possibly-invalid ASTs, and don't have much experience with this yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90643
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 5 Dec 2009 02:14:08 +0000 (02:14 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90642
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 5 Dec 2009 01:05:03 +0000 (01:05 +0000)]
Skip actually generating the vtable unless we are defining it. This avoids
the side-effects of generating the methods in the vtable (including PR5676).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 5 Dec 2009 00:13:59 +0000 (00:13 +0000)]
Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 4 Dec 2009 23:50:01 +0000 (23:50 +0000)]
Don't emit explicit specializations of static member variable declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 4 Dec 2009 23:26:17 +0000 (23:26 +0000)]
Add support for function try blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90622
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 4 Dec 2009 22:46:56 +0000 (22:46 +0000)]
Fix "using typename" and the instantiation of non-dependent using declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 4 Dec 2009 22:45:27 +0000 (22:45 +0000)]
Return bool as a bool instead of a uint64_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 4 Dec 2009 22:35:50 +0000 (22:35 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 4 Dec 2009 22:34:07 +0000 (22:34 +0000)]
Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 4 Dec 2009 22:33:25 +0000 (22:33 +0000)]
Diagnose declarations of implicit member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 4 Dec 2009 22:22:32 +0000 (22:22 +0000)]
Add an easy accessor for the end of the try/catch statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90604
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 4 Dec 2009 21:55:23 +0000 (21:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90602
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Fri, 4 Dec 2009 21:51:28 +0000 (21:51 +0000)]
Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 4 Dec 2009 21:36:32 +0000 (21:36 +0000)]
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=70978
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90597
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 4 Dec 2009 21:29:41 +0000 (21:29 +0000)]
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=70926
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 4 Dec 2009 21:18:19 +0000 (21:18 +0000)]
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=70922
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Fri, 4 Dec 2009 21:11:13 +0000 (21:11 +0000)]
Put in FIXME that this mangling is not official in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 4 Dec 2009 21:08:40 +0000 (21:08 +0000)]
OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 4 Dec 2009 21:08:25 +0000 (21:08 +0000)]
OptParser: Add HelpHidden flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Fri, 4 Dec 2009 21:01:37 +0000 (21:01 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 4 Dec 2009 20:55:13 +0000 (20:55 +0000)]
Be sure to instantiate rtti for non-polymorphic bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 4 Dec 2009 20:34:55 +0000 (20:34 +0000)]
Teach AnalysisContext::getBody() about BlockDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 4 Dec 2009 20:34:31 +0000 (20:34 +0000)]
Teach 'ExecutionContinues' (part of BugReporter's diagnostic generation) about BlockDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 4 Dec 2009 20:33:25 +0000 (20:33 +0000)]
Include BlockDeclRefExprs in constructed CFGs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 4 Dec 2009 20:32:20 +0000 (20:32 +0000)]
Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 4 Dec 2009 19:33:17 +0000 (19:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90578
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 4 Dec 2009 19:31:58 +0000 (19:31 +0000)]
Add gcc's -no-canonical-prefixes option to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90577
91177308 -0d34-0410-b5e6-
96231b3b80d8