Benjamin Kramer
401e6093c9
Fix some CHECK lines which were ignored by accident.
...
llvm-svn: 91214
2009-12-12 09:25:50 +00:00
Douglas Gregor
fab31f47b2
When certain diagnostics involving run-time behavior would be emitted
...
in a potentially potentially evaluated context, queue those
diagnostics and only emit them if the context ends up being
potentially evaluated. This completes the fix for PR5761.
llvm-svn: 91213
2009-12-12 07:57:52 +00:00
Douglas Gregor
c2744f5add
Give PartialDiagnostic copy semantics rather than move semantics, since we typically pass it by reference
...
llvm-svn: 91212
2009-12-12 07:48:51 +00:00
Douglas Gregor
413c6fc86c
Remove unnecessary pointers from PartialDiagnostic
...
llvm-svn: 91211
2009-12-12 07:31:50 +00:00
Douglas Gregor
7ca84af48e
Suppress warnings and errors about certain uses of non-POD types (in
...
__builtin_offsetof, passing through an ellipsis) when we're in an
unevaluated context. This is the first part of the fix to PR5761,
which deals with the simple case of an unevaluated context.
llvm-svn: 91210
2009-12-12 07:25:49 +00:00
Jeffrey Yasskin
9ad6ba3766
Revert r91208. Something on Linux prevents the JIT from looking up a symbol
...
defined in the test, and I don't have time tonight to figure it out.
llvm-svn: 91209
2009-12-12 06:18:46 +00:00
Jeffrey Yasskin
2d2dcdcbf7
Fix available_externally linkage for globals. It's probably still not
...
supported by emitGlobals, but I don't have a test case for that.
llvm-svn: 91208
2009-12-12 05:58:14 +00:00
Jeffrey Yasskin
1615d45daa
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
llvm-svn: 91207
2009-12-12 05:05:38 +00:00
Jeffrey Yasskin
7f1c9c2ff6
Make it easier to use the llvm_unreachable and DEBUG macros without "using
...
namespace llvm" by qualifying their implementations with ::llvm::.
llvm-svn: 91206
2009-12-12 04:08:32 +00:00
Eli Friedman
3950e8c411
Fix for PR4642: move work in HTMLPrinter out of the destructor.
...
llvm-svn: 91205
2009-12-12 03:36:52 +00:00
Anders Carlsson
60659a8249
Fix tyop.
...
llvm-svn: 91204
2009-12-12 02:43:16 +00:00
Jim Grosbach
8f9a3ac12c
Framework for atomic binary operations. The emitter for the pseudo instructions
...
just issues an error for the moment. The front end won't yet generate these
intrinsics for ARM, so this is behind the scenes until complete.
llvm-svn: 91200
2009-12-12 01:40:06 +00:00
Mike Stump
d954638f02
Implement runtime checks for undefined behavior. WIP.
...
This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:
T a[I];
a[i] abort when i < 0 or i >= I.
Future stuff includes shifts by >= bitwidth amounts.
llvm-svn: 91198
2009-12-12 01:27:46 +00:00
Eli Friedman
7cc35b76c3
Remove empty directory.
...
llvm-svn: 91197
2009-12-12 01:05:43 +00:00
Ted Kremenek
752ecd8818
We should only scan for nested blocks if we are analyzing the body of a function/method.
...
llvm-svn: 91196
2009-12-12 01:04:14 +00:00
Daniel Dunbar
3c6d1b52a0
Remove clang-cc tool, it has joined in unholy union with clang.
...
- tools/driver will be renamed to tools/clang at some point.
llvm-svn: 91195
2009-12-12 00:56:47 +00:00
Ted Kremenek
e1996c27eb
Convert the remainder of this test case over to using FileCheck.
...
llvm-svn: 91194
2009-12-12 00:42:52 +00:00
Daniel Dunbar
f075e62620
XFAIL this test on Win32 until I can take a look.
...
llvm-svn: 91193
2009-12-12 00:40:42 +00:00
Daniel Dunbar
62ee5340fc
Remove non-sensical FIXME.
...
llvm-svn: 91192
2009-12-12 00:39:58 +00:00
Ted Kremenek
eadc7c3537
Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.
...
llvm-svn: 91191
2009-12-12 00:38:18 +00:00
Anders Carlsson
e363c8e1df
Correctly diagnose [basic.stc.dynamic.allocation]p1
...
llvm-svn: 91190
2009-12-12 00:32:00 +00:00
Anders Carlsson
22f443f58c
Factor operator new declaration checking out into a separate function.
...
llvm-svn: 91189
2009-12-12 00:26:23 +00:00
Anders Carlsson
c0b2ce14cd
More work on improving the operator delete diagnostics.
...
llvm-svn: 91187
2009-12-12 00:16:02 +00:00
Douglas Gregor
9221e646f5
Switch the Emacs clang-completion-mode over to clang -cc1
...
llvm-svn: 91185
2009-12-11 23:47:56 +00:00
Bob Wilson
895f364ae6
Revise scalar replacement to be more flexible about handle bitcasts and GEPs.
...
While scanning through the uses of an alloca, keep track of the current offset
relative to the start of the alloca, and check memory references to see if
the offset & size correspond to a component within the alloca. This has the
nice benefit of unifying much of the code from isSafeUseOfAllocation,
isSafeElementUse, and isSafeUseOfBitCastedAllocation. The code to rewrite
the uses of a promoted alloca, after it is determined to be safe, is
reorganized in the same way.
Also, when rewriting GEP instructions, mark them as "in-bounds" since all the
indices are known to be safe.
llvm-svn: 91184
2009-12-11 23:47:40 +00:00
Daniel Dunbar
01bf3397a0
Tests: Stop looking for clang-cc, we don't need it.
...
llvm-svn: 91183
2009-12-11 23:35:10 +00:00
Anders Carlsson
f1f469554c
Fix build.
...
llvm-svn: 91182
2009-12-11 23:31:21 +00:00
Dan Gohman
619a78bd59
Delete an unnecessary line. The VTSDNode on a SIGN_EXTEND_REG is never
...
a vector type.
llvm-svn: 91181
2009-12-11 23:26:08 +00:00
Anders Carlsson
12308f41e7
Improve diagnostics for malformed delete operator function declarations.
...
llvm-svn: 91180
2009-12-11 23:23:22 +00:00
Ted Kremenek
f5303fe492
scan-build: when the build command is 'make', override the CC and CXX options by passing them as arguments to make. This fixes <rdar://problem/6790224>.
...
llvm-svn: 91179
2009-12-11 23:22:52 +00:00
Daniel Dunbar
0910cf54ac
Update a few more docs references to clang-cc.
...
llvm-svn: 91178
2009-12-11 23:17:03 +00:00
Ted Kremenek
f92b446dd4
Remove more old references to clang-cc.
...
llvm-svn: 91177
2009-12-11 23:12:52 +00:00
Daniel Dunbar
520d1e6c6b
Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
...
llvm-svn: 91176
2009-12-11 23:04:35 +00:00
Anton Korobeynikov
e27e028cdd
Lower setcc branchless, if this is profitable.
...
Based on the patch by Brian Lucas!
llvm-svn: 91175
2009-12-11 23:01:29 +00:00
Daniel Dunbar
6c536aa0fb
Driver: Switch to using "clang" "-cc1" instead of "clang-cc".
...
llvm-svn: 91174
2009-12-11 23:00:49 +00:00
Daniel Dunbar
8c5024a63f
Tests: Change substitution to automagically use 'clang -cc1' instead of 'clang-cc'. I still plan to eventually rewrite the tests to clarify the magic (I will probably actually rewrite them to %clang so it is more obvious this is a variable that gets substituted).
...
llvm-svn: 91173
2009-12-11 22:52:03 +00:00
Ted Kremenek
5c512e63f4
Convert scan-build and ccc-analyzer over to using 'clang -cc1' instead of using 'clang-cc'.
...
llvm-svn: 91172
2009-12-11 22:44:53 +00:00
Fariborz Jahanian
ffe912c647
Patch to allow C-style cast from 'void *' to block pointer type.
...
(fixes radar 7465023).
llvm-svn: 91171
2009-12-11 22:40:48 +00:00
Daniel Dunbar
f72bdf7eed
Implement clang -cc1.
...
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.
llvm-svn: 91170
2009-12-11 22:20:12 +00:00
John McCall
76d0994ffd
StmtDumper::VisitUnresolvedLookupExpr
...
llvm-svn: 91163
2009-12-11 21:50:11 +00:00
Bill Wendling
b87b9925be
Don't try to move a MBB into the fall-through position if it's a landing pad or
...
branches only to a landing pad. Without this check, the compiler would go into
an infinite loop because the branch to a landing pad is an "abnormal" edge which
wasn't being taken into account.
This is the meat of that fix:
if (!PrevBB.canFallThrough() && !MBB->BranchesToLandingPad(MBB)) {
The other stuff is simplification of the "branches to a landing pad" code.
llvm-svn: 91161
2009-12-11 21:47:36 +00:00
Devang Patel
b314bd688a
Construct CompileUnits lazily.
...
llvm-svn: 91159
2009-12-11 21:37:07 +00:00
Dan Gohman
1d459e4937
Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.
...
llvm-svn: 91158
2009-12-11 21:31:27 +00:00
Fariborz Jahanian
8811885366
Consider conversion of objective-c pointer to 'bool' a
...
valid standard conversion to match g++'s behaviour.
llvm-svn: 91157
2009-12-11 21:23:13 +00:00
Eli Friedman
b095e15af4
Fix for PR5714: make sure globals that will be modified aren't marked const.
...
llvm-svn: 91156
2009-12-11 21:23:03 +00:00
Benjamin Kramer
4dab76a752
Switch PathDiagnostic to StringRef.
...
llvm-svn: 91155
2009-12-11 21:09:27 +00:00
Benjamin Kramer
2942150df0
Fix two typos.
...
llvm-svn: 91154
2009-12-11 20:53:46 +00:00
John McCall
d53cee1aa0
Reorganize testcase.
...
llvm-svn: 91153
2009-12-11 20:51:23 +00:00
Eli Friedman
3ace52b3a7
Fix linkage of type info and vtable for classes without linkage.
...
llvm-svn: 91152
2009-12-11 20:48:18 +00:00
Jim Grosbach
22a4ea8690
memory barrier instructions by definition have side effects. This prevents the post-RA scheduler from moving them around.
...
llvm-svn: 91150
2009-12-11 20:29:53 +00:00