]>
granicus.if.org Git - clang/log
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
Anders Carlsson [Fri, 13 Nov 2009 17:08:56 +0000 (17:08 +0000)]
Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review.
With this change, FileCheck builds and runs the clang test suite without failures!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 13 Nov 2009 17:04:35 +0000 (17:04 +0000)]
Don't bind arguments to temporaries if the argument has a reference type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 16:46:11 +0000 (16:46 +0000)]
Remove local splitLines reimplementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 10:37:48 +0000 (10:37 +0000)]
Add output file list to CompilerInstance, so that it can track them instead of
forcing all clients to do it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 10:18:59 +0000 (10:18 +0000)]
clang-cc: Move output file initialization closer to use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87102
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 09:57:06 +0000 (09:57 +0000)]
Simplify, in anticipation of introducing explicit action instances.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 09:36:05 +0000 (09:36 +0000)]
Add CodeCompletion consumer to CompilerInvocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 08:58:20 +0000 (08:58 +0000)]
Rework Sema code completion interface.
- Provide Sema in callbacks, instead of requiring it in constructor. This
eliminates the need for a factory function. Clients now just pass the object
to consume the results in directly.
- CodeCompleteConsumer is cheap to construct, so building it whenever we are
doing code completion is reasonable.
Doug, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 08:21:10 +0000 (08:21 +0000)]
Add CompilerInstance::createPCHExternalASTSource.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 08:20:57 +0000 (08:20 +0000)]
Add CompilerInstance::has* methods for testing if the instance has a particular
subobject.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 08:20:47 +0000 (08:20 +0000)]
Add ASTContext to CompilerInstance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 13 Nov 2009 07:48:11 +0000 (07:48 +0000)]
Malloc checker basically works now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 13 Nov 2009 07:25:27 +0000 (07:25 +0000)]
Hook up Malloc checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 13 Nov 2009 06:53:04 +0000 (06:53 +0000)]
Check in a new interface of Checker, which will soon be used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 13 Nov 2009 06:04:01 +0000 (06:04 +0000)]
GRStateManager::CurrentStmt is not used. Remove it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 05:52:34 +0000 (05:52 +0000)]
Add CompilerInstance::createDiagnostics, and move clang-cc to it.
clang-cc.cpp is now under 1k lines, if anyone is counting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 05:52:19 +0000 (05:52 +0000)]
Add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 05:52:11 +0000 (05:52 +0000)]
Add Preprocessor to CompilerInstance, and move clang-cc CreatePreprocessor to
CompilerInstance::createPreprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 05:51:54 +0000 (05:51 +0000)]
Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 13 Nov 2009 05:46:16 +0000 (05:46 +0000)]
Include header for printf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Nov 2009 05:13:58 +0000 (05:13 +0000)]
Use StringRef::split instead of SplitString.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 13 Nov 2009 04:45:41 +0000 (04:45 +0000)]
Add a special BuildVirtualCall that's going to be used for building calls to destructors. This is needed because when compiling:
struct A {
virtual ~A();
};
void f(A* a) {
delete a;
}
A's deleting destructor should be called.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 13 Nov 2009 04:34:45 +0000 (04:34 +0000)]
Fix two bugs with temporaries:
1. For
A f() {
return A();
}
we were incorrectly calling the A destructor on the returned object.
2. For
void f(A);
void g() {
A a;
f(a);
}
we were incorrectly not calling the copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87082
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 13 Nov 2009 04:25:07 +0000 (04:25 +0000)]
Move GlobalDecl to its own file. Also add DenseMapInfo traits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 04:12:06 +0000 (04:12 +0000)]
Add {File,Source}Manager to CompilerInstance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 03:51:44 +0000 (03:51 +0000)]
Add CompilerInstance, and starting moving clang-cc to it.
- The design philosophy is in the CompilerInstance doxyment, if you don't agree
with it now would be a good time to speak up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 03:14:14 +0000 (03:14 +0000)]
Only flush plist diagnostics once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 03:02:57 +0000 (03:02 +0000)]
Fix recently introduced use-after-free error reported in <rdar://problem/
7387478 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 02:35:38 +0000 (02:35 +0000)]
Refine construction vtables; they don't include bits that don't have
virtual bases unless they are morally virtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 02:13:54 +0000 (02:13 +0000)]
Refine the construction vtables with respect to offsets. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87067
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 02:06:12 +0000 (02:06 +0000)]
Move input kind identification (-x) into FrontendOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 01:58:01 +0000 (01:58 +0000)]
Pull static variable within function (for slightly faster startup time).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 13 Nov 2009 01:54:23 +0000 (01:54 +0000)]
Allow the tracking of address points for construction vtables as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 01:54:21 +0000 (01:54 +0000)]
retain/release checker: refactor some of the summary lookup logic for instance method summaries. No real functionality change, but it paves the way for new enhancements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Nov 2009 01:15:47 +0000 (01:15 +0000)]
Add clang-cc option "-analyzer-experimental-checks" to enable experimental path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 01:02:19 +0000 (01:02 +0000)]
Move -target-{triple,abi} options into FrontendOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 13 Nov 2009 01:02:10 +0000 (01:02 +0000)]
Move code completion options to clang-cc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 13 Nov 2009 00:57:01 +0000 (00:57 +0000)]
add a fixme, inheriting from PointerIntPair is gross :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 23:52:56 +0000 (23:52 +0000)]
Move FixItAtLocations into FrontendOptions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 23:52:46 +0000 (23:52 +0000)]
clang-cc: Keep Verbose option with HeaderSearchOptions, for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 23:52:32 +0000 (23:52 +0000)]
Add FrontendOptions, and starting moving clang-cc to it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 12 Nov 2009 23:36:21 +0000 (23:36 +0000)]
Refine which vtbl is refernced in VTTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 12 Nov 2009 23:14:15 +0000 (23:14 +0000)]
Refine offsets into vtables for the VTT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 12 Nov 2009 22:56:32 +0000 (22:56 +0000)]
Refine vtable pointers for secondary vtables inside VTTs to point to
the right base vtable. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 22:12:17 +0000 (22:12 +0000)]
We need the definition of NamedDecl in DeclContextInternals.h, since Clang is type-checking the template definition more thoroughly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 12 Nov 2009 20:47:57 +0000 (20:47 +0000)]
Fix the offset calculations for non-virtual bases with overrides.
Refine the VTT entries for virtual bases to refer to the complete
object's vtable instead of constructor vtables.
Refine the AddressPoint calculations for VTT entries for virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 12 Nov 2009 20:14:24 +0000 (20:14 +0000)]
Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending
message to 'super'. Fixes radar
7205866 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 18:40:12 +0000 (18:40 +0000)]
Spell empty StringRef correctly (0 is a null StringRef, which is not the same).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 18:38:13 +0000 (18:38 +0000)]
Recognize (and check) pointer-to-member template arguments that are
non-type template parameters or constants of pointer-to-member
type. Once checked, be sure to retain those pointer-to-member
constants as expressions if they are dependent, or as declarations if
they are not dependent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 12 Nov 2009 18:21:39 +0000 (18:21 +0000)]
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 12 Nov 2009 17:49:47 +0000 (17:49 +0000)]
Use getNameAsCString() instead of getName().data()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87001
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 17:40:13 +0000 (17:40 +0000)]
When instantiating a reference to a non-type template parameter of pointer to
member type (e.g., T Class::*Member), build a pointer-to-member
constant expression. Previously, we we just building a simple
declaration reference expression, which meant that the expression was
not treated as a pointer to member.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 12 Nov 2009 17:24:48 +0000 (17:24 +0000)]
Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 12 Nov 2009 16:53:16 +0000 (16:53 +0000)]
Set CK_BaseToDerived in TryStaticDowncast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 16:49:45 +0000 (16:49 +0000)]
Give CanQual<T> an implicit conversion to bool, so that it can be used
in "if" statements like:
if (CanQual<ReferenceType> RefType = T.getAs<ReferenceType>())
Thanks to Clang for pointing out this mistake :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86995
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 12 Nov 2009 16:43:42 +0000 (16:43 +0000)]
Add a CK_BaseToDerived cast kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86994
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 16:20:59 +0000 (16:20 +0000)]
When comparing template parameter lists, distinguish between three cases:
- Comparing template parameter lists to determine if we have a redeclaration
- Comparing template parameter lists to determine if we have equivalent
template template parameters
- Comparing template parameter lists to determine whether a template
template argument is valid for a given template template parameter.
Previously, we did not distinguish between the last two cases, which
got us into trouble when we were looking for exact type matches
between the types of non-type template parameters that were dependent
types. Now we do, so we properly delay checking of template template
arguments until instantiation time.
Also, fix an accidental fall-through in a case statement that was
causing crashes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 15:42:53 +0000 (15:42 +0000)]
Disallow FIX-ITs when generating code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 15:31:47 +0000 (15:31 +0000)]
Improve source-location information for implicitly-generated member call expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 15:23:20 +0000 (15:23 +0000)]
clang-cc: Coalesce frontend options further.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Nov 2009 12:30:05 +0000 (12:30 +0000)]
Fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 12 Nov 2009 08:39:33 +0000 (08:39 +0000)]
update CMakefile
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86979
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 12 Nov 2009 08:38:56 +0000 (08:38 +0000)]
Add boilerplate logic for a malloc/free checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86978
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Nov 2009 08:08:27 +0000 (08:08 +0000)]
Generalize stdint.h for non-8-bit-multiple types, patch by
Ken Dyck!
"This adds definitions for types of 8-bit multiples
from 8 to 64 to stdint.h and rationalizes the selection of types
for the exact-width definitions in InitPreprocessor.cpp."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 12 Nov 2009 08:04:33 +0000 (08:04 +0000)]
do not store wchar/char16/char32/intmax width/alignment info
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 07:28:44 +0000 (07:28 +0000)]
Move warning options into DiagnosticOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 07:28:29 +0000 (07:28 +0000)]
Avoid comparing string literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 07:28:21 +0000 (07:28 +0000)]
Move dump-build-information option into DiagnosticOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 06:48:31 +0000 (06:48 +0000)]
clang-cc: Factor CreateDiagnosticEngine out of main.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86963
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 06:48:24 +0000 (06:48 +0000)]
clang-cc: -fixit is actually option, not an action, although its use with non
-fsyntax-only is probably untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 06:48:17 +0000 (06:48 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Nov 2009 06:26:58 +0000 (06:26 +0000)]
PthreadLockChecker doesn't need PreVisitCallExpr() yet. All the current logic should be done in PostVisitCallExpr()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Nov 2009 06:17:47 +0000 (06:17 +0000)]
Add most of the boilerplate logic for a simple pthread_mutux_lock() -> pthread_mutex_unlock() checker. We need to add a visitor method to Checker for handling dead symbols in order to detect locks that are not unlocked.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Nov 2009 06:16:18 +0000 (06:16 +0000)]
Remove obsolete 'struct NullDerefTag'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Nov 2009 05:48:41 +0000 (05:48 +0000)]
Use the --with-c-include-dirs configure option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Nov 2009 04:35:08 +0000 (04:35 +0000)]
Enhance Checker class (and GRExprEngine) to support PostVisitation for CallExprs. No clients (yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Nov 2009 04:16:35 +0000 (04:16 +0000)]
Remove GRExprEngine::EvalCall(). It had a single callsite in GRExprEngine, and was easily inlined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86948
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 12 Nov 2009 03:15:40 +0000 (03:15 +0000)]
Random const correctness, and incidentally use computeDeclContext when building
a using declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:59 +0000 (02:53 +0000)]
Move TokenCache option to PreprocessorOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86940
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:48 +0000 (02:53 +0000)]
Switch PTHManager to using diagnostics for most errors.
Also, always give errors on a token-cache PTH failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:34 +0000 (02:53 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86938
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:27 +0000 (02:53 +0000)]
clang-cc: Refactor ParseInputFollow to clearly split on the two primary cases,
when we are running an AST consumer and when we are just running the
preprocessor or parser alone.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:20 +0000 (02:53 +0000)]
clang-cc: Factor ReadPCHFile out of ProcessInputFile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86936
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:13 +0000 (02:53 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 02:53:06 +0000 (02:53 +0000)]
clang-cc: Unify InitializeSourceManager calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 12 Nov 2009 02:48:32 +0000 (02:48 +0000)]
Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86932
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 12 Nov 2009 02:10:34 +0000 (02:10 +0000)]
Note to self: don't leave debugging statements in the code for four hours.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86931
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 01:36:27 +0000 (01:36 +0000)]
clang-cc: Move non-Consumer action handling to common location, to expose the massive amount of redundancy we have introduced through blind copy-and-paste.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 01:36:20 +0000 (01:36 +0000)]
Fix PCH/preprocess test to be more useful, and unbreak -E mode with implicit
PCH, which I broke.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 12 Nov 2009 00:51:46 +0000 (00:51 +0000)]
Do not use StringRef while using DebugInfo interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 12 Nov 2009 00:46:20 +0000 (00:46 +0000)]
Improve recovery in a wonky case where one tries to specialize a
template template parameter.
When building a template-id type, check whether the template-name
itself is dependent (even if the template arguments are not!) and
handle it as a template-id type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 12 Nov 2009 00:41:49 +0000 (00:41 +0000)]
Fix Makefile dependency bug with out-of-dir builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86912
91177308 -0d34-0410-b5e6-
96231b3b80d8