Commit Graph

71949 Commits

Author SHA1 Message Date
Zhongxing Xu c4902a52a0 Hook up Malloc checker.
llvm-svn: 87093
2009-11-13 07:25:27 +00:00
Zhongxing Xu a4276b091d Check in a new interface of Checker, which will soon be used.
llvm-svn: 87092
2009-11-13 06:53:04 +00:00
Zhongxing Xu 0320ad28c7 GRStateManager::CurrentStmt is not used. Remove it.
llvm-svn: 87091
2009-11-13 06:04:01 +00:00
Daniel Dunbar 7d75afc56a Add CompilerInstance::createDiagnostics, and move clang-cc to it.
clang-cc.cpp is now under 1k lines, if anyone is counting.

llvm-svn: 87090
2009-11-13 05:52:34 +00:00
Daniel Dunbar 210a80086b Add a FIXME.
llvm-svn: 87089
2009-11-13 05:52:19 +00:00
Daniel Dunbar aaa148fd36 Add Preprocessor to CompilerInstance, and move clang-cc CreatePreprocessor to
CompilerInstance::createPreprocessor.

llvm-svn: 87088
2009-11-13 05:52:11 +00:00
Daniel Dunbar 1b4441915a Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.
llvm-svn: 87087
2009-11-13 05:51:54 +00:00
Zhongxing Xu 1721ef7a53 Include header for printf.
llvm-svn: 87086
2009-11-13 05:46:16 +00:00
Rafael Espindola 46129b0934 Use StringRef::split instead of SplitString.
llvm-svn: 87085
2009-11-13 05:13:58 +00:00
Rafael Espindola ff2c72b858 Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
"a" + 0.

llvm-svn: 87084
2009-11-13 04:55:09 +00:00
Anders Carlsson e828c36933 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.

llvm-svn: 87083
2009-11-13 04:45:41 +00:00
Anders Carlsson 78cfaa9e56 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.

llvm-svn: 87082
2009-11-13 04:34:45 +00:00
Anders Carlsson 87f84c1e72 Move GlobalDecl to its own file. Also add DenseMapInfo traits.
llvm-svn: 87081
2009-11-13 04:25:07 +00:00
Daniel Dunbar 546a676ae5 Add {File,Source}Manager to CompilerInstance.
llvm-svn: 87079
2009-11-13 04:12:06 +00:00
Daniel Dunbar 636404a330 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.

llvm-svn: 87078
2009-11-13 03:51:44 +00:00
Ted Kremenek 2466e0d92f Only flush plist diagnostics once.
llvm-svn: 87073
2009-11-13 03:14:14 +00:00
Ted Kremenek da00234109 Fix recently introduced use-after-free error reported in <rdar://problem/7387478>.
llvm-svn: 87072
2009-11-13 03:02:57 +00:00
Mike Stump fa81808a11 Refine construction vtables; they don't include bits that don't have
virtual bases unless they are morally virtual.

llvm-svn: 87071
2009-11-13 02:35:38 +00:00
Devang Patel 76a06074eb Revert r87059 for now. It is failing clang tests.
llvm-svn: 87070
2009-11-13 02:27:33 +00:00
Devang Patel 97f99fa554 Ignore nameless variables.
llvm-svn: 87069
2009-11-13 02:25:26 +00:00
Rafael Espindola 7c6854995d Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
llvm-svn: 87068
2009-11-13 02:18:25 +00:00
Mike Stump 653d0b99df Refine the construction vtables with respect to offsets. WIP.
llvm-svn: 87067
2009-11-13 02:13:54 +00:00
Daniel Dunbar 27b19dc1b5 Move input kind identification (-x) into FrontendOptions.
llvm-svn: 87066
2009-11-13 02:06:12 +00:00
Ted Kremenek 3c55718016 Pull static variable within function (for slightly faster startup time).
llvm-svn: 87065
2009-11-13 01:58:01 +00:00
Mike Stump 83066c8dee Allow the tracking of address points for construction vtables as well.
llvm-svn: 87063
2009-11-13 01:54:23 +00:00
Ted Kremenek a2968e59e3 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.
llvm-svn: 87062
2009-11-13 01:54:21 +00:00
Dale Johannesen 5f4eecf961 Adjust isConstantSplat to allow for big-endian targets.
PPC is such a target; make it work.

llvm-svn: 87060
2009-11-13 01:45:18 +00:00
Victor Hernandez 41e7648e09 Remove unnecessary llvm.dbg.declare bitcast
llvm-svn: 87059
2009-11-13 01:44:55 +00:00
Rafael Espindola d554e44092 Add a new split method to StringRef that puts the substrings in a vector.
llvm-svn: 87058
2009-11-13 01:24:40 +00:00
Jim Grosbach 46a524c3e8 Block renumbering
llvm-svn: 87056
2009-11-13 01:19:24 +00:00
Jim Grosbach 969910b3e8 use lower case for readability
llvm-svn: 87054
2009-11-13 01:17:22 +00:00
Ted Kremenek aedb7434c8 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.
llvm-svn: 87053
2009-11-13 01:15:47 +00:00
Daniel Dunbar 1e886ebe8c Move -target-{triple,abi} options into FrontendOptions.
llvm-svn: 87051
2009-11-13 01:02:19 +00:00
Daniel Dunbar 4a1f60f777 Move code completion options to clang-cc
llvm-svn: 87050
2009-11-13 01:02:10 +00:00
Daniel Dunbar 3f75f5ddcb Update test.
llvm-svn: 87049
2009-11-13 01:01:58 +00:00
Chris Lattner 956d71a63a add a fixme, inheriting from PointerIntPair is gross :)
llvm-svn: 87048
2009-11-13 00:57:01 +00:00
David Greene 2f4c37425b Fix a bootstrap failure.
Provide special isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE
interfaces to explicitly request checking for post-frame ptr elimination
operands.  This uses a heuristic so it isn't reliable for correctness.

llvm-svn: 87047
2009-11-13 00:29:53 +00:00
Daniel Dunbar a5c3d989fb Move FixItAtLocations into FrontendOptions
llvm-svn: 87046
2009-11-12 23:52:56 +00:00
Daniel Dunbar eb51586a85 clang-cc: Keep Verbose option with HeaderSearchOptions, for now.
llvm-svn: 87045
2009-11-12 23:52:46 +00:00
Daniel Dunbar f996c05d74 Add FrontendOptions, and starting moving clang-cc to it.
llvm-svn: 87044
2009-11-12 23:52:32 +00:00
Mike Stump 2b34bc5a96 Refine which vtbl is refernced in VTTs.
llvm-svn: 87043
2009-11-12 23:36:21 +00:00
Owen Anderson e96b2111b1 Re-enable this code, since redundant PHIs are now being better nuked.
llvm-svn: 87042
2009-11-12 23:22:41 +00:00
Mike Stump ca0de33113 Refine offsets into vtables for the VTT.
llvm-svn: 87041
2009-11-12 23:14:15 +00:00
Bill Wendling c781d7a072 Simplify code a bit
llvm-svn: 87040
2009-11-12 23:13:08 +00:00
Mike Stump 8677bc27bf Refine vtable pointers for secondary vtables inside VTTs to point to
the right base vtable.  WIP.

llvm-svn: 87039
2009-11-12 22:56:32 +00:00
Douglas Gregor 9533e2803f We need the definition of NamedDecl in DeclContextInternals.h, since Clang is type-checking the template definition more thoroughly
llvm-svn: 87037
2009-11-12 22:12:17 +00:00
Bill Wendling e412064c4c Refactor code that checks if it's a call to a "nounwind" function.
llvm-svn: 87036
2009-11-12 21:59:20 +00:00
Chris Lattner 5c89f4b4ef use isInstructionTriviallyDead, as pointed out by Duncan
llvm-svn: 87035
2009-11-12 21:58:18 +00:00
David Greene 033d65581d Do some cleanups suggested by Chris.
llvm-svn: 87034
2009-11-12 21:49:55 +00:00
Daniel Dunbar 5fb4e7553c StringRef(const char*) should not be used to turn null pointers into empty
strings.

llvm-svn: 87031
2009-11-12 21:26:11 +00:00