Argyrios Kyrtzidis [Fri, 10 Dec 2010 20:08:27 +0000 (20:08 +0000)]
Keep the source location of the selector in ObjCMessageExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 10 Dec 2010 20:08:22 +0000 (20:08 +0000)]
Make RecursiveASTVisitor traverse a ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121515
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 10 Dec 2010 19:45:06 +0000 (19:45 +0000)]
Do not assert on shifts of Neon polynomial types.
Most Neon shift intrinsics do not have variants for polynomial types, but
vsri_n and vsli_n do support them, and we need to properly range-check the
shift immediates for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121509
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 19:28:19 +0000 (19:28 +0000)]
Silence a few more uninitialized-value warnings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121505
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 19:27:07 +0000 (19:27 +0000)]
Silence a GCC unitialized-value warning
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121504
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 17:19:40 +0000 (17:19 +0000)]
Replace two QualType::getTypePtrOrNull() calls with
QualType::getTypePtr(). It turns out that
cast_or_null/dyn_cast_or_null don't actually use simplify_type, so
they're guaranteed to operator on non-NULL QualType or CanQualType
objects.
Good for a 0.6% win on 403.gcc's combine.c with -emit-llvm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121495
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 10 Dec 2010 17:08:53 +0000 (17:08 +0000)]
Do not substitute template types if template has dependent context
We should not substitute template types if the template has a dependent
context because the template argument stack is not yet fully formed.
Instead, defer substitution until the template has a non-dependent
context (i.e. instantiation of an outer template).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121491
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 10 Dec 2010 17:05:33 +0000 (17:05 +0000)]
Fix a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121490
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 17:03:06 +0000 (17:03 +0000)]
Eliminate the branching in QualType::getTypePtr() by providing a
common base for ExtQuals and Type that stores the underlying type
pointer. This results in a 2% performance win for -emit-llvm on a
typical C file, with 1% memory growth in the AST.
Note that there is an API change in this optimization:
QualType::getTypePtr() can no longer be invoked on a NULL
QualType. If the QualType might be NULL, use
QualType::getTypePtrOrNull(). I've audited all uses of getTypePtr() in
the code base and changed the appropriate uses over to
getTypePtrOrNull().
A future optimization opportunity would be to distinguish between
cast/dyn_cast and cast_or_null/dyn_cast_or_null; for the former, we
could use getTypePtr() rather than getTypePtrOrNull(), to take another
branch out of the cast/dyn_cast implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121489
91177308-0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Fri, 10 Dec 2010 16:29:40 +0000 (16:29 +0000)]
Added ParenType type node.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 15:40:48 +0000 (15:40 +0000)]
Silence GCC warning about comparisons between enumerators of different types
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121486
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 10 Dec 2010 12:03:06 +0000 (12:03 +0000)]
Another dummy commit to check GIT mirroring
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121482
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 10 Dec 2010 11:01:00 +0000 (11:01 +0000)]
It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 10:08:30 +0000 (10:08 +0000)]
Update ExtQuals comment to reflect the expansion of the fast qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121477
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 10 Dec 2010 09:12:16 +0000 (09:12 +0000)]
Optimize memory usage of FunctionProtoType on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121475
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 08:57:38 +0000 (08:57 +0000)]
Move the "volatile" bit into QualType's "fast" qualifier set,
increasing the required type alignment from 8 to 16. This provides a
2.5% speedup for -fsyntax-only on a token-cached Cocoa.h, while only
increasing memory consumption in the ASTContext by 0.8%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121474
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 08:12:03 +0000 (08:12 +0000)]
Use TypeAlignment constant rather than fixed alignment of 8
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121473
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Dec 2010 07:40:14 +0000 (07:40 +0000)]
Fixed version of 121435.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121472
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 07:23:11 +0000 (07:23 +0000)]
In clang_getCursor(), don't override a preprocessing cursor within
another preprocessing cursor, since we want the outermost one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121470
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 10 Dec 2010 06:26:19 +0000 (06:26 +0000)]
Add missing switch case to handle builtin for Neon vqnegq.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121468
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 10 Dec 2010 05:51:07 +0000 (05:51 +0000)]
LLVM's intrinsics for vpaddl and vpadal have 2 overloaded types.
Clang was only specifying the overloaded result type. PR8483.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121464
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Dec 2010 04:01:05 +0000 (04:01 +0000)]
Revert my previous patch to make the valgrind bots happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121460
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 10 Dec 2010 02:59:44 +0000 (02:59 +0000)]
Treat visibility on an enclosing namespace as a non-explicit source of
visibility. Fixes PR8713.
I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute. We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121459
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Dec 2010 02:58:03 +0000 (02:58 +0000)]
Add dependency to "make clang-test check-all".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121458
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 10 Dec 2010 01:59:28 +0000 (01:59 +0000)]
And more gzip goodness for clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121453
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 10 Dec 2010 01:49:45 +0000 (01:49 +0000)]
Bind the result of a property fetch to a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121452
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 10 Dec 2010 01:45:00 +0000 (01:45 +0000)]
Extend libclang debugging output for clang_getCursor() to show the definition we found
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121451
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 10 Dec 2010 01:11:38 +0000 (01:11 +0000)]
Neon compare absolute LLVM intrinsics are not overloaded. PR8484.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121447
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 10 Dec 2010 00:39:16 +0000 (00:39 +0000)]
Added remaining objective-c library builtins (as in gcc) to
clang. // rdar://
8735023
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121441
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 10 Dec 2010 00:11:00 +0000 (00:11 +0000)]
Fix another obscure corner layout case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121436
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Dec 2010 23:48:34 +0000 (23:48 +0000)]
Update clang for the API changes in the cfi patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121435
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 9 Dec 2010 23:37:49 +0000 (23:37 +0000)]
Add Neon vreinterpret intrinsics for half-float (f16) types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121433
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 9 Dec 2010 23:35:36 +0000 (23:35 +0000)]
Don't crash when code-completing after "#include <". It would be far
better to actually produce a decent set of completions by checking the
system include paths, but not today. Fixes PR8744.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121431
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 9 Dec 2010 23:11:32 +0000 (23:11 +0000)]
Refactored/cleanedup ActOnFunctionDeclarator
and ActOnVariableDeclarator
No functionality change. // rdar://
8751949
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121427
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 9 Dec 2010 23:01:55 +0000 (23:01 +0000)]
Eliminate duplicate code completions for properties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121424
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 9 Dec 2010 21:44:02 +0000 (21:44 +0000)]
Don't walk the translation unit context to produce protocol names when
global code completions are disabled (e.g., because they are
cached). Also, make sure that forward-declared protocols are visited
when we look for all visible names within a declaration context.
Previously, we would end up with duplicate completions for protocols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121416
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 9 Dec 2010 21:27:43 +0000 (21:27 +0000)]
Gather cached code completions after the first reparse, not after the
second reparse.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121413
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 9 Dec 2010 19:27:37 +0000 (19:27 +0000)]
Update test.
This test intends to catch invalid use of ".byte 256" in output. Now, the assert in MC will be triggered in such cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121403
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 9 Dec 2010 18:58:31 +0000 (18:58 +0000)]
Fix type of last vector operand of Neon quad-register multiple-lane intrinsics.
The sensible thing would be to have these intrinsics take all quad-register
vector operands, but that's not what ARM did. They made the last vector
operand always be a double-register type. Since the lane number
must be a constant, the user can know which half of a quad-register contains
that lane, extract the high or low half of the vector, and adjust the lane
number accordingly. The only advantage I can see for this is that it works
better when you want to multiply a quad-register value by a lane from a
double-register value, but I wouldn't have expected that to be the common
case. Oh well -- at this point we just need to follow the spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121397
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 9 Dec 2010 18:31:16 +0000 (18:31 +0000)]
Fix the names of the v[r]addhn and v[r]subhn Neon intrinsics.
Their suffixes are supposed to reflect the source operand element type,
not the destination element type. Radar
8746481.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121392
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 9 Dec 2010 17:36:38 +0000 (17:36 +0000)]
Use error_code instead of std::string* for MemoryBuffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121378
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 9 Dec 2010 16:59:22 +0000 (16:59 +0000)]
When an "inline" declaration was followed by a definition not marked
"inline", we weren't giving the definition weak linkage because the
"inline" bit wasn't propagated. This was a longstanding FIXME that,
somehow, hadn't triggered a bug in the wild. Fix this problem by
tracking whether any declaration was marked "inline", and clean up the
semantics of GNU's "extern inline" semantics calculation based on this
change.
Fixes <rdar://problem/
8740363>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121373
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Thu, 9 Dec 2010 10:07:54 +0000 (10:07 +0000)]
Fix PR8760: IndirectFieldDecl Type was not updated during template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121363
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 9 Dec 2010 07:01:08 +0000 (07:01 +0000)]
Add missing "s32" and "u32" variants of Neon vzip intrinsic.
Radar
8446277.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121360
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 9 Dec 2010 06:47:29 +0000 (06:47 +0000)]
Add missing "p16" type variants for the Neon VREV32 intrinsics.
Radar
8446277.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121359
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 9 Dec 2010 02:47:58 +0000 (02:47 +0000)]
Fix another unnecessary-struct-padding issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121352
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 9 Dec 2010 01:00:12 +0000 (01:00 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121341
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 9 Dec 2010 00:35:20 +0000 (00:35 +0000)]
Before determining the effect the alignment of base struct will have in the aligment of the sub-struct,
take into account if the sub-struct is packed and its maximum field alignment.
Fixes rdar://
8745206
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121335
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 9 Dec 2010 00:33:41 +0000 (00:33 +0000)]
Remove extra namespace specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121334
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 9 Dec 2010 00:33:05 +0000 (00:33 +0000)]
Remove unused parameter. getContextDescriptor() and getOrCreateNameSpace().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121333
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 9 Dec 2010 00:25:29 +0000 (00:25 +0000)]
Remove unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121326
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 9 Dec 2010 00:11:12 +0000 (00:11 +0000)]
Test case for r121323.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121324
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 9 Dec 2010 00:06:27 +0000 (00:06 +0000)]
A typename specifier can end up referring to a unresolved using
declaration that is a value in ill-formed code. Instead of crashing,
treat this as a dependent typename specifier and suggest that the
using add "typename" into the using declaration. Fixes <rdar://problem/
8740998>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121322
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 9 Dec 2010 00:01:52 +0000 (00:01 +0000)]
DenseMapInfo is a 'struct', not a 'class'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121321
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 8 Dec 2010 23:43:14 +0000 (23:43 +0000)]
Add new libclang hooks for CXCursorSet, a
DenseMap-backed hashtable for doing client-side
management of CXCursors within a set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121318
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 8 Dec 2010 22:42:58 +0000 (22:42 +0000)]
Start using DIBuilder. It provides cleaner interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121302
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 8 Dec 2010 22:37:56 +0000 (22:37 +0000)]
Stop using builtins for the "_lane" variants of saturating multiply intrinsics.
Remove the "splat" parameter from the EmitNeonCall function, since it is no
longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121300
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 8 Dec 2010 22:35:30 +0000 (22:35 +0000)]
Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 8 Dec 2010 22:02:28 +0000 (22:02 +0000)]
Put the "'typename' occurs outside of a template" and "'template'
keyword occurs outside of a template" diagnostics under
-WC++0x-extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121290
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 8 Dec 2010 21:39:47 +0000 (21:39 +0000)]
Stop using clang builtins for Neon vabdl and vabal intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121288
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 8 Dec 2010 21:33:40 +0000 (21:33 +0000)]
Driver: M and MM should be grouped together, <rdar://problem/
8744831>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121284
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 8 Dec 2010 20:09:54 +0000 (20:09 +0000)]
Stop using clang builtins for Neon vaba intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 8 Dec 2010 19:11:45 +0000 (19:11 +0000)]
Make this test resilient to whether or not the Linux toolchain renders the
sysroot flag to the link command as a joined flag or a separate flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121270
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 8 Dec 2010 17:15:44 +0000 (17:15 +0000)]
Fix BinaryOperator dispatch for RecursiveASTVisitor, from Benoit Perrot!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121266
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 8 Dec 2010 16:41:55 +0000 (16:41 +0000)]
Fix two thinkos and add a test for importing the AST of a category
implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121263
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 8 Dec 2010 09:11:05 +0000 (09:11 +0000)]
Fix bug where annotate tokens was not working for BinaryTypeTraitExpr.
CIndex's EnqueueVisitor must visit elements backward apparently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121247
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 8 Dec 2010 09:04:37 +0000 (09:04 +0000)]
Fix test that didn't really test anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121246
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 8 Dec 2010 02:02:46 +0000 (02:02 +0000)]
Handle parameter attributes when tentative parsing for function/variable disambiguation.
Fixes rdar://
8739801.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 8 Dec 2010 01:29:17 +0000 (01:29 +0000)]
Silence an unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121221
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 8 Dec 2010 00:14:43 +0000 (00:14 +0000)]
Stop using clang builtins for Neon vadd[lw] and vsub[lw] intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121214
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 23:54:55 +0000 (23:54 +0000)]
Stop using clang builtins for Neon vmlal{_n,_lane} and vmlsl{_n,_lane}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121210
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 7 Dec 2010 22:55:51 +0000 (22:55 +0000)]
Test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121194
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 7 Dec 2010 22:54:16 +0000 (22:54 +0000)]
Bump up property conversion earlier in the initialization process. Fixes
the failed compile in PR8751.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121192
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 22:40:02 +0000 (22:40 +0000)]
Stop using a clang builtin for Neon vdup_lane intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121191
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 22:03:46 +0000 (22:03 +0000)]
Stop using a clang builtin for Neon vmull_lane intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121189
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 22:03:43 +0000 (22:03 +0000)]
Add a missing parameter, without which clang crashes for vqshlu_n intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121188
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 20:03:04 +0000 (20:03 +0000)]
Implement vmull and vmull_n intrinsics without using clang builtins.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121174
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Dec 2010 18:32:03 +0000 (18:32 +0000)]
Implement AST import for Objective-C property implementations
(@synthesize and @dynamic).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121159
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 7 Dec 2010 15:51:48 +0000 (15:51 +0000)]
Cast CachedLinkage to linkage to avoid "comparison between signed and unsigned integer" warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121143
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Dec 2010 15:32:12 +0000 (15:32 +0000)]
Implement ASTImporter support for Objective-C category implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121139
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 7 Dec 2010 15:23:23 +0000 (15:23 +0000)]
Fix PR8720 by printing an error message with a substring that the gcc testsuite searches for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121137
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 7 Dec 2010 08:25:34 +0000 (08:25 +0000)]
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121121
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Dec 2010 01:26:03 +0000 (01:26 +0000)]
Extern the ASTImporter to import @implementation declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121097
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 01:12:51 +0000 (01:12 +0000)]
Add Neon vreinterpret intrinsics.
Radar
8681774.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121089
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Dec 2010 01:12:48 +0000 (01:12 +0000)]
Make whitespace more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121088
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 7 Dec 2010 00:55:57 +0000 (00:55 +0000)]
Fix enumerator not handled in switch warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121084
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 7 Dec 2010 00:47:33 +0000 (00:47 +0000)]
Kill FullExpr, as it was not, in fact, used anywhere in the code base.
I'm not opposed to the idea in concept, but there's no point in preserving
abortive experiments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121083
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Dec 2010 00:41:46 +0000 (00:41 +0000)]
Use Sema::MaybeCreateExprWithCleanups() only after we've checked for a NULL/invalid expression
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121081
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 7 Dec 2010 00:21:00 +0000 (00:21 +0000)]
Fix compile error: comma at end of enumerator list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121075
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 7 Dec 2010 00:08:36 +0000 (00:08 +0000)]
Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Dec 2010 00:05:48 +0000 (00:05 +0000)]
Use atomic operations for libclang's object count tracking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121073
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 6 Dec 2010 22:09:19 +0000 (22:09 +0000)]
Objective-C pointer conversions to 'id' or qualified 'id' subsume
cv-qualification conversions. More specifically, there's an implicit
cv-qualification conversion (even one that drops qualifiers) when
converting to 'id' or qualified 'id'. Fixes <rdar://problem/
8734046>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121047
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 6 Dec 2010 20:48:59 +0000 (20:48 +0000)]
Split out a function to do lvalue conversion on objects; this is basically
FunctionArrayLvalueConversion but without the function/array decay. Generally
this is only appropriate for use sites that know the type of the expression
and thus that it can't be subject to the decays.
Also make sure we do lvalue-to-rvalue on the bases of ivar references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121035
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Dec 2010 19:46:27 +0000 (19:46 +0000)]
c/objc/c++'98 are basically done, but we want '0x support.
Add "clang indent" as a possible project, we really really
need it. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121030
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Dec 2010 19:36:50 +0000 (19:36 +0000)]
Remove a fixme which was fixed in a previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121029
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 6 Dec 2010 18:50:56 +0000 (18:50 +0000)]
Use the unused merge() function, fixing an minor, unintended change I
introduced in r121023.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121025
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 6 Dec 2010 18:36:25 +0000 (18:36 +0000)]
Re-implement caching for the linkage calculation of declarations.
My previous attempt at solving the compile-time problem with many
redeclarations of the same entity cached both linkage and visibility,
while this patch only tackles linkage. There are several reasons for
this difference:
- Linkage is a language concept, and is evaluated many times during
semantic analysis and codegen, while visibility is only a
code-generation concept that is evaluated only once per (unique)
declaration. Hence, we *must* optimize linkage calculations but
don't need to optimize visibility computation.
- Once we know the linkage of a declaration, subsequent
redeclarations can't change that linkage. Hence, cache
invalidation is far simpler than for visibility, where a later
redeclaration can completely change the visibility.
- We have 3 spare bits in Decl to store the linkage cache, so the
cache doesn't increase the size of declarations. With the
visibility+linkage cache, NamedDecl got larger.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121023
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 6 Dec 2010 18:36:11 +0000 (18:36 +0000)]
Do unary conversions on vararg arguments and *then* special-case float.
Fixes PR8742.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121022
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Dec 2010 17:51:53 +0000 (17:51 +0000)]
Use Sema's MarkDeclarationReferenced, which takes care of templates, instead of calling Decl's setUsed directly.
Thanks to John for the hint!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121014
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Dec 2010 17:51:50 +0000 (17:51 +0000)]
Use the source location of the parameter, when it makes sense, for diagnostics in HandleCleanupAttr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121013
91177308-0d34-0410-b5e6-
96231b3b80d8