Dan Gohman
f80dc08059
Don't let a noalias difference disrupt the tailcall optimization.
...
llvm-svn: 88672
2009-11-13 18:49:38 +00:00
Ted Kremenek
4ef13f8ac9
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.
llvm-svn: 88671
2009-11-13 18:46:29 +00:00
Douglas Gregor
379d84b7ed
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.
llvm-svn: 88670
2009-11-13 18:44:21 +00:00
Douglas Gregor
07eae02fc7
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.
llvm-svn: 88668
2009-11-13 18:34:26 +00:00
Daniel Dunbar
420b0f1bd8
Add CompilerInstance utility functions for creating output files.
...
llvm-svn: 88667
2009-11-13 18:32:08 +00:00
Anders Carlsson
fb4dda4fed
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!
llvm-svn: 88663
2009-11-13 17:08:56 +00:00
Anders Carlsson
97df0b40c3
Don't bind arguments to temporaries if the argument has a reference type.
...
llvm-svn: 88662
2009-11-13 17:04:35 +00:00
Daniel Dunbar
045f917edc
Remove local splitLines reimplementation.
...
llvm-svn: 88661
2009-11-13 16:46:11 +00:00
David Greene
a32c214b23
Remove duplicate APIs and state WRT spill objects.
...
llvm-svn: 87106
2009-11-13 14:42:06 +00:00
Daniel Dunbar
566eeb2da5
Add output file list to CompilerInstance, so that it can track them instead of
...
forcing all clients to do it.
llvm-svn: 87103
2009-11-13 10:37:48 +00:00
Daniel Dunbar
ac28c38737
clang-cc: Move output file initialization closer to use.
...
llvm-svn: 87102
2009-11-13 10:18:59 +00:00
Daniel Dunbar
39991862e1
Simplify, in anticipation of introducing explicit action instances.
...
llvm-svn: 87101
2009-11-13 09:57:06 +00:00
Daniel Dunbar
f7093b5ae8
Add CodeCompletion consumer to CompilerInvocation.
...
llvm-svn: 87100
2009-11-13 09:36:05 +00:00
Daniel Dunbar
242ea9a05a
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.
llvm-svn: 87099
2009-11-13 08:58:20 +00:00
Daniel Dunbar
599313ef94
Add CompilerInstance::createPCHExternalASTSource.
...
llvm-svn: 87097
2009-11-13 08:21:10 +00:00
Daniel Dunbar
adf6c242a0
Add CompilerInstance::has* methods for testing if the instance has a particular
...
subobject.
llvm-svn: 87096
2009-11-13 08:20:57 +00:00
Daniel Dunbar
df3e30c41c
Add ASTContext to CompilerInstance.
...
llvm-svn: 87095
2009-11-13 08:20:47 +00:00
Zhongxing Xu
c7460964ac
Malloc checker basically works now.
...
llvm-svn: 87094
2009-11-13 07:48:11 +00:00
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