Sebastian Redl
8046049942
This ought to complete exception spec support. Man, am I glad.
...
llvm-svn: 83767
2009-10-11 09:14:57 +00:00
Sebastian Redl
6e4c871855
Types appearing more than once in a spec shouldn't matter.
...
llvm-svn: 83766
2009-10-11 09:11:23 +00:00
Sebastian Redl
4915e63d3b
Test exception spec compatibility on return type and parameters.
...
Along the way, use RequireCompleteType when testing exception spec types.
Separate all the ugly spec stuff into its own file.
llvm-svn: 83764
2009-10-11 09:03:14 +00:00
Zhongxing Xu
b8edf2a4dd
Introduces a new BindingVal which combines direct and
...
default binding for regions. This allows us to simply a lot of code. A
further simplification could be done is that many methods of
regionstore can only work on Store instead of GRState.
llvm-svn: 83762
2009-10-11 08:08:02 +00:00
Anders Carlsson
6ce51fdf43
Move our (non-existing) RTTI emission code into CGRtti.cpp. No functionality change.
...
llvm-svn: 83732
2009-10-10 20:49:04 +00:00
Fariborz Jahanian
07ca72725a
Generate weak read barriers when reading a weak __block
...
variable inside the block.
llvm-svn: 83729
2009-10-10 20:07:56 +00:00
Sebastian Redl
5d43164bc2
Implement the core checking for compatible exception specifications in assignment and initialization.
...
The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet.
This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment.
llvm-svn: 83710
2009-10-10 12:04:10 +00:00
John McCall
6538c93050
Qualified lookup through using declarations. Diagnose a new type of ambiguity.
...
Split the various ambiguous result enumerators into their own enum. Tests
for most of C++ [namespace.qual].
llvm-svn: 83700
2009-10-10 05:48:19 +00:00
Anders Carlsson
c4859baea4
Check that the return type is complete when calling a member function.
...
llvm-svn: 83694
2009-10-10 00:06:20 +00:00
Anders Carlsson
1040f2e9db
Add another test.
...
llvm-svn: 83693
2009-10-09 23:58:25 +00:00
Anders Carlsson
7f84ed9287
Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For
...
struct B;
B f();
void g() {
f();
}
We now get
t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B'
f();
^~~
t.cpp:3:3: note: 'f' declared here
B f();
^
t.cpp:1:8: note: forward declaration of 'struct B'
struct B;
^
llvm-svn: 83692
2009-10-09 23:51:55 +00:00
Douglas Gregor
b385b7c62e
Dead Code Elimination
...
llvm-svn: 83686
2009-10-09 22:56:12 +00:00
Douglas Gregor
7d195b93d8
Add some FIXMEs
...
llvm-svn: 83685
2009-10-09 22:54:25 +00:00
Douglas Gregor
8413751fab
Experimental, ultra-hacking Emacs minor mode for Clang-based code completion.
...
llvm-svn: 83681
2009-10-09 22:17:40 +00:00
Douglas Gregor
58acf32af2
Minor tweaks for code-completion:
...
- Filter out unnamed declarations
- Filter out declarations whose names are reserved for the
implementation (e.g., __bar, _Foo)
- Place OVERLOAD: or COMPLETION: at the beginning of each
code-completion result, so we can easily separate them from other
compilation results.
llvm-svn: 83680
2009-10-09 22:16:47 +00:00
Anders Carlsson
82a108b4ed
Update Xcode project.
...
llvm-svn: 83679
2009-10-09 22:16:24 +00:00
Devang Patel
3028a43f57
Revert 83567.
...
llvm-svn: 83676
2009-10-09 22:06:15 +00:00
John McCall
9f3059a192
Refactor the LookupResult API to simplify most common operations. Require users to
...
pass a LookupResult reference to lookup routines. Call out uses which assume a single
result.
llvm-svn: 83674
2009-10-09 21:13:30 +00:00
Douglas Gregor
7f34baeb4b
When declaring a friend class template, we may end up finding an
...
injected-class-name (e.g., when we're referring to other
specializations of the current class template). Make sure that we see
the template rather than the injected-class-name. Fixes PR4768.
llvm-svn: 83672
2009-10-09 21:11:42 +00:00
Mike Stump
1ba6edb030
Efficiency refinements.
...
llvm-svn: 83666
2009-10-09 20:16:49 +00:00
Axel Naumann
c5b2d917de
Do not install CMakeLists.txt (nor any other txt files) into include/ subdirectories
...
llvm-svn: 83665
2009-10-09 20:03:20 +00:00
Mike Stump
e752333c66
Push all the way out to 80.
...
llvm-svn: 83664
2009-10-09 19:42:16 +00:00
Axel Naumann
04ca7e181f
Passing const Triple& is sufficient for AddDefaultSystemIncludePaths()
...
llvm-svn: 83663
2009-10-09 19:37:12 +00:00
Mike Stump
fc8ff639cb
Allow customization for the producer information in the debug output.
...
llvm-svn: 83659
2009-10-09 18:38:12 +00:00
Mike Stump
727170d2d8
Allow customization for the version line.
...
llvm-svn: 83652
2009-10-09 17:31:54 +00:00
Fariborz Jahanian
0fe5e0308e
Produce good looking diagnostics on ambiguous built-in operators.
...
Now we produce things like:
bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous
int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \
~^ ~~~
bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*')
bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*')
...
Still need to look at an issue (indicated as FIXME in the test case).
llvm-svn: 83650
2009-10-09 17:09:58 +00:00
Fariborz Jahanian
4dc1246d87
Use the new API for applying the qualifiers on built-in '->*'
...
operator's types.
llvm-svn: 83648
2009-10-09 16:34:40 +00:00
Zhongxing Xu
9b6a9be301
Remove unused code.
...
llvm-svn: 83612
2009-10-09 02:24:00 +00:00
Zhongxing Xu
e77cd12f10
Make the behavior explicit by not using the method call.
...
llvm-svn: 83611
2009-10-09 02:18:31 +00:00
Zhongxing Xu
fd15882213
Remove unused code.
...
llvm-svn: 83610
2009-10-09 02:12:00 +00:00
Mike Stump
0d479e6653
Avoid warning.
...
llvm-svn: 83609
2009-10-09 01:25:47 +00:00
Fariborz Jahanian
29f9d39568
Improve on reporting ambiguity involving built-in candidates.
...
I still don't like it but it is improvement over what we had.
llvm-svn: 83603
2009-10-09 00:13:15 +00:00
Mike Stump
acdc3158b3
Add a refactor pointer...
...
llvm-svn: 83599
2009-10-08 23:57:53 +00:00
Steve Naroff
3b08630b06
- Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux).
...
- Sort results in testcase.
llvm-svn: 83597
2009-10-08 23:45:10 +00:00
Mike Stump
904ad90bc8
Set up include paths for VC++ and Cygwin headers, along with the
...
existing MinGW headers, plus the newer 4.4.0 version. Patch by John
Thompson.
llvm-svn: 83594
2009-10-08 23:29:47 +00:00
Mike Stump
f8c1f0d1f0
Speed up testing by avoiding stdio.h, also helps testing on windows.
...
Patch by John Thompson.
llvm-svn: 83593
2009-10-08 23:05:06 +00:00
Mike Stump
af9afe9bc9
"Someone pointed out that in my previous Targets.cpp patch I didn't
...
handle the long size difference for one of the Windows targets." Patch
by John Thompson.
llvm-svn: 83592
2009-10-08 23:00:00 +00:00
Mike Stump
c99c022841
This fixes support for complex literals, reworked to avoid a goto, and
...
to add a flag noting the presence of a Microsoft extension suffix (i8,
i16, i32, i64). Patch by John Thompson.
llvm-svn: 83591
2009-10-08 22:55:36 +00:00
Douglas Gregor
1245e6ff69
Tests for C++ [expr], from James Porter!
...
llvm-svn: 83588
2009-10-08 22:38:14 +00:00
Mike Stump
e07e33a196
Tolerate .exe on executables. Patch by John Thompson. Changed * to .* by me.
...
llvm-svn: 83586
2009-10-08 22:30:02 +00:00
Mike Stump
8409f9102b
Tolerate .exe on executables. Patch by John Thompson.
...
llvm-svn: 83584
2009-10-08 22:25:29 +00:00
Fariborz Jahanian
8ae5b0a18b
Fix up error reporting when object cannot be constructed
...
because of missing default constructor of a member.
Fixes pr5154.
llvm-svn: 83583
2009-10-08 22:15:49 +00:00
Douglas Gregor
01249503fe
Installation of Clang libraries and headers, from Axel Naumann!
...
llvm-svn: 83582
2009-10-08 22:15:31 +00:00
Mike Stump
03686660b1
In VC++, the *printf functions put an extra "0" in the exponent part
...
of a floating point number. This add regular expressions to account
for this. Patch by John Thompson.
llvm-svn: 83581
2009-10-08 21:57:41 +00:00
Steve Naroff
936354c62a
Add code completion support for ObjC property declarations/attributes.
...
llvm-svn: 83579
2009-10-08 21:55:05 +00:00
Mike Stump
c2eeac617d
Convert some tests to FileCheck to be more portable. Patch by John Thompson.
...
llvm-svn: 83578
2009-10-08 21:52:07 +00:00
Douglas Gregor
3beaf9bbcd
Implement support for -Wunused-variable, from Oscar Bonilla!
...
llvm-svn: 83577
2009-10-08 21:35:42 +00:00
Douglas Gregor
18289eeb1d
Fix an assertion in the XML output, from Olaf Krzikalla!
...
llvm-svn: 83576
2009-10-08 21:29:50 +00:00
Devang Patel
abf71fa9fc
Record location info before emiting alloca for arguments. This allows arguments to have proper location info.
...
llvm-svn: 83567
2009-10-08 18:53:37 +00:00
Fariborz Jahanian
03b4f666ed
Implement [expr.mptr.oper]p6 for '->*' operator.
...
llvm-svn: 83562
2009-10-08 18:00:39 +00:00