Sam Weinig
4e83bd2795
Fix for PR5872. Add static specifier and const/volatile qualifiers to member functions in __PRETTY_FUNCTION__ predefined expressions.
...
llvm-svn: 92171
2009-12-27 01:38:20 +00:00
Daniel Dunbar
54f330f342
Tests: Tweak LLVM-Code-Symbols test to ignore common and undefined symbols for
...
now, let's start small.
llvm-svn: 92170
2009-12-26 22:58:48 +00:00
Daniel Dunbar
2f57d9ad64
lit: Add setuptools support.
...
llvm-svn: 92169
2009-12-26 22:58:39 +00:00
Daniel Dunbar
ea21448978
lit: Sink code into a 'lit' package.
...
llvm-svn: 92168
2009-12-26 22:58:23 +00:00
Eli Friedman
ac6216d84c
PR5886: Make sure IMUL32m is marked as setting EFLAGS, so scheduling doesn't
...
do illegal stuff around it. No testcase because the issue is very fragile.
llvm-svn: 92167
2009-12-26 20:08:30 +00:00
Eli Friedman
e14b1997db
Don't look through casts when looking for the underlying decl for a function
...
call; the standard doesn't expect us to, and the program could be doing
something crazy. Fixes PR5882.
llvm-svn: 92166
2009-12-26 03:35:45 +00:00
Eli Friedman
11c7b15148
Attempted fix for PR5884; this code will be dead soon, but this fix should
...
help for the moment.
llvm-svn: 92165
2009-12-25 23:59:21 +00:00
Daniel Dunbar
b2138e5529
Driver: Use "g++" as generic gcc name when running in C++ mode, for platforms
...
that lack real tool definitions.
llvm-svn: 92164
2009-12-25 20:21:23 +00:00
Benjamin Kramer
c06181b2a7
Make sure operator new[] and operator delete[] match. This will hopefully silence 3 remaining MSVC warnings.
...
llvm-svn: 92163
2009-12-25 17:06:27 +00:00
Benjamin Kramer
d20ef75b91
Remove some dead variables clang-analyzer found.
...
llvm-svn: 92162
2009-12-25 15:43:36 +00:00
Bill Wendling
6ce6d268a6
Avoid assigning to Changed when it won't be used after the return.
...
llvm-svn: 92160
2009-12-25 13:50:18 +00:00
Bill Wendling
ec030f2f01
Remove dead store.
...
llvm-svn: 92159
2009-12-25 13:45:50 +00:00
Bill Wendling
49fac47c83
Remove dead store from copy-pasto.
...
llvm-svn: 92158
2009-12-25 13:44:36 +00:00
Bill Wendling
8d1f801a01
Remove dead store.
...
llvm-svn: 92157
2009-12-25 13:39:58 +00:00
Bill Wendling
ba27bef114
Remove dead store.
...
llvm-svn: 92156
2009-12-25 13:37:27 +00:00
Bill Wendling
b45a3d8de4
Use the 'MadeChange' variable instead of returning 'false' all of the time.
...
llvm-svn: 92155
2009-12-25 13:35:40 +00:00
Benjamin Kramer
a713b5d9a8
Fix typo spotted by MSVC.
...
GRExprEngine.cpp(1348) : warning C4305: 'argument' : truncation from 'clang::ProgramPoint::Kind' to 'bool'
llvm-svn: 92154
2009-12-25 09:44:02 +00:00
Eli Friedman
b8841af8bd
Minor optimization; emit proper unsupported messages for a couple of cases.
...
llvm-svn: 92153
2009-12-25 06:17:05 +00:00
Eli Friedman
2e06e8bbcc
Some small improvements to dead code elimination; helps a bit on
...
LLVM-Code-Symbols test.
llvm-svn: 92152
2009-12-25 05:29:40 +00:00
Eli Friedman
fddc26cc64
Make copy constructor elimination work in more cases; the case in question
...
here affects clang-on-clang.
llvm-svn: 92151
2009-12-24 23:33:34 +00:00
John McCall
dd5044ac55
Implement support for converting to string at "natural precision", and fix some
...
major bugs in long-precision conversion.
llvm-svn: 92150
2009-12-24 23:18:09 +00:00
Sam Weinig
07d211ea40
Fix for PR5844. Be explicit about anonymous struct/class/union/namespaces in __PRETTY_FUNCTION__ predefined expression.
...
llvm-svn: 92149
2009-12-24 23:15:03 +00:00
Anders Carlsson
fb404888af
Move a bunch of class related functions to CGClass.cpp, no functionality change.
...
llvm-svn: 92148
2009-12-24 22:46:43 +00:00
Daniel Dunbar
c19b219280
Sketch a simple new C++Tests suite for checking that llvm-gcc and clang generate
...
the same visible symbols, useful for finding ABI/Mangler/vtable/etc. issues.
llvm-svn: 92147
2009-12-24 21:27:38 +00:00
Douglas Gregor
4ee2cf658c
Move the two definitions of operator<< into namespace llvm, so they
...
will be found by argument-dependent lookup. As with the previous
commit, GCC is allowing ill-formed code.
llvm-svn: 92146
2009-12-24 21:15:37 +00:00
Anders Carlsson
bfb3671b25
Pass the return value slot to all call exprs.
...
llvm-svn: 92145
2009-12-24 21:13:40 +00:00
Douglas Gregor
1f21000902
Define the new operator<< for sets into namespace std, so that
...
argument-dependent lookup can find it. This is another case where an
LLVM bug (not making operator<< visible) was masked by a GCC bug
(looking in the global namespace when it shouldn't).
llvm-svn: 92144
2009-12-24 21:11:45 +00:00
Douglas Gregor
33636e66c7
Egregious, disgusting workaround for PR5866. We need to rework how we
...
keep track of friends within templates, which will provide a real for
PR5866. For now, this makes sure we don't do something entirely stupid
with friends of specializations.
llvm-svn: 92143
2009-12-24 20:56:24 +00:00
Anders Carlsson
1749083e2e
Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.
...
llvm-svn: 92142
2009-12-24 20:40:36 +00:00
Douglas Gregor
4b65441598
Add test case for PR5868, and improve location information slightly for implicit "this" expressions
...
llvm-svn: 92141
2009-12-24 20:23:34 +00:00
Anders Carlsson
b2d47e0eaa
Add a test for x86-64 struct returns under gc.
...
llvm-svn: 92140
2009-12-24 20:21:41 +00:00
Douglas Gregor
8e8eaa14f7
When rebuilding a MemberExpr that refers to an anonymous union, be
...
sure to perform derived-to-base conversions on the base
expression. Fixes PR5868. Proper testcase is coming soon.
llvm-svn: 92139
2009-12-24 20:02:50 +00:00
Anders Carlsson
61a401caec
Pass ReturnValueSlot to EmitCall. No functionality change yet.
...
llvm-svn: 92138
2009-12-24 19:25:24 +00:00
Daniel Dunbar
2db411f5a7
Fix -Asserts warning.
...
llvm-svn: 92137
2009-12-24 19:19:26 +00:00
Anders Carlsson
0435ed5875
Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.
...
llvm-svn: 92136
2009-12-24 19:08:58 +00:00
Douglas Gregor
363b151ff7
When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr
...
expressions (e.g., for template instantiation), just transform the
subexpressions and return those, since the temporary-related nodes
will be implicitly regenerated. Fixes PR5867, but I said that
before...
llvm-svn: 92135
2009-12-24 18:51:59 +00:00
Douglas Gregor
5c13090bd4
Fix double-destruction assertion to account for temporaries in conditionals
...
llvm-svn: 92134
2009-12-24 18:16:21 +00:00
Daniel Dunbar
54ed390727
Don't emit trailing semicolon.
...
llvm-svn: 92133
2009-12-24 17:49:28 +00:00
Douglas Gregor
4cd5d53ebf
Assert that we aren't trying to push the same C++ temporary onto the live temporary stack twice. A little insurance against PR5867 surprising us again
...
llvm-svn: 92132
2009-12-24 17:48:05 +00:00
Douglas Gregor
f82bead3fd
InitializationSequence handles binding to temporaries, so that
...
argument-passing doesn't have to. Fixes PR5867, where we were binding
a temporary twice in the AST and, therefore, calling its destructor
twice.
llvm-svn: 92131
2009-12-24 17:16:46 +00:00
John McCall
e6212ace38
Substantially optimize APFloat::toString() by doing a single large divide to
...
cut the significand down to the desired precision *before* entering the
core divmod loop. Makes the overall algorithm logarithmic in the exponent.
There's still a lot of room for improvement here, but this gets the
performance back down to acceptable-for-diagnostics levels, even for
long doubles.
negligible, even on long doubles.
llvm-svn: 92130
2009-12-24 12:16:56 +00:00
John McCall
122c8313ff
Fix the clang-on-clang build: APFloat reports underflow whenever we get a
...
denormal, but we only want to diagnose if we underflowed to zero. This
allows people to write constants in the denormal range.
llvm-svn: 92129
2009-12-24 11:09:08 +00:00
John McCall
0e21fccfae
Tweak the text of several main() diagnostics and punch a hole specifically for
...
Darwin's sekrit fourth argument. This should probably be factored to
let targets make target-specific decisions about what main() should look like.
Fixes rdar://problem/7414990
or if different platforms have radically different ideas of what they want in
llvm-svn: 92128
2009-12-24 09:58:38 +00:00
John McCall
53b93a091e
Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641
...
llvm-svn: 92127
2009-12-24 09:08:04 +00:00
John McCall
29b5c284ae
Add accessors for the largest-magnitude, smallest-magnitude, and
...
smallest-normalized-magnitude values in a given FP semantics.
Provide an APFloat-to-string conversion which I am quite ready to admit could
be much more efficient.
llvm-svn: 92126
2009-12-24 08:56:26 +00:00
John McCall
bd8d1e35a6
Set Remainder before Quotient in case Quotient and LHS alias. The new
...
order should be immune to such problems.
llvm-svn: 92124
2009-12-24 08:52:06 +00:00
Mike Stump
d538a6d364
Remove some dead code.
...
llvm-svn: 92123
2009-12-24 07:29:41 +00:00
Mike Stump
4a779b93e4
Cleanup some dead code.
...
llvm-svn: 92122
2009-12-24 06:52:05 +00:00
Zhongxing Xu
51f1ca852f
As Ted suggested, record the callsite information with the StackFrameContext.
...
llvm-svn: 92121
2009-12-24 03:34:38 +00:00
Ted Kremenek
fd97ce6573
Add analyzer test case for 'ForStmt' with condition variable.
...
llvm-svn: 92120
2009-12-24 02:41:19 +00:00