]>
granicus.if.org Git - clang/log
Daniel Dunbar [Tue, 24 Mar 2009 19:14:56 +0000 (19:14 +0000)]
Driver: Warn when 'clang' is used to compile a source file we could
conceivably handle, but are defaulting to not using clang for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 19:02:31 +0000 (19:02 +0000)]
Driver: Change default use of "clang" compiler.
- Don't default to using clang for C++ (use -ccc-clang-cxx to
override).
- Default to only using clang on i386 and x86_64 (use
-ccc-clang-archs "" to override).
- <rdar://problem/
6712350 > [driver] clang should not be used on
powerpc by default
- <rdar://problem/
6705767 > driver should default to -ccc-no-clang-cxx
I plan to add a warning that we are not using the clang compiler for
the given compilation so that users do not think clang is being used
in situations it isn't.
This change is motivated by the desire to be able to drop clang into a
build and have things "just work", even if it happens to get used to
compile C++ code or code for an architecture we don't support yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 18:57:02 +0000 (18:57 +0000)]
Move ToolChain::ShouldUseClangCompiler to
Driver::ShouldUseClangCompiler.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 17:59:06 +0000 (17:59 +0000)]
Driver: Translate -fverbose-asm for LLVM backend.
- <rdar://problem/
6715707 > driver should translate -fverbose-asm into
-asm-verbose
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 24 Mar 2009 17:52:34 +0000 (17:52 +0000)]
Really fix cmake style builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 17:49:01 +0000 (17:49 +0000)]
Driver: Result files shouldn't be removed on failure when -save-temps
is specified.
- No easy way to make a safe test case for this (given where the
driver is supposed to put temp files).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67632
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 17:31:30 +0000 (17:31 +0000)]
Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/
6715818 > clang doesn't honor gcc semantic that last
-O optimization option wins.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 17:23:42 +0000 (17:23 +0000)]
Fix the bug that Eli noticed where we wouldn't look at function decls outside the class declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 17:21:43 +0000 (17:21 +0000)]
improve error recovery for when type parsing fails.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 17:05:27 +0000 (17:05 +0000)]
fix "Comment#1" from PR3872
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 17:04:48 +0000 (17:04 +0000)]
random cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 16:43:20 +0000 (16:43 +0000)]
Template instantiation for constructors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 16:18:41 +0000 (16:18 +0000)]
-arch ppc should change the triple to powerpc-foo not to ppc-foo.
Similarly for ppc64. This should probably move into the driver, along
with all the other target selection stuff other than -triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 16:16:53 +0000 (16:16 +0000)]
Add another C++ open project
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 16:09:18 +0000 (16:09 +0000)]
change the __VERSION__ string to be more sensible. It would be useful to include the clang version # too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 07:20:59 +0000 (07:20 +0000)]
Driver: Forward -MMD (not -MM) to clang-cc; this got lost in
translation, the former we support, the later we don't (yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 06:17:45 +0000 (06:17 +0000)]
Update TestRunner.sh for renaming.
- Substitutes both clang and clang-cc.
- Incorporates patch from Jon Simons to diagnose if clang or clang-cc
isn't found.
- Uses full path when running scripts, for more precision in the
output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Mar 2009 05:30:14 +0000 (05:30 +0000)]
More path updates with clang-cc...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Mar 2009 04:29:13 +0000 (04:29 +0000)]
Update scan-build/ccc-analyzer to use 'clang-cc' instead of 'clang'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 04:07:10 +0000 (04:07 +0000)]
Install clang-cc to libexec/clang-cc (instead of bin/clang-cc).
- Updated ccc & driver to look in libexec/ for tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 03:07:05 +0000 (03:07 +0000)]
Rename clang-driver to clang.
Again, I tried to update cmake but it is untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 03:00:12 +0000 (03:00 +0000)]
Move <root>/Driver into <root>/tools/clang-cc.
Again, I tried to update cmake but it is untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 02:52:57 +0000 (02:52 +0000)]
Add CMake files for tools/driver; I am just guessing here, can someone test/fix?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67604
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 02:38:23 +0000 (02:38 +0000)]
Support member reference on ?: of struct type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 02:24:46 +0000 (02:24 +0000)]
Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 01:59:55 +0000 (01:59 +0000)]
Use not instead of ! in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:46:45 +0000 (01:46 +0000)]
Handle pointers to arrays of abstract types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:25:56 +0000 (01:25 +0000)]
Remove a task that's completed now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:24:06 +0000 (01:24 +0000)]
class.abstract is complete. Anything that doesn't work is a bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:19:16 +0000 (01:19 +0000)]
More work on diagnosing abstract classes. We can now handle cases like
class C {
void g(C c);
virtual void f() = 0;
};
In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 24 Mar 2009 01:14:50 +0000 (01:14 +0000)]
Fix PR3868 by making Evaluate handle cases like "(long)&a + 4".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67593
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 24 Mar 2009 01:11:18 +0000 (01:11 +0000)]
Fix a couple of tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 01:06:18 +0000 (01:06 +0000)]
ccc: Have generic GCC tool chain search the driver directory for
executables (e.g., clang).
- This matches the clang-driver behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 00:38:23 +0000 (00:38 +0000)]
Cleanup template instantiation for methods, destructors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Mar 2009 00:35:59 +0000 (00:35 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 00:24:37 +0000 (00:24 +0000)]
Driver: lipo wasn't being called correctly (translation failure from
ccc due to the different way we handle output arguments).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 00:20:13 +0000 (00:20 +0000)]
ccc/Driver: -r option doesn't take an argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 00:15:49 +0000 (00:15 +0000)]
Template instantiation for destructors. This is somewhat repetitive;
eliminating the duplication is next on the list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67579
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 23:26:24 +0000 (23:26 +0000)]
Fix the ABI convention for struct returns on x86 outside of Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 23:17:00 +0000 (23:17 +0000)]
Another use of adjustParameterType. Plus, GetTypeForDeclarator will
always get ParmVarDecls with already-adjusted types. Assert it.
Thanks, Anders!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 23:06:20 +0000 (23:06 +0000)]
Template instantiation for the declarations of member functions within
a class template. At present, we can only instantiation normal
methods, but not constructors, destructors, or conversion operators.
As ever, this contains a bit of refactoring in Sema's type-checking. In
particular:
- Split ActOnFunctionDeclarator into ActOnFunctionDeclarator
(handling the declarator itself) and CheckFunctionDeclaration
(checking for the the function declaration), the latter of which
is also used by template instantiation.
- We were performing the adjustment of function parameter types in
three places; collect those into a single new routine.
- When the type of a parameter is adjusted, allocate an
OriginalParmVarDecl to keep track of the type as it was written.
- Eliminate a redundant check for out-of-line declarations of member
functions; hide more C++-specific checks on function declarations
behind if(getLangOptions().CPlusPlus).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 22:50:47 +0000 (22:50 +0000)]
Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 22:30:58 +0000 (22:30 +0000)]
A test case to test that -warn-dead-stores does not emit a warning for stores to variables marked with '#pragma unused'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 22:28:25 +0000 (22:28 +0000)]
Implement '#pragma unused'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 21:50:40 +0000 (21:50 +0000)]
Driver: Make argument parsing fast.
On a synthetic command line consisting of almost all defined options,
this drops wall time from .00494 to .00336 and user time from .00258
to .00105.
On the same benchmark, clang-driver is about 15% faster than the
primary gcc driver and almost twice as fast as the gcc driver driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 23 Mar 2009 20:47:43 +0000 (20:47 +0000)]
Add SemaTypeInstantiateDecl.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 19:53:30 +0000 (19:53 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 19:19:19 +0000 (19:19 +0000)]
Driver: Fix off by one in computation of first searchable option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 23 Mar 2009 19:10:40 +0000 (19:10 +0000)]
Must allow for strong cast of floats as well (objc2 gc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 23 Mar 2009 19:10:31 +0000 (19:10 +0000)]
More improvements to abstract type checking. Handle arrays correctly, and make sure to check parameter types before they decay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 19:03:36 +0000 (19:03 +0000)]
Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.
Here is a more readable list than is in the diff:
W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.
f options: -fasm-blocks, -fmessage-length=.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 18:41:45 +0000 (18:41 +0000)]
Driver: Check that options are ordered properly (outside of
Release-Asserts mode).
Also, avoid searching through option groups (which will never match).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 17:57:53 +0000 (17:57 +0000)]
use isa<>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 23 Mar 2009 17:49:10 +0000 (17:49 +0000)]
It's an error to try to allocate an abstract object using new.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 17:47:24 +0000 (17:47 +0000)]
Fix PR3855. When we encounter an incompatible redeclaration of a
library function, accept this declaration and pretend that we do not
know that this is a library function. autoconf depends on this
(broken) behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 17:32:45 +0000 (17:32 +0000)]
The individual pieces of an invalid paste as still candidates for expansion.
This matters in assembler mode, where this is silently allowed.
This fixes rdar://
6709206 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 17:10:25 +0000 (17:10 +0000)]
analyzer: Provide temporary workaround for false positive reported by
<rdar://problem/
6704930 > involving SimpleConstraintManager not reasoning well
about symbolic constraint values involving arithmetic operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 16:26:51 +0000 (16:26 +0000)]
Tighten up the determination of whether a function declaration has a
prototype. Thanks Eli!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 16:24:37 +0000 (16:24 +0000)]
if the driver decides to run clang on a .s file, treat it as a .S file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 16:17:01 +0000 (16:17 +0000)]
Thanks to Eli for pointing out my misreading of 6.2.2p5
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 16:15:50 +0000 (16:15 +0000)]
Driver: Setup file and program search paths in tool chains.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 16:09:04 +0000 (16:09 +0000)]
Ad FreeBSD ARM target info.
- Patch by Ed Schoeten!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 15:42:58 +0000 (15:42 +0000)]
analyzer: Fix embarrassing regression in BasicStore when invalidating struct
values passed-by-reference to unknown functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 14:57:31 +0000 (14:57 +0000)]
ccc: Forward -f[no-]builtin to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 04:56:01 +0000 (04:56 +0000)]
Minor Evaluate cleanup; add some boilerplate implementations to
Evaluate for __extension__ and __builtin_choose_expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 04:38:34 +0000 (04:38 +0000)]
Minor enhancements to Evaluate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 04:08:46 +0000 (04:08 +0000)]
Some minor fixes for complex IRGen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 03:00:06 +0000 (03:00 +0000)]
Fix a subtle bug in CodeGen for the increment of a bitfield.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 02:00:36 +0000 (02:00 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 00:24:07 +0000 (00:24 +0000)]
Add some FIXMEs relating to incomplete types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 00:04:01 +0000 (00:04 +0000)]
Fix a few more instances of "&>".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 23 Mar 2009 00:00:23 +0000 (00:00 +0000)]
Recognize rvalue references in C++03, but complain about them. This leads to far better error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 23:59:44 +0000 (23:59 +0000)]
Partial implementation of PR3342: break out pointer sign
incompatibilities in assignments from other pointer incompatibilities.
Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign,
but I don't know the driver code very well.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 22 Mar 2009 23:50:14 +0000 (23:50 +0000)]
Driver: Drop code for checking bounds in SeparateArg::render, this
situation should never occur now that arguments are parsed correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 23:49:27 +0000 (23:49 +0000)]
Disallow catching exceptions by rvalue reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 23:26:56 +0000 (23:26 +0000)]
Adjust isModifiableLvalue to give a slightly more useful diagnostic for
attempting to illegally modify a BlockDeclRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 22 Mar 2009 23:26:43 +0000 (23:26 +0000)]
Driver: Implement 'missing argument' error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 23:00:19 +0000 (23:00 +0000)]
Fix code to mark block variables as const to actually work. Fix
isObjCObjectPointerType to work with qualified types. Adjust test for
changes.
If the SemaExpr changes are wrong or break existing code, feel free to
delete the "ExprTy.addConst();" line and revert my changes to
test/Sema/block-literal.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 22:58:53 +0000 (22:58 +0000)]
.td files have been used for a few days without complaint. Kill the .def files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 22:30:06 +0000 (22:30 +0000)]
Implement static_cast from lvalue to rvalue reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 22:03:03 +0000 (22:03 +0000)]
Add testcase for incomplete call/return types for calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 22:00:50 +0000 (22:00 +0000)]
Check that the return/argument types of calls are complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:56:56 +0000 (21:56 +0000)]
switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction
functionality, fixing a crash on the attached testcase. Eliminate the
BuiltinFunctions cache, as it can contain dangling pointers. This fixes
a bunch of valgrind errors on test/CodeGen/builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 21:49:20 +0000 (21:49 +0000)]
Don't use &> in tests; dash doesn't understand it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:47:11 +0000 (21:47 +0000)]
emit aliases as the definitions fly by, don't bother deferring until
the end of the module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:39:12 +0000 (21:39 +0000)]
make alias definition logic more similar to functions/globals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 21:28:55 +0000 (21:28 +0000)]
Fix build from r67476 and address the easy part of Doug's comments on rvalue refs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:21:57 +0000 (21:21 +0000)]
fix PR3200 by making alias emission use the new infrastructure. Fold
some tests into the alias.c file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:03:39 +0000 (21:03 +0000)]
pull "runtime globals" into the same framework as other functions/global variables.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 20:54:47 +0000 (20:54 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 22 Mar 2009 20:18:17 +0000 (20:18 +0000)]
Disallow abstract types where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:35:37 +0000 (19:35 +0000)]
fix a fixme: non-proto struct returning function definitions should be compiled
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:29:18 +0000 (19:29 +0000)]
add some missing type predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 22 Mar 2009 17:47:44 +0000 (17:47 +0000)]
fix PR3859: crash with 'cc -V'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 22 Mar 2009 06:42:39 +0000 (06:42 +0000)]
PTHManager::Create():
- Make the Diagnostic::Level for PTH errors to be specified by the caller
clang (driver):
- Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth
(a hard error) and Diagnostic::Warning for -token-cache (we can still
proceed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 22 Mar 2009 01:52:17 +0000 (01:52 +0000)]
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:32:22 +0000 (00:32 +0000)]
don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:24:14 +0000 (00:24 +0000)]
fix CreateTempAlloca to not set a name on the alloca for temporaries
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.
This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:12:30 +0000 (00:12 +0000)]
set function/global names with setName instead of passing the name into the
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:10:22 +0000 (00:10 +0000)]
fix some warnings in release-assert mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67456
91177308 -0d34-0410-b5e6-
96231b3b80d8