]>
granicus.if.org Git - clang/log
Chandler Carruth [Sun, 15 Nov 2009 23:10:57 +0000 (23:10 +0000)]
Fix a missing include from r88876.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88879
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 23:03:25 +0000 (23:03 +0000)]
When generating the deleting ctor, emit a call to delete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 22:49:34 +0000 (22:49 +0000)]
Make sure that virtual destructors have delete operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88877
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 22:30:43 +0000 (22:30 +0000)]
Add DeclarationName::dump().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88876
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 15 Nov 2009 20:30:39 +0000 (20:30 +0000)]
Peer through refernces for typeid. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 19:08:46 +0000 (19:08 +0000)]
Deallocation functions must also be static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 18:59:32 +0000 (18:59 +0000)]
allocation functions are always static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 18:45:20 +0000 (18:45 +0000)]
Factor finding a deallocation function for a record type out into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 15 Nov 2009 17:57:00 +0000 (17:57 +0000)]
Fix linux buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88856
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 15 Nov 2009 16:52:53 +0000 (16:52 +0000)]
Finish off zero check for typeid(*p) so that it will do a __cxa_bad_typeid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88852
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 15 Nov 2009 16:43:15 +0000 (16:43 +0000)]
If we find a deallocation function in the class scope, but it is a placement function we should not look for a deallocation function in the global scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Sun, 15 Nov 2009 10:22:07 +0000 (10:22 +0000)]
Add MIPS support to Triple for Linux and the PSP. Credit to Bruno Cardoso Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 09:20:52 +0000 (09:20 +0000)]
When performing a static downcast as part of a static_cast, make sure
that we're dealing with canonical types like the documentation say
(yay, CanQualType). Alas, this is another instance where using
getQualifiers() on a non-canonical QualType got us in trouble.
Good news: with this fix, Clang can now parse all of its own headers!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88848
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 08:51:10 +0000 (08:51 +0000)]
Don't gratuitously mark the default constructors of base or member initializers as used
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 08:11:13 +0000 (08:11 +0000)]
When adding the underlying declaration of a decl to a lookup-results
set, expand overloaded function declarations. Long-term, this should
actually be done by the name-lookup code rather than here, but this
part of the code (involving using declarations) is getting a makeover
now and the test-case is useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 08:10:41 +0000 (08:10 +0000)]
Add two new C++ lit tests suites, for testing Clang .cpp files with
-fsyntax-only and with -c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88845
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 15 Nov 2009 08:09:41 +0000 (08:09 +0000)]
Implement typeid for class types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88843
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 07:48:03 +0000 (07:48 +0000)]
When looking for operator() to type-check a call to an object of class
type, use full qualified name lookup rather than the poking the
declaration context directly. This makes sure that we see operator()'s
in superclasses. Also, move the complete-type check before this name
lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 07:26:58 +0000 (07:26 +0000)]
Make a couple more headers standalone
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 07:23:09 +0000 (07:23 +0000)]
Add Clang-Syntax C++Tests; these don't run by default, use the lit arguments
'--param run_clang_syntax=1' to run them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88839
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 07:17:25 +0000 (07:17 +0000)]
Remove an obviously-broken header, which still tries to refer to ScopedDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 07:11:12 +0000 (07:11 +0000)]
Use the other excludes syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88836
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 07:10:50 +0000 (07:10 +0000)]
Make some more headers standalone
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 07:07:58 +0000 (07:07 +0000)]
If any errors have occurred by the time we hit the end of a function body, clear out any remaining temporaries so they aren't seen later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 06:48:46 +0000 (06:48 +0000)]
Add TargetOptions and use it when constructing targets.
- This ended up being hard to factor, sorry for the large diff.
- Some post-commit cleanup to come.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Nov 2009 06:34:37 +0000 (06:34 +0000)]
Make a few headers parse standalone
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 15 Nov 2009 03:28:10 +0000 (03:28 +0000)]
Finish off support for typeinfo generation for classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88828
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 00:27:43 +0000 (00:27 +0000)]
Add a trivial example plugin, which prints the names of the top-level decls.
- The build scriptage is about twice as long as the code, which is nice. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 00:22:33 +0000 (00:22 +0000)]
Add examples dir, built with BUILD_EXAMPLES=1 (Makefiles, no CMake equivalent yet).
Move tools/wpa to examples/wpa, and unbreak its build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 15 Nov 2009 00:12:04 +0000 (00:12 +0000)]
Add pluggable action support to clang-cc, via -plugin command line option.
- Expects the plugin has been loaded with -load.
- Using this may require disabling TOOL_NO_EXPORTS in the clang-cc Makefile, this breaks the llvm::Registry way of working (static constructors are bad, kids). This should be replaced with a "real" plugin model that has explicit plugin interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 14 Nov 2009 23:32:21 +0000 (23:32 +0000)]
Finisgh off rest of class_type_info rtti generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 22:35:18 +0000 (22:35 +0000)]
When dumping implicit cast exprs, print out whether the cast is an lvalue cast or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 22:32:38 +0000 (22:32 +0000)]
Move the program action enum to FrontendOptions.
--
ddunbar@giles:clang-cc (master)$ grep llvm::cl::opt clang-cc.cpp # Woot
ddunbar@giles:clang-cc (master)$
--
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88820
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 22:04:54 +0000 (22:04 +0000)]
Add clang -mcpu=native support, patch by Roman Divacky, varioustweaks by me.
- We still need support for detecting the target features, since the name
doesn't actually do a good job of decribing what the CPU supports (for LLVM).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 21:45:58 +0000 (21:45 +0000)]
Add an internal CreateRecordDecl that will create a CXXRecordDecl when compiling C++ and a RecordDecl otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 21:26:41 +0000 (21:26 +0000)]
Always build a builtin operator expression for the __extension__ unary operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88811
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 21:21:42 +0000 (21:21 +0000)]
Handle CK_BitCast in EmitCastLValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88810
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 14 Nov 2009 21:15:49 +0000 (21:15 +0000)]
- Have TryStaticImplicitCast set the cast kind to NoOp when binding a reference. CheckReferenceInit already inserts implicit casts to the necessary types. This fixes an assertion in CodeGen for some casts and brings a fix for PR5453 close, if I understand that bug correctly.
- Also, perform calculated implicit cast sequences if they're determined to work. This finally diagnoses static_cast to ambiguous or implicit bases and fixes two long-standing fixmes in the test case. For the C-style cast, this requires propagating the access check suppression pretty deep into other functions.
- Pass the expressions for TryStaticCast and TryStaticImplicitCast by reference. This should lead to a better AST being emitted for such casts, and also fixes a memory leak, because CheckReferenceInit and PerformImplicitConversion wrap the node passed to them. These wrappers were previously lost.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 21:08:12 +0000 (21:08 +0000)]
Canonicalize the type before trying to create a debug type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 20:52:05 +0000 (20:52 +0000)]
Have CGDebugInfo::getOrCreateType cache the QualType instead of having every ConvertType overload do it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 19:25:21 +0000 (19:25 +0000)]
Improve test to make sure -fixit is really working.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Nov 2009 16:36:57 +0000 (16:36 +0000)]
Move DISABLE_INLINE to the front of the decl so MSVC can parse it. Patch by Amine Khaldi!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 14 Nov 2009 15:55:18 +0000 (15:55 +0000)]
Build up more of the rtti info for a class. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 14 Nov 2009 14:25:18 +0000 (14:25 +0000)]
Add the name to the rtti data structure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88792
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 14 Nov 2009 12:08:24 +0000 (12:08 +0000)]
Change *BugReport constructors to take StringRefs.
- Eliminates many calls to std::string.c_str()
- Fixes an invalid read in ReturnStackAddressChecker due to an unsafe call to
StringRef.data() which doesn't guarantee null-termination.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88779
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 10:53:49 +0000 (10:53 +0000)]
clang-cc: Switch to using FrontendAction. Whee.
Please report any discrepancies you see in clang-cc, I'm not confident that our regression tests cover all the fun ways one can use clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 10:42:57 +0000 (10:42 +0000)]
Add FrontendActions for all preprocessor based clang-cc actions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 10:42:46 +0000 (10:42 +0000)]
Add FrontendActions, which provides a FrontendAction interface to all the existing AST consumer based clang-cc actions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 10:42:35 +0000 (10:42 +0000)]
Add FrontendAction interface, for encapsulating a "clang-cc" style action.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 14 Nov 2009 08:51:33 +0000 (08:51 +0000)]
Avoid assert-crash in a case where the expression passed to EmitConstantExpr
legitimately has side-effects (and needs to be generated as a non-constant).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 14 Nov 2009 08:37:13 +0000 (08:37 +0000)]
Make __func__ and friends work correctly within the initializer for a static
local variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 07:53:24 +0000 (07:53 +0000)]
Shuffle VerifyDiagnosticsClient API to be less fragile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88765
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 07:53:04 +0000 (07:53 +0000)]
Add CompilerInstance::InitializeSourceManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88764
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 14 Nov 2009 04:43:10 +0000 (04:43 +0000)]
PR5462: Don't run off the edge of the argument array for vararg handling
when there are more parameters in the prototype than arguments to the call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 04:39:42 +0000 (04:39 +0000)]
Update FixIt tests to make it more obvious they use a separate mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 04:39:29 +0000 (04:39 +0000)]
Turn -fixit it back into a mode, but make -fixit-at imply that mode this time
(instead of running it with arbitrary consumers).
- Also, turn any -fixit-at lookup failure into an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88757
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 14 Nov 2009 04:23:25 +0000 (04:23 +0000)]
Fix a couple of tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 14 Nov 2009 04:19:37 +0000 (04:19 +0000)]
PR5483: Generate missing form of destructor when it is virtual. (Someone
more familiar with this stuff should double-check that there isn't some more
general rule; this is purely from inspecting g++ output.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 14 Nov 2009 03:40:14 +0000 (03:40 +0000)]
Fix for PR5489: don't skip the complete type requrirement for variable
definitions just because the type happens to be an array type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 14 Nov 2009 03:27:21 +0000 (03:27 +0000)]
When type-checking a static cast (or the static_cast part of a C-style
cast) that is converting to a class type, enumerate its constructors
as in any other direct initialization. This ensures that we get the
proper conversion sequence.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 03:24:39 +0000 (03:24 +0000)]
Switch -verify implementation to use VerifyDiagnosticClient.
- Not tested, but -verify with multiple inputs should work now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 03:24:04 +0000 (03:24 +0000)]
Fix broken tests, exposed by improved -verify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 03:23:19 +0000 (03:23 +0000)]
Add VerifyDiagnosticsClient, to replace old -verify.
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.
- This also tweaks a few things:
o Errors are now just regular diagnostics.
o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.
- Not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88748
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 03:17:38 +0000 (03:17 +0000)]
Diagnose ambiguity of operator delete and operator delete[]. Sebastian, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88747
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 02:48:04 +0000 (02:48 +0000)]
Pass Preprocessor through DiagnosticClient::BeginSourceFile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 02:47:17 +0000 (02:47 +0000)]
Add ASTConsumer to CompilerInstance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 14 Nov 2009 02:18:31 +0000 (02:18 +0000)]
Generate the old API when sending message to super
in a category implementation (objc 32bit api related).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88741
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 14 Nov 2009 01:51:50 +0000 (01:51 +0000)]
Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 14 Nov 2009 01:20:54 +0000 (01:20 +0000)]
If we attempt to add a constructor template specialization that looks
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.
Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 01:20:48 +0000 (01:20 +0000)]
Add static version of Preprocessor::getSpelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 14 Nov 2009 01:20:40 +0000 (01:20 +0000)]
Move CompilerInstance::set* methods out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 14 Nov 2009 01:05:20 +0000 (01:05 +0000)]
Move definition of GRExprEngine::ProcessEndPath() out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 14 Nov 2009 00:14:13 +0000 (00:14 +0000)]
Mangling support for typeinfo names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88726
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 13 Nov 2009 23:59:09 +0000 (23:59 +0000)]
Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88724
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 23:45:53 +0000 (23:45 +0000)]
Handle descructor printing better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 13 Nov 2009 23:45:44 +0000 (23:45 +0000)]
Template argument deduction of a non-type template parameter from a
template argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 13 Nov 2009 23:14:53 +0000 (23:14 +0000)]
A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 23:13:20 +0000 (23:13 +0000)]
Also track address points for primaries bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 13 Nov 2009 22:29:45 +0000 (22:29 +0000)]
Code gen. For virtual destructor call on array objects
(still part of pr5472).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 22:12:05 +0000 (22:12 +0000)]
More VTT and constructor vtable testcases from recent work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88710
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 21:55:26 +0000 (21:55 +0000)]
Add more testcase for construction vtables and VTTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 21:40:38 +0000 (21:40 +0000)]
Add some more VTT testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 13 Nov 2009 21:23:46 +0000 (21:23 +0000)]
Obvious fix for PR5474.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88696
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 13 Nov 2009 21:20:14 +0000 (21:20 +0000)]
Fixes a code gen. bug for array delete operator call
int 32bit abi (pr5472 related).
-This line, and those below, will be ignored--
M lib/CodeGen/CGCXXExpr.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 13 Nov 2009 20:11:49 +0000 (20:11 +0000)]
Clear temporaries in more places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 20:03:22 +0000 (20:03 +0000)]
Remove test case's dependency on header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 20:00:28 +0000 (20:00 +0000)]
Add two new test cases for the Malloc/Free checker. Both have to do with
storing malloc'ed memory to global storage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 19:53:32 +0000 (19:53 +0000)]
Add test case that shows a leak we don't catch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 19:36:46 +0000 (19:36 +0000)]
Add a testcase for the recent VTT work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 13 Nov 2009 19:27:47 +0000 (19:27 +0000)]
Code gen for arrady delete operator. Fixes pr5472.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88680
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 13 Nov 2009 19:21:49 +0000 (19:21 +0000)]
Fix bug Doug noticed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 19:13:56 +0000 (19:13 +0000)]
Add test for expr.delete p5, with a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 13 Nov 2009 19:10:24 +0000 (19:10 +0000)]
Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 18:53:35 +0000 (18:53 +0000)]
This falls into the category of stupid pet tricks. I hate to do this,
but this is necessary to continue work on virtual vtables. We don't
want to penalize virtual table building testcases, just because
complex virtual conversions don't yet work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Fri, 13 Nov 2009 18:50:18 +0000 (18:50 +0000)]
add missing slashes to separator line; also testing commit access
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 18:49:48 +0000 (18:49 +0000)]
Use 'eq' operator, and enable regular experimental checks when --experimental-checks is passed to scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88673
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 18:46:29 +0000 (18:46 +0000)]
Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 13 Nov 2009 18:44:21 +0000 (18:44 +0000)]
When performing copy initialization (= "implicit conversion", here) to
a class type from itself or a derived class thereof, enumerate
constructors and permit user-defined conversions to the arguments of
those constructors. This fixes the wacky implicit conversion sequence
used in std::auto_ptr's lame emulation of move semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88670
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 13 Nov 2009 18:34:26 +0000 (18:34 +0000)]
When transforming an expression statement (e.g., for template
instantiation), be sure to finish the expression statement by
providing a FullExprArg, making sure that temporaries get
destroyed. Fixes an obscure failure when parsing
llvm/LinkAllPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 18:32:08 +0000 (18:32 +0000)]
Add CompilerInstance utility functions for creating output files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88667
91177308 -0d34-0410-b5e6-
96231b3b80d8