Fariborz Jahanian
4fc98f664b
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
llvm-svn: 115934
2010-10-07 18:12:21 +00:00
Douglas Gregor
c0f5dfc9d5
Don't force spell checking when code-completing. Let the client decide
...
llvm-svn: 115931
2010-10-07 18:03:24 +00:00
Daniel Dunbar
6036264fb4
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.
llvm-svn: 115915
2010-10-07 15:00:30 +00:00
Fariborz Jahanian
c74073cd20
Patch for adding message to unavailable attribute.
...
And its documentation.
Finishes off // rdar: // 6734520.
llvm-svn: 115862
2010-10-06 23:12:32 +00:00
Tom Care
ea53e82c78
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.
llvm-svn: 115861
2010-10-06 23:02:25 +00:00
Fariborz Jahanian
776653a70a
Simplified code for deprecated attribute wih message a little.
...
llvm-svn: 115856
2010-10-06 22:20:08 +00:00
Fariborz Jahanian
55106310ae
Add message to attribute(deprecated).
...
attribute(unavailable) to do next.
// rdar:// 6734520.
llvm-svn: 115842
2010-10-06 21:18:44 +00:00
Douglas Gregor
a3d3ba1cac
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.
llvm-svn: 115838
2010-10-06 21:11:08 +00:00
Devang Patel
284fa417ec
Mark FunctionNoProtoType's argument as unspecified parameters.
...
llvm-svn: 115834
2010-10-06 20:51:45 +00:00
John McCall
569eafce63
Re-enable EH cleanups to destroy __block variables, now that we have a moment to
...
deal with the consequences. Fixes rdar://problem/8224178.
llvm-svn: 115816
2010-10-06 18:56:43 +00:00
Nick Lewycky
3005242401
Silence unused variable warning in Release builds.
...
llvm-svn: 115806
2010-10-06 18:37:39 +00:00
Devang Patel
c0601d1e99
Do not emit subrange for incomplete array type.
...
This is tested by ptype.exp in gdb testsuite.
llvm-svn: 115805
2010-10-06 18:30:00 +00:00
Fariborz Jahanian
4801cc6315
Issue deprecated warning when typeof uses typedef
...
based on underlying type's deprecatedness.
llvm-svn: 115800
2010-10-06 17:00:02 +00:00
Douglas Gregor
3999e15d93
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.
llvm-svn: 115790
2010-10-06 16:00:31 +00:00
Devang Patel
5b389f495b
Remove unused argument.
...
llvm-svn: 115789
2010-10-06 15:58:57 +00:00
Nico Weber
9762e0a234
Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.
...
llvm-svn: 115743
2010-10-06 04:57:26 +00:00
Anders Carlsson
0f7e94fd7b
When checking for uninitialized fields in member initializers, special case static variables and enums. Fixes PR8075.
...
llvm-svn: 115732
2010-10-06 02:43:25 +00:00
John McCall
2a981c2056
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.
llvm-svn: 115730
2010-10-06 01:40:51 +00:00
John McCall
2551c1bbcd
Provide a slightly specialized diagnostic for tautological comparisons
...
of an enum value.
llvm-svn: 115725
2010-10-06 00:25:24 +00:00
John McCall
f449926a01
Use a more conventional/efficient implementation for isEnumeralType()
...
and isBuiltinType().
llvm-svn: 115724
2010-10-06 00:23:35 +00:00
Fariborz Jahanian
b292e32fd2
Ue TagType, added a FIXME. Per John's comment.
...
llvm-svn: 115723
2010-10-06 00:23:25 +00:00
Fariborz Jahanian
121f5148fd
Issue deprecated warning when typeof uses an
...
expression of deprecated type.
llvm-svn: 115713
2010-10-05 23:24:00 +00:00
John McCall
09d1369964
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.
llvm-svn: 115700
2010-10-05 22:36:42 +00:00
Fariborz Jahanian
c080a333ce
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
llvm-svn: 115683
2010-10-05 21:02:11 +00:00
John McCall
e5dd32da11
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.
llvm-svn: 115668
2010-10-05 20:48:15 +00:00
Douglas Gregor
44e5c1f16c
Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.
...
llvm-svn: 115667
2010-10-05 20:41:58 +00:00
Douglas Gregor
9b3932c0bc
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.
llvm-svn: 115647
2010-10-05 18:37:06 +00:00
Fariborz Jahanian
fc8315f56a
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
llvm-svn: 115644
2010-10-05 18:05:06 +00:00
Zhanyong Wan
ea6d7f332d
Fix handling of the 'Invalid' argument in SourceManager's methods (patch by Dean Sturtevant, reviewed by chandlerc and Sebastian Redl).
...
llvm-svn: 115638
2010-10-05 17:56:33 +00:00
Sebastian Redl
009e7f203f
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.
...
llvm-svn: 115626
2010-10-05 16:15:19 +00:00
Sebastian Redl
2c373b9876
Thread PerFileData through the ASTReader again, this time with the LLVM changes.
...
llvm-svn: 115625
2010-10-05 15:59:54 +00:00
Douglas Gregor
2c2c4cd9fd
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.
llvm-svn: 115621
2010-10-05 15:41:24 +00:00
Zhongxing Xu
614e17dddf
* Simplify code
...
* Fix dump() to make it consistent with the test case.
llvm-svn: 115609
2010-10-05 08:38:06 +00:00
Marcin Swiderski
20b88739ed
Added support for base and member destructors in destructor.
...
llvm-svn: 115592
2010-10-05 05:37:00 +00:00
Argyrios Kyrtzidis
dfbdfbba8f
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!
llvm-svn: 115588
2010-10-05 03:05:30 +00:00
John McCall
0077b22aa4
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).
llvm-svn: 115586
2010-10-05 02:33:56 +00:00
John McCall
9916e3fa93
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.
llvm-svn: 115575
2010-10-04 23:42:51 +00:00
Devang Patel
3703ff4163
dyn_cast is more appropriate here.
...
llvm-svn: 115569
2010-10-04 22:28:23 +00:00
Devang Patel
95eea45aa5
Add missing '}' :)
...
llvm-svn: 115568
2010-10-04 22:13:18 +00:00
Devang Patel
44b8bf0f5b
Emit debug info for an aggregate while processing MemberExpr if the aggregate's debug info was delayed untill now.
...
llvm-svn: 115564
2010-10-04 21:46:04 +00:00
Devang Patel
cbc7bc94c9
Fix filename in header comment.
...
llvm-svn: 115561
2010-10-04 21:15:33 +00:00
Douglas Gregor
dc72caa6de
When a type comes from a previously-loaded PCH/AST file, don't try to write it into a chained PCH file.
...
llvm-svn: 115527
2010-10-04 18:21:45 +00:00
Marcin Swiderski
87b1bb6fd2
Added support for C++ initializers in CFG.
...
llvm-svn: 115493
2010-10-04 03:38:22 +00:00
Douglas Gregor
af25cfaae0
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.
llvm-svn: 115444
2010-10-02 23:49:58 +00:00
Chris Lattner
07704f1d7e
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.
llvm-svn: 115423
2010-10-02 21:32:59 +00:00
Douglas Gregor
9109629e55
Implement chained PCH support for the macro definitions stored within
...
the "detailed" preprocessing record.
llvm-svn: 115417
2010-10-02 19:29:26 +00:00
Anders Carlsson
fe15a78ff2
Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.
...
llvm-svn: 115411
2010-10-02 17:45:21 +00:00
Chris Lattner
64d7f2a014
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
llvm-svn: 115388
2010-10-02 00:09:12 +00:00
Douglas Gregor
0eaa2bfe79
Don't add an imported function into its lexical context until *after*
...
we've set all of its parameters. Fixes <rdar://problem/8499598>;
thanks to Sean for the diagnosis.
llvm-svn: 115387
2010-10-01 23:55:07 +00:00
Chris Lattner
07e96866a2
tidy
...
llvm-svn: 115383
2010-10-01 23:43:16 +00:00