]> granicus.if.org Git - clang/log
clang
13 years agoFix g++.dg regressions introduced at r115347 (rdar://8529993)
Argyrios Kyrtzidis [Sat, 9 Oct 2010 04:39:54 +0000 (04:39 +0000)]
Fix g++.dg regressions introduced at r115347 (rdar://8529993)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116144 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSecure this test against slightly different number formatters.
John McCall [Sat, 9 Oct 2010 02:28:39 +0000 (02:28 +0000)]
Secure this test against slightly different number formatters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116141 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPermit constant evaluation of const floating-point variables with
John McCall [Sat, 9 Oct 2010 01:34:31 +0000 (01:34 +0000)]
Permit constant evaluation of const floating-point variables with
constant initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116138 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for UCNs for character literals
Nico Weber [Sat, 9 Oct 2010 00:27:47 +0000 (00:27 +0000)]
Add support for UCNs for character literals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116129 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoImplement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
Douglas Gregor [Fri, 8 Oct 2010 23:50:27 +0000 (23:50 +0000)]
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRename test name.
Fariborz Jahanian [Fri, 8 Oct 2010 23:17:27 +0000 (23:17 +0000)]
Rename test name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116120 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMethod implemented in class's implementation may implement
Fariborz Jahanian [Fri, 8 Oct 2010 22:59:25 +0000 (22:59 +0000)]
Method implemented in class's implementation may implement
one declared in class's extension and not one declared
in class's superclass. This supresses a bogus warning on
method type mismatch.
Fixes //rdar: // 8530080

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116118 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen dealing with an assignment with LHS being a property reference
Fariborz Jahanian [Fri, 8 Oct 2010 21:12:22 +0000 (21:12 +0000)]
When dealing with an assignment with LHS being a property reference
expression, the entire assignment tree is rewritten into a property
setter messaging. This includes rewriting the RHS.
Do not attempt to rewrite RHS again. Never rewrite a rewritten text!
Fixes //rdar: //8527018.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116104 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoImprove XML output for class/struct/union declarations, from Martin Vejnar!
Douglas Gregor [Fri, 8 Oct 2010 21:05:46 +0000 (21:05 +0000)]
Improve XML output for class/struct/union declarations, from Martin Vejnar!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116103 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a typo in the Clang man page, from Alexander Best.
Douglas Gregor [Fri, 8 Oct 2010 21:03:07 +0000 (21:03 +0000)]
Fix a typo in the Clang man page, from Alexander Best.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116102 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert the hack Chris Lattner added in r97981 to work around
Douglas Gregor [Fri, 8 Oct 2010 20:56:19 +0000 (20:56 +0000)]
Revert the hack Chris Lattner added in r97981 to work around
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116101 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThis patch fixes multiple issues in clang's designated init builder and
Douglas Gregor [Fri, 8 Oct 2010 20:44:28 +0000 (20:44 +0000)]
This patch fixes multiple issues in clang's designated init builder and
completes support for C1X anonymous struct/union init features:

 * Indexed anonymous member initializers should not be expanded. Doing so makes
little sense and would cause unresolvable semantic ambiguity in valid code
(regression introduced by r69153).

 * Subobject initialization of (possibly nested) anonymous members are now
referred to with paths relative to the naming record context, eliminating the
synthesis of incorrect implicit InitListExprs that caused CodeGen to assert.

 * Field lookup was missing a null check in IdentifierInfo comparison which
caused lookup for a known (already resolved) field to match the first unnamed
data member it encountered leading to silent miscompilation.

 * Subobject paths are no longer built using the general purpose
Sema::BuildAnonymousStructUnionMemberPath(). If any corner cases crop up, we
will now assert earlier in Sema instead of passing invalid InitListExprs
through to CodeGen.

Fixes PR6955, from Alp Toker!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116098 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix the mapping of vertical-space cursor kinds to produce a newline,
Douglas Gregor [Fri, 8 Oct 2010 20:39:29 +0000 (20:39 +0000)]
Fix the mapping of vertical-space cursor kinds to produce a newline,
rather than a space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116097 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTry to disable this again.
Eric Christopher [Fri, 8 Oct 2010 19:36:36 +0000 (19:36 +0000)]
Try to disable this again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116094 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agolibclang: Disable LLVM pretty stack trace functionality, which inadvertently
Daniel Dunbar [Fri, 8 Oct 2010 19:30:33 +0000 (19:30 +0000)]
libclang: Disable LLVM pretty stack trace functionality, which inadvertently
sets up signal handlers it shouldn't when we are being used a shared library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116084 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable this test temporarily in an attempt to green the buildbots.
Eric Christopher [Fri, 8 Oct 2010 19:18:57 +0000 (19:18 +0000)]
Disable this test temporarily in an attempt to green the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116082 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTighter check in r116060 blcoked enums also. Emit enum const's debug info.
Devang Patel [Fri, 8 Oct 2010 18:24:19 +0000 (18:24 +0000)]
Tighter check in r116060 blcoked enums also. Emit enum const's debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116071 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago__attribute__((aligned(n))) directly specifies the alignment of a declaration
John McCall [Fri, 8 Oct 2010 18:24:19 +0000 (18:24 +0000)]
__attribute__((aligned(n))) directly specifies the alignment of a declaration
unless it's a non-packed field, in which case it can only increase the
alignment.  [[align]] effectively works the same way for well-formed code
(because it's ill-formed for [[align]] to decrease alignment ever).

Fixes rdar://problem/8335865

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116070 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDo not repeat debug info for file variable constants.
Devang Patel [Fri, 8 Oct 2010 17:02:40 +0000 (17:02 +0000)]
Do not repeat debug info for file variable constants.
This is tested by file-statics.exp in gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116060 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix three related, wily issues with the recompilation of precompiled
Douglas Gregor [Fri, 8 Oct 2010 04:03:57 +0000 (04:03 +0000)]
Fix three related, wily issues with the recompilation of precompiled
preambles:

  - When we rebuild a precompiled preamble, make sure to disable
    skipping anything in the main file; we may have had leftover
    preamble-skipping values in the lexer, which leads to very empty
    preamble. This is a correctness issue.

  - When we rebuild a precompiled preamble, clear out any prior state
    in the Diagnostic object. Otherwise, we might think that there
    were errors when we were building the preamble itself, and
    therefore reject the resulting preamble. This is mainly a
    performance issue.

  - Don't remove old remappings when digging out the remapping for the
    main file. Having the old mappings around does not hurt in the
    common case (later remappings will just overwrite them), and is
    important when we fail to find a preamble: we don't want to have
    removed the remapping, because we'll need it later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116041 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen we encounter a '==' in a context expecting a '=', assume the user made a typo:
Argyrios Kyrtzidis [Fri, 8 Oct 2010 02:39:23 +0000 (02:39 +0000)]
When we encounter a '==' in a context expecting a '=', assume the user made a typo:

t.c:1:7: error: invalid '==' at end of declaration; did you mean '='?
int x == 0;
      ^~
      =

Implements rdar://8488464.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116035 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTrack the location of the context requiring an implicit conversion and use it
John McCall [Fri, 8 Oct 2010 02:01:28 +0000 (02:01 +0000)]
Track the location of the context requiring an implicit conversion and use it
to white-list conversions required by system headers.  rdar://problem/8232669

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoImplement -fshort-enums (rdar://8490496).
Argyrios Kyrtzidis [Fri, 8 Oct 2010 00:25:19 +0000 (00:25 +0000)]
Implement -fshort-enums (rdar://8490496).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIdentify functions with prototype appropriately in debug info.
Devang Patel [Thu, 7 Oct 2010 22:03:49 +0000 (22:03 +0000)]
Identify functions with prototype appropriately in debug info.
This is tested by callfuncs.exp in gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115989 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix an infinite loop, caused by unintended syntax bug (the 'break;' after 'default...
Argyrios Kyrtzidis [Thu, 7 Oct 2010 21:52:18 +0000 (21:52 +0000)]
Fix an infinite loop, caused by unintended syntax bug (the 'break;' after 'default:' was intended to break out of the while loop).
Fixes rdar://8518859&8520617.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115985 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a crash encoding ivars of vector types and
Fariborz Jahanian [Thu, 7 Oct 2010 21:25:25 +0000 (21:25 +0000)]
Fix a crash encoding ivars of vector types and
to match gcc's encoding. Fixes //rdar: // 8519948.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115980 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFixed cast to union with anonymous bitfields.
Abramo Bagnara [Thu, 7 Oct 2010 21:20:44 +0000 (21:20 +0000)]
Fixed cast to union with anonymous bitfields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115979 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoBugs should go to Bugzilla, not the mailing list
Douglas Gregor [Thu, 7 Oct 2010 20:20:57 +0000 (20:20 +0000)]
Bugs should go to Bugzilla, not the mailing list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115972 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotests: Force a triple to avoid wchar_t differences.
Daniel Dunbar [Thu, 7 Oct 2010 20:16:00 +0000 (20:16 +0000)]
tests: Force a triple to avoid wchar_t differences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115970 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotests: Tweak test to also match MSVC format.
Daniel Dunbar [Thu, 7 Oct 2010 20:14:30 +0000 (20:14 +0000)]
tests: Tweak test to also match MSVC format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115969 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoStart and end location of a property-dot syntax expression
Fariborz Jahanian [Thu, 7 Oct 2010 18:12:21 +0000 (18:12 +0000)]
Start and end location of a property-dot syntax expression
must match start and end location of the expression
as expected by the rewriter client. Fixes // rdar: // 8520727

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115934 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't force spell checking when code-completing. Let the client decide
Douglas Gregor [Thu, 7 Oct 2010 18:03:24 +0000 (18:03 +0000)]
Don't force spell checking when code-completing. Let the client decide

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115931 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDriver: When clang is built with a VENDOR set, include the base LLVM version in
Daniel Dunbar [Thu, 7 Oct 2010 15:00:30 +0000 (15:00 +0000)]
Driver: When clang is built with a VENDOR set, include the base LLVM version in
the version information, to help prevent user confusion about vendor version
numbers vs. LLVM version numbers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115915 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agowww: Grammar, etc.
Daniel Dunbar [Thu, 7 Oct 2010 15:00:19 +0000 (15:00 +0000)]
www: Grammar, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115914 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoclang++ sorta works now
Chris Lattner [Thu, 7 Oct 2010 04:28:56 +0000 (04:28 +0000)]
clang++ sorta works now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115903 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPatch for adding message to unavailable attribute.
Fariborz Jahanian [Wed, 6 Oct 2010 23:12:32 +0000 (23:12 +0000)]
Patch for adding message to unavailable attribute.
And its documentation.
Finishes off // rdar: // 6734520.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115862 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUnreachableCodeChecker cleanup and improvements
Tom Care [Wed, 6 Oct 2010 23:02:25 +0000 (23:02 +0000)]
UnreachableCodeChecker cleanup and improvements
- Fixed some iterator style issues
- Don't process blocks that have been visited already
- Fixed a case where a unreachable block cycle was not reported
- Minor test case changes
- Added one test case from flow-sensitive version of the check. More coming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115861 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSimplified code for deprecated attribute wih message a little.
Fariborz Jahanian [Wed, 6 Oct 2010 22:20:08 +0000 (22:20 +0000)]
Simplified code for deprecated attribute wih message a little.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115856 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd message to attribute(deprecated).
Fariborz Jahanian [Wed, 6 Oct 2010 21:18:44 +0000 (21:18 +0000)]
Add message to attribute(deprecated).
attribute(unavailable) to do next.
// rdar:// 6734520.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a double-free error that can occur in rare cases where loading
Douglas Gregor [Wed, 6 Oct 2010 21:11:08 +0000 (21:11 +0000)]
Fix a double-free error that can occur in rare cases where loading
of the precompiled preamble (or any PCH file it depends on) fails
during reparsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115838 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMark FunctionNoProtoType's argument as unspecified parameters.
Devang Patel [Wed, 6 Oct 2010 20:51:45 +0000 (20:51 +0000)]
Mark FunctionNoProtoType's argument as unspecified parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115834 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRe-enable EH cleanups to destroy __block variables, now that we have a moment to
John McCall [Wed, 6 Oct 2010 18:56:43 +0000 (18:56 +0000)]
Re-enable EH cleanups to destroy __block variables, now that we have a moment to
deal with the consequences.  Fixes rdar://problem/8224178.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115816 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSilence unused variable warning in Release builds.
Nick Lewycky [Wed, 6 Oct 2010 18:37:39 +0000 (18:37 +0000)]
Silence unused variable warning in Release builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115806 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDo not emit subrange for incomplete array type.
Devang Patel [Wed, 6 Oct 2010 18:30:00 +0000 (18:30 +0000)]
Do not emit subrange for incomplete array type.
This is tested by ptype.exp in gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115805 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIssue deprecated warning when typeof uses typedef
Fariborz Jahanian [Wed, 6 Oct 2010 17:00:02 +0000 (17:00 +0000)]
Issue deprecated warning when typeof uses typedef
based on underlying type's deprecatedness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115800 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReject the allocation of variably-modified types in C++ 'new'
Douglas Gregor [Wed, 6 Oct 2010 16:00:31 +0000 (16:00 +0000)]
Reject the allocation of variably-modified types in C++ 'new'
expressions. Fixes PR8209 in the narrowest way possible. I'm still
considering whether I want to implement the extension that permits the
use of VLA types in a 'new' expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115790 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unused argument.
Devang Patel [Wed, 6 Oct 2010 15:58:57 +0000 (15:58 +0000)]
Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115789 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago_inline is an alias for inline in MSVC.
Francois Pichet [Wed, 6 Oct 2010 13:02:48 +0000 (13:02 +0000)]
_inline is an alias for inline in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115785 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove hard CRLF end-of-line markers from two files. These should be added
Chandler Carruth [Wed, 6 Oct 2010 06:50:05 +0000 (06:50 +0000)]
Remove hard CRLF end-of-line markers from two files. These should be added
automatically when syncing due to the auto-props selecting svn:eol-style of
'native'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115758 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.
Nico Weber [Wed, 6 Oct 2010 04:57:26 +0000 (04:57 +0000)]
Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115743 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoErm...this isn't the same as PR6658.
Bill Wendling [Wed, 6 Oct 2010 03:33:37 +0000 (03:33 +0000)]
Erm...this isn't the same as PR6658.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115737 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMMX conversion work is done. We can remove the FIXMEs.
Bill Wendling [Wed, 6 Oct 2010 03:31:26 +0000 (03:31 +0000)]
MMX conversion work is done. We can remove the FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115736 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd same hack to mmx-builtins.c as in Headers/c89.c to get it to pass on Win32. PR6658.
Bill Wendling [Wed, 6 Oct 2010 03:31:09 +0000 (03:31 +0000)]
Add same hack to mmx-builtins.c as in Headers/c89.c to get it to pass on Win32. PR6658.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115735 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen checking for uninitialized fields in member initializers, special case static...
Anders Carlsson [Wed, 6 Oct 2010 02:43:25 +0000 (02:43 +0000)]
When checking for uninitialized fields in member initializers, special case static variables and enums. Fixes PR8075.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115732 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the driver to pass -fexceptions in Objective-C inputs on ARM.
John McCall [Wed, 6 Oct 2010 01:40:51 +0000 (01:40 +0000)]
Teach the driver to pass -fexceptions in Objective-C inputs on ARM.
I don't know when this stopped happening, but this seems to be the
right place to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115730 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoProvide a slightly specialized diagnostic for tautological comparisons
John McCall [Wed, 6 Oct 2010 00:25:24 +0000 (00:25 +0000)]
Provide a slightly specialized diagnostic for tautological comparisons
of an enum value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115725 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse a more conventional/efficient implementation for isEnumeralType()
John McCall [Wed, 6 Oct 2010 00:23:35 +0000 (00:23 +0000)]
Use a more conventional/efficient implementation for isEnumeralType()
and isBuiltinType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115724 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUe TagType, added a FIXME. Per John's comment.
Fariborz Jahanian [Wed, 6 Oct 2010 00:23:25 +0000 (00:23 +0000)]
Ue TagType, added a FIXME. Per John's comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115723 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIssue deprecated warning when typeof uses an
Fariborz Jahanian [Tue, 5 Oct 2010 23:24:00 +0000 (23:24 +0000)]
Issue deprecated warning when typeof uses an
expression of deprecated type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115713 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen instantiating a new-expression, force a rebuild if there were default
John McCall [Tue, 5 Oct 2010 22:36:42 +0000 (22:36 +0000)]
When instantiating a new-expression, force a rebuild if there were default
arguments in either the placement or constructor arguments.  This is
important if the default arguments refer to a declaration or create a
temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115700 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMethod declaration and its implementation must match in all their types.
Fariborz Jahanian [Tue, 5 Oct 2010 21:02:11 +0000 (21:02 +0000)]
Method declaration and its implementation must match in all their types.
Previously, compiler warned only if it was unsafe if types
did not match. Fixes // rdar: //7933061

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115683 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago...without leaving a temporary file behind.
John McCall [Tue, 5 Oct 2010 20:53:58 +0000 (20:53 +0000)]
...without leaving a temporary file behind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115671 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEr, this test should actually run IR generation.
John McCall [Tue, 5 Oct 2010 20:53:00 +0000 (20:53 +0000)]
Er, this test should actually run IR generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115670 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach PopCleanupBlock to correctly handle the possibility of branching through
John McCall [Tue, 5 Oct 2010 20:48:15 +0000 (20:48 +0000)]
Teach PopCleanupBlock to correctly handle the possibility of branching through
a EH-only cleanup as part of a fallthrough branch-through.  That this happens
for this test case is actually a separate bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115668 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSerialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.
Douglas Gregor [Tue, 5 Oct 2010 20:41:58 +0000 (20:41 +0000)]
Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115667 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a marvelous chained AST writing bug, where we end up with the
Douglas Gregor [Tue, 5 Oct 2010 18:37:06 +0000 (18:37 +0000)]
Fix a marvelous chained AST writing bug, where we end up with the
following amusing sequence:
  - AST writing schedules writing a type X* that it had never seen
  before
  - AST writing starts writing another declaration, ends up
  deserializing X* from a prior AST file. Now we have two type IDs for
  the same type!
  - AST writer tries to write X*. It only has the lower-numbered ID
  from the the prior AST file, so references to the higher-numbered ID
  that was scheduled for writing go off into lalaland.

To fix this, keep the higher-numbered ID so we end up writing the type
twice. Since this issue occurs so rarely, and type records are
generally rather small, I deemed this better than the alternative: to
keep a separate mapping from the higher-numbered IDs to the
lower-numbered IDs, which we would end up having to check whenever we
want to deserialize any type.

Fixes <rdar://problem/8511624>, I think.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115647 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a block rewriter bug where copy/dispose entries in
Fariborz Jahanian [Tue, 5 Oct 2010 18:05:06 +0000 (18:05 +0000)]
Fix a block rewriter bug where copy/dispose entries in
block descriptor for outer block was missing even though
the block was importing objects into its inner blocks.
//rdar://84995992

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115644 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix handling of the 'Invalid' argument in SourceManager's methods (patch by Dean...
Zhanyong Wan [Tue, 5 Oct 2010 17:56:33 +0000 (17:56 +0000)]
Fix handling of the 'Invalid' argument in SourceManager's methods (patch by Dean Sturtevant, reviewed by chandlerc and Sebastian Redl).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115638 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoGive every file that ASTReader loads a type: module, PCH, precompiled preamble or...
Sebastian Redl [Tue, 5 Oct 2010 16:15:19 +0000 (16:15 +0000)]
Give every file that ASTReader loads a type: module, PCH, precompiled preamble or main file. Base Decls' PCHLevel on this to make it more sane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115626 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThread PerFileData through the ASTReader again, this time with the LLVM changes.
Sebastian Redl [Tue, 5 Oct 2010 15:59:54 +0000 (15:59 +0000)]
Thread PerFileData through the ASTReader again, this time with the LLVM changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115625 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRegister the __builtin_va_list_type node when we parse it, rather than
Douglas Gregor [Tue, 5 Oct 2010 15:41:24 +0000 (15:41 +0000)]
Register the __builtin_va_list_type node when we parse it, rather than
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove a rogue typo
Douglas Gregor [Tue, 5 Oct 2010 14:58:05 +0000 (14:58 +0000)]
Remove a rogue typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115618 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRegister the __builtin_va_list_type node when we parse it, rather than
Douglas Gregor [Tue, 5 Oct 2010 14:55:45 +0000 (14:55 +0000)]
Register the __builtin_va_list_type node when we parse it, rather than
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115617 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago* Simplify code
Zhongxing Xu [Tue, 5 Oct 2010 08:38:06 +0000 (08:38 +0000)]
* Simplify code
* Fix dump() to make it consistent with the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115609 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdded support for base and member destructors in destructor.
Marcin Swiderski [Tue, 5 Oct 2010 05:37:00 +0000 (05:37 +0000)]
Added support for base and member destructors in destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115592 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd test case for r115588.
Argyrios Kyrtzidis [Tue, 5 Oct 2010 03:15:43 +0000 (03:15 +0000)]
Add test case for r115588.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115590 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIn Sema's TryRefInitWithConversionFunction, suppress user conversions for the overloa...
Argyrios Kyrtzidis [Tue, 5 Oct 2010 03:05:30 +0000 (03:05 +0000)]
In Sema's TryRefInitWithConversionFunction, suppress user conversions for the overload candidates.
Fixes an infinite recursion in overload resolution for rdar://8499524.
Many thanks to Doug!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115588 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIf we're resolving all outstanding fixups, and there are multiple fixups
John McCall [Tue, 5 Oct 2010 02:33:56 +0000 (02:33 +0000)]
If we're resolving all outstanding fixups, and there are multiple fixups
for the same destination, then we must potentially rewrite the initial branch
of every fixup.  Without this patch, a short-circuit check meant to prevent
a switch case from being redundantly added was preventing later fixups from
being processed.  Fixes PR8175 (again).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115586 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIn the fragile ObjC ABI, save the caught exception to the side if there are
John McCall [Mon, 4 Oct 2010 23:42:51 +0000 (23:42 +0000)]
In the fragile ObjC ABI, save the caught exception to the side if there are
both @catches and a @finally, because the second call to @objc_exception_try_enter
will clobber the exception slot.  Fixes rdar://problem/8440970.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115575 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agodyn_cast is more appropriate here.
Devang Patel [Mon, 4 Oct 2010 22:28:23 +0000 (22:28 +0000)]
dyn_cast is more appropriate here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115569 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing '}' :)
Devang Patel [Mon, 4 Oct 2010 22:13:18 +0000 (22:13 +0000)]
Add missing '}' :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115568 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEmit debug info for an aggregate while processing MemberExpr if the aggregate's debug...
Devang Patel [Mon, 4 Oct 2010 21:46:04 +0000 (21:46 +0000)]
Emit debug info for an aggregate while processing MemberExpr if the aggregate's debug info was delayed untill now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115564 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix filename in header comment.
Devang Patel [Mon, 4 Oct 2010 21:15:33 +0000 (21:15 +0000)]
Fix filename in header comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115561 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen a type comes from a previously-loaded PCH/AST file, don't try to write it into...
Douglas Gregor [Mon, 4 Oct 2010 18:21:45 +0000 (18:21 +0000)]
When a type comes from a previously-loaded PCH/AST file, don't try to write it into a chained PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115527 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agowww: Add a "Clang Related Projects" page, to collect links to external projects
Daniel Dunbar [Mon, 4 Oct 2010 15:40:45 +0000 (15:40 +0000)]
www: Add a "Clang Related Projects" page, to collect links to external projects
using Clang in one way or another. Additions welcome!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115508 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdded support for C++ initializers in CFG.
Marcin Swiderski [Mon, 4 Oct 2010 03:38:22 +0000 (03:38 +0000)]
Added support for C++ initializers in CFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115493 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange to match 115473.
Chris Lattner [Sun, 3 Oct 2010 19:09:22 +0000 (19:09 +0000)]
Change to match 115473.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115474 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDo x86_64.
Bill Wendling [Sun, 3 Oct 2010 08:34:05 +0000 (08:34 +0000)]
Do x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115460 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTest to verify that all of the MMX builtins are handled by the front-end.
Bill Wendling [Sun, 3 Oct 2010 03:39:54 +0000 (03:39 +0000)]
Test to verify that all of the MMX builtins are handled by the front-end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115459 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen providing a block literal as a code completion for a
Douglas Gregor [Sat, 2 Oct 2010 23:49:58 +0000 (23:49 +0000)]
When providing a block literal as a code completion for a
function/method argument, include the parameter name and always
include parentheses (even for zero-parameter blocks). Otherwise, the
block literal placeholder '^' can look very weird.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115444 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntroduce a new libclang function, clang_getCursorDisplayName(), which
Douglas Gregor [Sat, 2 Oct 2010 22:49:11 +0000 (22:49 +0000)]
Introduce a new libclang function, clang_getCursorDisplayName(), which
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115428 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach clang_getCursorType() about base specifiers and other references
Douglas Gregor [Sat, 2 Oct 2010 21:57:58 +0000 (21:57 +0000)]
Teach clang_getCursorType() about base specifiers and other references
to types.

Also, teach clang_getTypeDeclaration() about template specializations,
injected-class-names, and elaborated types.

Fixes <rdar://problem/8506460>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115425 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agothe mmx intrinsic for pshufw should map to the IR intrinsic, not
Chris Lattner [Sat, 2 Oct 2010 21:32:59 +0000 (21:32 +0000)]
the mmx intrinsic for pshufw should map to the IR intrinsic, not
to a shufflevector.  Otherwise it doesn't turn into a pshufw.
This bug was introduced in the mmx rewrite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115423 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen we insert a category (or class extension) into an interface, mark
Douglas Gregor [Sat, 2 Oct 2010 21:06:43 +0000 (21:06 +0000)]
When we insert a category (or class extension) into an interface, mark
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115421 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't add -fno-spell-checking in libclang if a spell-checking-related argument is...
Douglas Gregor [Sat, 2 Oct 2010 20:06:51 +0000 (20:06 +0000)]
Don't add -fno-spell-checking in libclang if a spell-checking-related argument is already in the command-line arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115420 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoProvide proper source location and range information for C++ base
Douglas Gregor [Sat, 2 Oct 2010 19:51:13 +0000 (19:51 +0000)]
Provide proper source location and range information for C++ base
specifier cursors in libclang. FIXME -=2, fixes the rest of
<rdar://problem/8274883>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115419 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoImplement chained PCH support for the macro definitions stored within
Douglas Gregor [Sat, 2 Oct 2010 19:29:26 +0000 (19:29 +0000)]
Implement chained PCH support for the macro definitions stored within
the "detailed" preprocessing record.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115417 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse ParseObjCSelectorPiece for parsing getter and setter names in @property declarati...
Anders Carlsson [Sat, 2 Oct 2010 17:45:21 +0000 (17:45 +0000)]
Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115411 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRename a test in preparation for fixing PR8169.
Anders Carlsson [Sat, 2 Oct 2010 17:08:38 +0000 (17:08 +0000)]
Rename a test in preparation for fixing PR8169.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115410 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agowhen expanding a builtin, if the argument is required to be a constant,
Chris Lattner [Sat, 2 Oct 2010 00:09:12 +0000 (00:09 +0000)]
when expanding a builtin, if the argument is required to be a constant,
force it to be a constant instead of emitting with EmitScalarExpr.  In
-ftrapv mode, they are not the same.

This fixes rdar://8478728 + PR8221

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115388 91177308-0d34-0410-b5e6-96231b3b80d8