Eli Friedman
0b1fbd1394
PR7242: Make sure to use a different context for evaluating constant
...
initializers, so the result of the evaluation doesn't leak through
inconsistently. Also, don't evaluate references to variables with
initializers with side-effects.
llvm-svn: 113128
2010-09-06 00:10:32 +00:00
Chris Lattner
ee8df8f167
fix PR7192 by defining wchar_t in a more conventional way. The
...
type of L"x" can change based on command line arguments.
llvm-svn: 113127
2010-09-05 23:29:49 +00:00
Eli Friedman
8ed2bac65d
PR8023: Don't crash on invalid uses of __real__ on class types in C++.
...
llvm-svn: 113124
2010-09-05 23:15:52 +00:00
Chris Lattner
938cebc076
"const id<NSFoo> *" instead of "id<NSFoo> const *".
...
I think this wraps up all the legal cases.
llvm-svn: 113096
2010-09-05 00:43:21 +00:00
Chris Lattner
7f2c7f4ef3
"const std::vector<int>*" not "std::vector<int> const*"
...
llvm-svn: 113094
2010-09-05 00:27:00 +00:00
Chris Lattner
24b89469ac
'const std::type_info*' instead of 'std::type_info const*'
...
llvm-svn: 113092
2010-09-05 00:17:29 +00:00
Chris Lattner
9dd55103c1
print "const intptr_t" instead of "intptr_t const"
...
llvm-svn: 113091
2010-09-05 00:07:29 +00:00
Chris Lattner
53fa04909c
make clang print types as "const int *" instead of "int const*",
...
which is should have done from the beginning. As usual, the most
fun with this sort of change is updating all the testcases.
llvm-svn: 113090
2010-09-05 00:04:01 +00:00
Fariborz Jahanian
60babfb8a1
Casting of a property reference to 'void' did not
...
generate the necessary code. This patch fixes it.
// rdar://8389655
llvm-svn: 113079
2010-09-04 19:49:18 +00:00
Douglas Gregor
09c0eb1510
Synchronize code-completion cursor kinds with indexing cursor
...
kinds. How shameful that this code was duplicated!
llvm-svn: 113033
2010-09-03 23:30:36 +00:00
Fariborz Jahanian
087206dbcd
Truncate block variable of bool type to i1 when its
...
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).
llvm-svn: 113027
2010-09-03 23:07:53 +00:00
Chandler Carruth
f92bd8cf22
Fix PR7402 when it strikes via template instantiation.
...
llvm-svn: 113019
2010-09-03 21:54:20 +00:00
Anders Carlsson
f849774495
It's OK for classes to have flexible array elements (but not unions).
...
llvm-svn: 113018
2010-09-03 21:53:49 +00:00
Fariborz Jahanian
9d798d13f3
Cope with llvm's reference to bool type of 'i1' vs. clang's
...
type of 'i8' for the same for __block variables of
type bool. refixes radar 8382559.
llvm-svn: 113015
2010-09-03 21:36:02 +00:00
Chandler Carruth
b916499161
Clean up some whitespace and comments from this test that were remnants of
...
a previous iteration of the test.
llvm-svn: 113013
2010-09-03 21:17:53 +00:00
Chandler Carruth
9bb67f4d1a
Allow anonymous and local types. The support was already in place for these,
...
but this makes them work even as an extension in C++98. This resolves PR8077.
llvm-svn: 113011
2010-09-03 21:12:34 +00:00
John McCall
56f57589af
A constant initializer never matches the type of the variable it's
...
initializing; it at best matches the element type of the variable
it's initializing. Fixes PR8073.
llvm-svn: 112992
2010-09-03 18:58:50 +00:00
Douglas Gregor
901a0fabfc
Implement libclang visitation for UnresolvedMemberExpr. This is the
...
last of the C++-specific expressions where we have decent source
information in the AST already. In particular, various
object-construction expressions (CXXNewExpr, CXXTemporaryObjectExpr)
still have poor source-location information that needs to be addressed.
llvm-svn: 112981
2010-09-03 18:01:25 +00:00
Douglas Gregor
4583827e13
libclang visitation for CXXDependentScopeMemberExpr
...
llvm-svn: 112978
2010-09-03 17:35:34 +00:00
Douglas Gregor
4ae34afaf9
libclang visitation for DependentScopeDeclRefExpr
...
llvm-svn: 112975
2010-09-03 17:24:10 +00:00
Daniel Dunbar
bf257a652d
Avoid unnecessary redirect, so that stderr shows up in output.
...
llvm-svn: 112965
2010-09-03 15:45:00 +00:00
John McCall
417e74491c
Add a quick-and-dirty hack to give a better diagnostic for [class.protected]
...
restrictions. The note's not really on the right place given its wording,
but putting a second note on the call site (or muddying the wording) doesn't
appeal.
There are corner cases where this can be wrong, but I'm not concerned.
llvm-svn: 112950
2010-09-03 04:56:05 +00:00
Daniel Dunbar
2f8df98c92
IRgen: Fix silly thinko in r112021, which was generating code for the same expr
...
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.
llvm-svn: 112943
2010-09-03 02:07:00 +00:00
Dawn Perchik
335e16bad4
Add symantic support for the Pascal calling convention via
...
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.
llvm-svn: 112939
2010-09-03 01:29:35 +00:00
John McCall
0d635f53a8
Re-commit r112916 with an additional fix for the self-host failures.
...
I've audited the remaining getFunctionInfo call sites.
llvm-svn: 112936
2010-09-03 01:26:39 +00:00
Fariborz Jahanian
0389df4a45
Patch to allow alternative representation of c++
...
operators (and, or, etc.) to be used as selectors
to match g++'s behavior.
llvm-svn: 112935
2010-09-03 01:26:16 +00:00
Anders Carlsson
4013404eff
Static local variables don't result in global constructors being emitted.
...
llvm-svn: 112933
2010-09-03 01:11:38 +00:00
John McCall
c32f94b4ce
Revert r112916, it's breaking selfhost pretty badly.
...
llvm-svn: 112925
2010-09-03 00:40:45 +00:00
Daniel Dunbar
be13194655
Revert "Another i1 vs. i8 type mismatch issue. This time", it breaks some projects.
...
llvm-svn: 112922
2010-09-03 00:35:23 +00:00
Anders Carlsson
af7534f084
Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning.
...
The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).
llvm-svn: 112918
2010-09-03 00:25:02 +00:00
Daniel Dunbar
09c8fbe812
tests: Fix a dependency on the temporary value names.
...
llvm-svn: 112917
2010-09-03 00:24:06 +00:00
John McCall
12d3891a27
It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfo
...
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/8386802.
llvm-svn: 112916
2010-09-03 00:01:57 +00:00
Dawn Perchik
68bb1b441f
Add support for Borland extensions via option -fborland-extensions
...
(original patch r112791 was reverted due to a bug).
llvm-svn: 112915
2010-09-02 23:59:25 +00:00
Daniel Dunbar
a70fab8dd7
IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategy
...
using the same methods as used for normal structures.
- This fixes problems with reading past the end of the structure and with
handling straddled bit-field access.
llvm-svn: 112914
2010-09-02 23:53:31 +00:00
Douglas Gregor
040ad500c4
Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
...
two regressions in Boost.Config.
llvm-svn: 112908
2010-09-02 23:24:14 +00:00
Sebastian Redl
b469afb4f3
Implement __has_virtual_destructor. Patch by Steven Watanabe.
...
llvm-svn: 112905
2010-09-02 23:19:42 +00:00
Chris Lattner
369721a16e
stop looking for #uses comments.
...
llvm-svn: 112898
2010-09-02 22:48:26 +00:00
Chris Lattner
60c160ff4d
remove some tests that aren't adding any value: the check lines don't
...
make it clear what they're testing so there is no way to know it's right
or to update it.
llvm-svn: 112897
2010-09-02 22:43:55 +00:00
Douglas Gregor
f24eaee2b3
Teach libclang to visit OverloadExprs, so that we can reuse this
...
code. Also, teach it about explicitly-specified template arguments.
llvm-svn: 112884
2010-09-02 22:29:21 +00:00
John McCall
310083c3e3
sabre points out that the timing here is pretty pessimal; I'll retry the
...
experiment in a few days.
llvm-svn: 112882
2010-09-02 22:27:38 +00:00
Douglas Gregor
3ca46b4275
Add libclang visitation for UnresolvedLookupExprs
...
llvm-svn: 112879
2010-09-02 22:19:24 +00:00
John McCall
25f7aa8158
Experimentally move the tautological comparison warnings from -Wsign-compare
...
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.
llvm-svn: 112877
2010-09-02 22:18:59 +00:00
Douglas Gregor
4edb2ff89f
Add libclang visitation for C++ pseudo-destructor expressions.
...
llvm-svn: 112873
2010-09-02 22:09:03 +00:00
Bill Wendling
e6fd79bc1c
Newline at end of file.
...
llvm-svn: 112871
2010-09-02 22:07:07 +00:00
Douglas Gregor
46af501065
Add libclang visitation for C++ typeid expressions.
...
llvm-svn: 112862
2010-09-02 21:20:16 +00:00
Douglas Gregor
32e4c861c8
In libclang, visit the nested-name-specifier and explicitly-specified template arguments of a MemberExpr.
...
llvm-svn: 112860
2010-09-02 21:07:44 +00:00
Douglas Gregor
aac7c8106a
Visit the nested-name-specifier and explicitly-specified template
...
arguments of a DeclRefExpr.
llvm-svn: 112854
2010-09-02 20:35:02 +00:00
Douglas Gregor
3335f48448
Implement basic visitation for nested name specifiers via libclang
...
cursors. Sadly, this visitation is a hack, because we don't have
proper source-location information for nested-name-specifiers in the
AST. It does improve on the status quo, however.
llvm-svn: 112837
2010-09-02 17:35:32 +00:00
Fariborz Jahanian
05bbef63b6
Another i1 vs. i8 type mismatch issue. This time
...
a 'bool' byref variable in memory. Fixes radar 8382559.
llvm-svn: 112835
2010-09-02 17:28:31 +00:00
Douglas Gregor
262e4e2ab5
Fix more i1/i8 pointer madness. Here, an overactive assertion
...
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.
llvm-svn: 112821
2010-09-02 15:34:35 +00:00