Argyrios Kyrtzidis
37ab726d63
[analyzer] Introduce ObjCMessage which represents both explicit ObjC message expressions and implicit
...
messages that are sent for handling properties in dot syntax.
Replace all direct uses of ObjCMessageExpr in the checkers and checker interface with ObjCMessage.
llvm-svn: 124159
2011-01-25 00:03:53 +00:00
Argyrios Kyrtzidis
1b9747fe2c
In a ObjCMessageExpr with the super class as receiver, 'super' is actually a ObjCInterfaceType.
...
llvm-svn: 124158
2011-01-25 00:03:48 +00:00
Argyrios Kyrtzidis
8e169a5f18
[analyzer] Simplify GetReceiverType function in BasicObjCFoundationChecks.cpp; no functionality change.
...
llvm-svn: 124157
2011-01-25 00:03:45 +00:00
Eric Christopher
23ec82fa47
Revert r124146 for now. It appears to be failing on a few platforms.
...
llvm-svn: 124153
2011-01-24 23:07:03 +00:00
Anton Yartsev
3bad9afaba
pre/post increase/decrease for AltiVec vectors
...
llvm-svn: 124146
2011-01-24 20:55:22 +00:00
Nick Lewycky
0c4380856b
Enhance the diagnostic for referring to a typedef with an elaborated name to be
...
as useful in a templated context as it is without templates. Fixes PR8755!
llvm-svn: 124136
2011-01-24 19:01:04 +00:00
Douglas Gregor
a5f6f9c7a1
Disallow function template partial specializations, from Hans
...
Wennborg! Fixes PR8295.
llvm-svn: 124135
2011-01-24 18:54:39 +00:00
Douglas Gregor
62c3134629
Eliminate the use of getTypeForDecl from clang_getCursorType() and
...
clang_getDeclObjCTypeEncoding(); use ASTContext's methods instead,
which will (lazily) create the type as needed. Otherwise, we can end
up with null QualTypes.
llvm-svn: 124133
2011-01-24 18:44:28 +00:00
Douglas Gregor
52552c8a32
Note the need for --param=build_config=whatever in the Hacking Clang document, from Yuri Gribov
...
llvm-svn: 124130
2011-01-24 18:04:58 +00:00
Douglas Gregor
baba85dc34
Improve the printing of C++ construction expressions, from Yuri Gribov!
...
llvm-svn: 124123
2011-01-24 17:25:03 +00:00
Anders Carlsson
1eb95961d3
Use attributes for all the override control specifiers.
...
llvm-svn: 124122
2011-01-24 16:26:15 +00:00
Douglas Gregor
f143cd5051
Re-instate r123977/r123978, my updates of the reference-binding
...
implementation used by overload resolution to support rvalue
references. The original commits caused PR9026 and some
hard-to-reproduce self-host breakage.
The only (crucial!) difference between this commit and the previous
commits is that we now properly check the SuppressUserConversions flag
before attempting to perform a second user-defined conversion in
reference binding, breaking the infinite recursion chain of
user-defined conversions.
Rvalue references should be working a bit better now.
llvm-svn: 124121
2011-01-24 16:14:37 +00:00
Axel Naumann
20b2786524
Check whether DependentScopeDeclRefExpr's NestedNameSpecifier exists before accessing it, both for consistency (see StmtPrinter::VisitDeclRefExpr()) and for other use cases of dependent types.
...
llvm-svn: 124119
2011-01-24 15:44:00 +00:00
Douglas Gregor
fa69024463
Eliminate the last reference to concepts, from Jean-Daniel Dupas
...
llvm-svn: 124118
2011-01-24 15:22:41 +00:00
Anders Carlsson
3bbfb7f64b
Fix the __has_attribute example; we don't have an override attribute anymore.
...
llvm-svn: 124106
2011-01-24 03:54:51 +00:00
Chris Lattner
c2989b3718
fix some typos, patch by Jonathan Wakely!
...
llvm-svn: 124105
2011-01-24 03:47:59 +00:00
Chris Lattner
7d29d4503a
fix a broken example, PR9005, patch by Jonathan Wakely!
...
llvm-svn: 124104
2011-01-24 03:47:34 +00:00
Chris Lattner
d8d7543419
remove some crazy leftover thing.
...
llvm-svn: 124098
2011-01-24 02:53:58 +00:00
Anders Carlsson
75286a7470
When building a type info struct for EH, we always want it to have linkonce_odr linkage.
...
llvm-svn: 124096
2011-01-24 02:12:11 +00:00
Anders Carlsson
68d3424b8c
Change CodeGenModule::getVTableLinkage to be a non-static member function.
...
llvm-svn: 124095
2011-01-24 02:04:33 +00:00
Anders Carlsson
ba840fb73c
"Name" a bool parameter.
...
llvm-svn: 124094
2011-01-24 01:59:49 +00:00
Ken Dyck
c28614cec4
Use CharUnits for the offset amount of RegionRawOffset.
...
llvm-svn: 124093
2011-01-24 01:55:39 +00:00
Ken Dyck
7c4026bea7
Remove private toCharUnits() helper method, replacing with calls to
...
ASTContext::toCharUnitsFromBits().
llvm-svn: 124092
2011-01-24 01:28:50 +00:00
Anders Carlsson
571e2ad042
Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the exception of explicit template instantiations, which have to be weak_odr.
...
This fixes PR6996.
llvm-svn: 124089
2011-01-24 00:46:19 +00:00
Anders Carlsson
e30621b626
Get rid of [[hiding]], [[override]] and [[base_check]].
...
llvm-svn: 124087
2011-01-23 21:33:18 +00:00
Anders Carlsson
19588aa40b
Get rid of the [[final]] C++0x attribute.
...
llvm-svn: 124083
2011-01-23 21:07:30 +00:00
Rafael Espindola
148141c98f
Add support for the --noexecstack option. Fixes PR8762.
...
llvm-svn: 124078
2011-01-23 17:58:26 +00:00
Ted Kremenek
8f01420d9d
Teach -Wuninitialized-experimental about sizeof().
...
llvm-svn: 124076
2011-01-23 17:53:04 +00:00
Ted Kremenek
499897b463
Tweak diagnostic:
...
error: no super class declared in @interface for 'XXX'
to be:
error: 'X' cannot use 'super' because it is a root class
The latter explains what the user actually did wrong.
Fixes: <rdar://problem/8904409>
llvm-svn: 124074
2011-01-23 17:21:34 +00:00
Ted Kremenek
582a0999fb
Null initialize a few variables flagged by
...
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.
llvm-svn: 124072
2011-01-23 17:04:59 +00:00
Anders Carlsson
5a72fdb05b
Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax is unambiguous and can't be confused with C++98 syntax. If anyone disagrees, please shout!
...
llvm-svn: 124048
2011-01-22 23:01:49 +00:00
Anders Carlsson
7d59a68330
Implement [class.derived]p8.
...
llvm-svn: 124047
2011-01-22 22:23:37 +00:00
Anders Carlsson
703d6e62d0
Serialize and deserialize IsMarkedFinal/IsMarkedExplicit.
...
llvm-svn: 124041
2011-01-22 18:11:02 +00:00
Anders Carlsson
c4964a40ba
Mark classes final and/or explicit during class template instantiation.
...
llvm-svn: 124040
2011-01-22 18:07:06 +00:00
Anders Carlsson
fc1eef4898
Mark classes as final or explicit. Diagnose when a class marked 'final' is used as a base.
...
llvm-svn: 124039
2011-01-22 17:51:53 +00:00
Anders Carlsson
67f9e61127
Add final/explicit getters and setters to CXXRecordDecl.
...
llvm-svn: 124037
2011-01-22 17:22:48 +00:00
Anders Carlsson
4b63d0e0a7
Parse class-virt-specifier-seqs.
...
llvm-svn: 124036
2011-01-22 16:56:46 +00:00
Anders Carlsson
f2ca389205
More work on ClassVirtSpecifiers.
...
llvm-svn: 124035
2011-01-22 15:58:16 +00:00
Rafael Espindola
b53c03be8a
Add test from PR9026.
...
llvm-svn: 124034
2011-01-22 15:34:07 +00:00
Rafael Espindola
be468d9a2b
revert r123977 and r123978 to fix PR9026.
...
llvm-svn: 124033
2011-01-22 15:32:35 +00:00
Anders Carlsson
a6d35015c8
Start stubbing out a ClassVirtSpecifiers class.
...
llvm-svn: 124032
2011-01-22 15:11:37 +00:00
Anders Carlsson
e973899f46
A member function template cannot be virtual.
...
llvm-svn: 124031
2011-01-22 14:43:56 +00:00
Benjamin Kramer
1e1888979b
Use a FunctionType::get overload that doesn't require an empty vector.
...
llvm-svn: 124029
2011-01-22 12:15:57 +00:00
John McCall
0140bfeead
Improve our parse recovery on 'case blah;' and 'default;'.
...
llvm-svn: 124025
2011-01-22 09:28:32 +00:00
Douglas Gregor
9c399a29fd
Send code generation for xvalues down the same path as lvalues
...
llvm-svn: 124023
2011-01-22 02:44:21 +00:00
Douglas Gregor
b8c7fe9dc9
Debug info generation for rvalue references
...
llvm-svn: 124020
2011-01-22 01:58:15 +00:00
Douglas Gregor
c1ed20cfba
Update const_cast semantics for rvalue references. Add tests for
...
reinterpret_cast and const_cast using rvalue references.
llvm-svn: 124007
2011-01-22 00:19:52 +00:00
Douglas Gregor
465184ae10
Teach static_cast and dynamic_cast about rvalue references.
...
llvm-svn: 124006
2011-01-22 00:06:57 +00:00
Douglas Gregor
3f9047e321
Add a test for "perfect" forwarding
...
llvm-svn: 124005
2011-01-21 22:52:47 +00:00
Ted Kremenek
33d4b5eb66
Provide -Wuninitialized-experimental fixits
...
for floats, and also check if 'nil' is declared
when suggesting it for initializing ObjC pointers.
llvm-svn: 124004
2011-01-21 22:49:49 +00:00