]>
granicus.if.org Git - clang/log
Nate Begeman [Tue, 15 Dec 2009 18:13:04 +0000 (18:13 +0000)]
Support OpenCL 1.1 odd-length vector component accessors.
For hi/odd of an odd-length vector, the last component is undefined. Since
we shuffle with an undef vector, no CodeGen needs to change to support this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 15 Dec 2009 18:02:45 +0000 (18:02 +0000)]
Add testcase for recent checkin.
Patch by Chip Davis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 15 Dec 2009 17:30:20 +0000 (17:30 +0000)]
Implement conditional block invocation rewrite
and some clean up and a block rewriter test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 15 Dec 2009 16:44:32 +0000 (16:44 +0000)]
Fix some diagnostic-related FIXMEs, from Nicola Gigante
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 15 Dec 2009 16:28:32 +0000 (16:28 +0000)]
Elaborated types are specifier types, based on a patch from Cornelius
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 15 Dec 2009 09:32:42 +0000 (09:32 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 15 Dec 2009 09:09:49 +0000 (09:09 +0000)]
Remove displayProgress parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 07:30:12 +0000 (07:30 +0000)]
move isPodLike<clang::QualType> out to Type.h. We don't
want some clients of QualType to think it's a pod and some to
not know it is.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 07:26:51 +0000 (07:26 +0000)]
update to match LLVM API change:
Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 15 Dec 2009 05:29:09 +0000 (05:29 +0000)]
Add -W[no-]variadic-macros support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 15 Dec 2009 04:55:58 +0000 (04:55 +0000)]
Forward -isysroot to clang -cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 15 Dec 2009 04:24:24 +0000 (04:24 +0000)]
Fix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh),
note_previous_decl was used where note_previous_declaration was intended. Better
names or PR5785 might be nice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Dec 2009 04:12:12 +0000 (04:12 +0000)]
Until we can make the dead stores checker smarter, dont' emit dead store warnings for C++ objects (whose constructors/destructors have possible side-effects).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 15 Dec 2009 03:31:17 +0000 (03:31 +0000)]
Fix a small bug in ComputeMethodVtableIndices.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 15 Dec 2009 03:22:41 +0000 (03:22 +0000)]
Really fix this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 15 Dec 2009 03:11:10 +0000 (03:11 +0000)]
This patch should fix PR2461. It allows clang to apply the noreturn
attribute to function pointers. It also fixes Sema to check function
pointers for the noreturn attribute when checking for fallthrough.
Patch by Chip Davis, with a slight fix to pass the testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Dec 2009 02:35:54 +0000 (02:35 +0000)]
scan-build/ccc-analyzer: start analyzing C++ FTW.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91398
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 15 Dec 2009 02:20:06 +0000 (02:20 +0000)]
Fix test broken by my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91396
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 15 Dec 2009 02:19:47 +0000 (02:19 +0000)]
Diagnose the use of typedefs for template specialization types in the scope
specifiers for out-of-line declarations, e.g.
typedef Temp<int> MyTemp;
template <> MyTemp::foo;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 15 Dec 2009 02:06:15 +0000 (02:06 +0000)]
Don't force the emission of destructor definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91394
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Dec 2009 01:51:03 +0000 (01:51 +0000)]
set up the machinery for a MacroArgs cache hanging off Preprocessor.
We creating and free thousands of MacroArgs objects (and the related
std::vectors hanging off them) for the testcase in PR5610 even though
there are only ~20 live at a time. This doesn't actually use the
cache yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91391
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Dec 2009 01:38:04 +0000 (01:38 +0000)]
Start the ball rolling on C++ support in the static analyzer. For
now, don't construct CFGs that contain C++ try/catch statements, and
have GRExprEngine abort a path if it encounters a C++ construct it
doesn't understand (which is mostly everything at this point).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 15 Dec 2009 01:22:35 +0000 (01:22 +0000)]
Fix spacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 15 Dec 2009 01:02:52 +0000 (01:02 +0000)]
Driver: Pass -resource-dir to clang -cc1, since the driver presumably already found itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 15 Dec 2009 00:59:40 +0000 (00:59 +0000)]
Ensure we preserve line information for each trap for
-fcatch-undefined-behavior if we aren't optimizing. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 15 Dec 2009 00:35:12 +0000 (00:35 +0000)]
Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap
instead of abort to improve codesize and codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Dec 2009 00:32:46 +0000 (00:32 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91373
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 15 Dec 2009 00:06:45 +0000 (00:06 +0000)]
Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 15 Dec 2009 00:01:57 +0000 (00:01 +0000)]
Implement value initialization in InitializationSequence; untested
WIP, yet again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 14 Dec 2009 23:53:10 +0000 (23:53 +0000)]
Add documentation for recently added code. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91367
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 14 Dec 2009 23:19:40 +0000 (23:19 +0000)]
Fix PR5716 by bandaging over the solution until we can come back to it.
I apologize for friend declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 22:17:35 +0000 (22:17 +0000)]
Make test more generic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91349
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Dec 2009 22:15:06 +0000 (22:15 +0000)]
Fix: <rdar://problem/
7468209 > SymbolManager::isLive() should not crash on captured block variables that are passed by reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91348
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 14 Dec 2009 22:14:31 +0000 (22:14 +0000)]
We have to allow one to form an address for one past the end. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 22:12:52 +0000 (22:12 +0000)]
move the VarargsElided member of MacrosArgs to shrink the MacroArgs struct
on 64-bit targets. Pass Preprocessor into create/destroy methods of MacroArgs
even though it isn't used yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 22:02:43 +0000 (22:02 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 14 Dec 2009 21:58:14 +0000 (21:58 +0000)]
Add support for detecting undefined shift behavior. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 21:35:01 +0000 (21:35 +0000)]
Patch to fix 32-bit @try failure with internal assertion when compiling
an Objective-C rethrow nested inside another try/catch block. (fixes radar
7466728 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Dec 2009 20:58:24 +0000 (20:58 +0000)]
Remove accidental commit containing local paths for the LLVM-Code-Syntax test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Dec 2009 20:57:13 +0000 (20:57 +0000)]
Minor cleanups for constructor initialization in InitializationSequence
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91325
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 14 Dec 2009 20:52:00 +0000 (20:52 +0000)]
Simplifiy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Dec 2009 20:49:26 +0000 (20:49 +0000)]
Constructor initialization for InitializationSequence. Untested WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Dec 2009 19:27:10 +0000 (19:27 +0000)]
Improve template instantiation for object constructions in several ways:
- During instantiation, drop default arguments from constructor and
call expressions; they'll be recomputed anyway, and we don't want
to instantiate them twice.
- Rewrote the instantiation of variable initializers to cope with
non-dependent forms properly.
Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 18:38:32 +0000 (18:38 +0000)]
Make test pass in all cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91309
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 18:18:29 +0000 (18:18 +0000)]
Fixes an incomplete test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91304
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 18:00:56 +0000 (18:00 +0000)]
Make tests use the new clang -cc1 flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 17:51:07 +0000 (17:51 +0000)]
Make tests use the new clang cc1 flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 17:47:10 +0000 (17:47 +0000)]
Make tests use the new clang -cc1 flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 17:43:07 +0000 (17:43 +0000)]
Make tests use the new clang -cc1 flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 17:36:25 +0000 (17:36 +0000)]
Change tests to use clang -cc1...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Dec 2009 17:27:33 +0000 (17:27 +0000)]
Implement user-defined conversions in InitializationSequence. WPI that
isn't turned on anyway yet, so it cannot be tested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 17:14:55 +0000 (17:14 +0000)]
Test uses the new clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 14 Dec 2009 17:13:18 +0000 (17:13 +0000)]
Tests use the new clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 14 Dec 2009 16:27:04 +0000 (16:27 +0000)]
When rebuilding CXXConstructExprs after a transformation, use
CompleteConstructorCall to perform type-checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 14 Dec 2009 06:34:20 +0000 (06:34 +0000)]
Replace clang-cc with clang -cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91272
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 06:16:57 +0000 (06:16 +0000)]
teach clang to recover gracefully from conflict markers left in source
files: PR5238.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91270
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 14 Dec 2009 05:15:02 +0000 (05:15 +0000)]
Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 05:03:13 +0000 (05:03 +0000)]
this was a couple bugzillas too
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 05:00:18 +0000 (05:00 +0000)]
fix rdar://
7466570 - Be more bug compatible with GCC when it comes to
expanding directives withing macro expansions. This is undefined behavior
according to 6.10.3p11, so we might as well be undefined in ways similar to
GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 04:57:53 +0000 (04:57 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 14 Dec 2009 04:57:03 +0000 (04:57 +0000)]
Support x86's PALIGNR instruction without the use of a palignr intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 04:54:40 +0000 (04:54 +0000)]
formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 04:26:45 +0000 (04:26 +0000)]
reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 14 Dec 2009 02:13:39 +0000 (02:13 +0000)]
Use insert to avoid destroying existing nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 14 Dec 2009 01:45:37 +0000 (01:45 +0000)]
Mangle unary, binary and ternary expressions correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 14 Dec 2009 00:51:04 +0000 (00:51 +0000)]
Rename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 23:47:29 +0000 (23:47 +0000)]
Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Dec 2009 21:37:05 +0000 (21:37 +0000)]
Fix PR5756 a different, better way: we don't have a "pointer
conversion to void*" according to C++ [over.ics.rank]p4b2 if the type
we're converting from is not a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Dec 2009 21:29:20 +0000 (21:29 +0000)]
Don't assume that all conversions to a void pointer are converting
from a PointerType. Fixes PR5756.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Dec 2009 20:44:55 +0000 (20:44 +0000)]
Fix template instantiation for non-dependent calls to overloaded call
operators. Fixes PR5266.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 20:34:34 +0000 (20:34 +0000)]
Don't use a cookie if the global placement new function is used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 20:10:12 +0000 (20:10 +0000)]
Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91249
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 20:04:38 +0000 (20:04 +0000)]
More array cookie improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91247
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 18:48:07 +0000 (18:48 +0000)]
If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 18:30:34 +0000 (18:30 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 17:53:43 +0000 (17:53 +0000)]
More improvements to checking allocation and deallocation functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 16:38:01 +0000 (16:38 +0000)]
Change the RTTIBuilder's finish member function to take a pointer to the constants array + the length of the array.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 03:46:13 +0000 (03:46 +0000)]
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 03:45:58 +0000 (03:45 +0000)]
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 02:20:49 +0000 (02:20 +0000)]
Use clang -cc1 in test, to improve determinism.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 02:00:23 +0000 (02:00 +0000)]
Tests: Fix some bugs in clang_f_opts, options were out of order but it worked
because it had two inputs, except on Win32 where /dev/null doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 13 Dec 2009 01:37:04 +0000 (01:37 +0000)]
Silence some release build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 23:01:36 +0000 (23:01 +0000)]
Backend: Switch to using TargetOptions or TargetMachine to set some options instead of llvm::cl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 12 Dec 2009 21:26:21 +0000 (21:26 +0000)]
patch to add a property from a protocol to a class that adopts the protocol.
(fixes radar
7466494 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 19:06:20 +0000 (19:06 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 18:16:41 +0000 (18:16 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sat, 12 Dec 2009 12:29:38 +0000 (12:29 +0000)]
Add initial support for realloc() in MallocChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91216
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 12 Dec 2009 11:40:51 +0000 (11:40 +0000)]
Remember the type name's scope specifier in the DeclSpec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:57:52 +0000 (07:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:48:51 +0000 (07:48 +0000)]
Give PartialDiagnostic copy semantics rather than move semantics, since we typically pass it by reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:31:50 +0000 (07:31 +0000)]
Remove unnecessary pointers from PartialDiagnostic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:25:49 +0000 (07:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Sat, 12 Dec 2009 05:05:38 +0000 (05:05 +0000)]
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 12 Dec 2009 03:36:52 +0000 (03:36 +0000)]
Fix for PR4642: move work in HTMLPrinter out of the destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 12 Dec 2009 02:43:16 +0000 (02:43 +0000)]
Fix tyop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 12 Dec 2009 01:27:46 +0000 (01:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 12 Dec 2009 01:05:43 +0000 (01:05 +0000)]
Remove empty directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 01:04:14 +0000 (01:04 +0000)]
We should only scan for nested blocks if we are analyzing the body of a function/method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 00:56:47 +0000 (00:56 +0000)]
Remove clang-cc tool, it has joined in unholy union with clang.
- tools/driver will be renamed to tools/clang at some point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 00:42:52 +0000 (00:42 +0000)]
Convert the remainder of this test case over to using FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91194
91177308 -0d34-0410-b5e6-
96231b3b80d8