Commit Graph

74046 Commits

Author SHA1 Message Date
Eli Friedman 8eada9f580 Remove some stuff that's already implemented. Also, remove the note about
merging x >u 5 and x <s 20 because it's impossible to implement.

llvm-svn: 91228
2009-12-12 21:41:48 +00:00
Fariborz Jahanian 751c1e7b24 patch to add a property from a protocol to a class that adopts the protocol.
(fixes radar 7466494).

llvm-svn: 91227
2009-12-12 21:26:21 +00:00
Daniel Dunbar e4b5f9f54c Update install-clang target for clang-cc removal.
llvm-svn: 91226
2009-12-12 21:17:54 +00:00
Evan Cheng 26fdd7265b Disable r91104 for x86. It causes partial register stall which pessimize code in 32-bit.
llvm-svn: 91223
2009-12-12 20:03:14 +00:00
Ted Kremenek 3b90ed2628 Update checker build.
llvm-svn: 91222
2009-12-12 19:06:20 +00:00
Anton Korobeynikov d8f320947f Implement variable-width shifts.
No testcase yet - it seems we're exposing generic codegen bugs.

llvm-svn: 91221
2009-12-12 18:55:37 +00:00
Evan Cheng 3974c8de51 Add comment about potential partial register stall.
llvm-svn: 91220
2009-12-12 18:55:26 +00:00
Evan Cheng 6d6eaafa8c Fix an obvious bug. No test case since LEA16r is not being used.
llvm-svn: 91219
2009-12-12 18:51:56 +00:00
Douglas Gregor 6131b44183 Rework the way we handle template instantiation for
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).

Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:

  - We don't need to instantiate anything that doesn't have a direct
    correlation to the source code, so we can have better location
    information.
  - Semantic analysis sees the same thing at template instantiation
    time that it would see for a non-template.
  - At least one ugly hack (VarDecl initializers) goes away.

Fixes PR5755.

llvm-svn: 91218
2009-12-12 18:16:41 +00:00
Torok Edwin 5c9429fa47 Enable CPU detection when using MS VS 2k8 too.
MSVS2k8 doesn't define __i386__, hence all the CPU detection code was disabled.
Enable it by looking for _MSC_VER.

llvm-svn: 91217
2009-12-12 12:42:31 +00:00
Zhongxing Xu c0484fa611 Add initial support for realloc() in MallocChecker.
llvm-svn: 91216
2009-12-12 12:29:38 +00:00
John McCall 9dab4e68b9 Remember the type name's scope specifier in the DeclSpec.
llvm-svn: 91215
2009-12-12 11:40:51 +00:00
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