]>
granicus.if.org Git - clang/log
Chris Lattner [Thu, 26 Aug 2010 20:05:48 +0000 (20:05 +0000)]
add radar #
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 20:05:13 +0000 (20:05 +0000)]
fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
memory (as required) the later now passes in an xmm register. This
fixes gcc.dg/compat/vector_1 on x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 26 Aug 2010 19:58:26 +0000 (19:58 +0000)]
clang.xcodeproj updated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 18:13:50 +0000 (18:13 +0000)]
vector of long and ulong are also classified as INTEGER in x86-64 abi,
this fixes rdar://
8358475 a failure of the gcc.dg/compat/vector_1 abi
test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 18:03:20 +0000 (18:03 +0000)]
1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
this fixes a miscompilation on the included testcase, rdar://
8359248
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112201
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 17:42:30 +0000 (17:42 +0000)]
...I forgot to check my new test after adding it, and lo, there's slightly different
behavior in C than in C++ (which is what the original test case was).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112199
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 17:22:34 +0000 (17:22 +0000)]
Make sure we clear TypeSpecOwned when setting TypeSpecType to something when
it might previously have been a tag TST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 16:46:39 +0000 (16:46 +0000)]
Tweak the @selector completion to collapse multiple informative and
typed-text blocks into one of each.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 16:36:48 +0000 (16:36 +0000)]
When code-completing a potential call to a C++ non-static member
function, take into account the qualifiers on the object argument
(e.g., what will become "this"), filtering around uncallable member
functions and giving a slight priority boost to those with
exactly-matching qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112193
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 16:36:35 +0000 (16:36 +0000)]
Work around a gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112192
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 26 Aug 2010 15:23:38 +0000 (15:23 +0000)]
Fix miscompilation. The cookie was not used when new'ing arrays with multiple dimensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 26 Aug 2010 15:21:38 +0000 (15:21 +0000)]
clang-interpreter: libFrontend depends on libSerialization. Fix linux build by changing the link order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112187
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 15:07:07 +0000 (15:07 +0000)]
Implement code completion for @selector expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 14:20:32 +0000 (14:20 +0000)]
More ordering tweaks in this silly, silly test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 26 Aug 2010 14:20:18 +0000 (14:20 +0000)]
mark boost's tracking bug as fixed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 14:07:34 +0000 (14:07 +0000)]
Tweak wording in an assertion, from dawn@burble.org.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 26 Aug 2010 13:48:56 +0000 (13:48 +0000)]
Update clang-interpreter for recent DiagnosticClient ownership changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 13:48:20 +0000 (13:48 +0000)]
Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.
3rd try. How embarrassing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 10:20:09 +0000 (10:20 +0000)]
Missed a couple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112179
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 09:52:08 +0000 (09:52 +0000)]
Apparently gcc doesn't always get injected class names right.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112178
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 09:15:37 +0000 (09:15 +0000)]
Move things around so that Sema.h no longer depends on even DeclBase.h.
It still depends on Type because DeclarationName.h does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 06:28:35 +0000 (06:28 +0000)]
tame an assertion, fixing rdar://
8357396
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 06:02:12 +0000 (06:02 +0000)]
CGValue: Increase width of allowed alignment. We could switch to log2, but we
don't currently need the bits anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 03:53:50 +0000 (03:53 +0000)]
Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 03:53:44 +0000 (03:53 +0000)]
Revert r112154, "Fix thinko in sorting operation", it depends on r112149 which
doth lay upon the chopping block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 03:52:21 +0000 (03:52 +0000)]
Tweak test to avoid checking for a specific ordering where none exists
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112159
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 03:08:43 +0000 (03:08 +0000)]
De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 02:54:05 +0000 (02:54 +0000)]
Fix thinko in sorting operation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 26 Aug 2010 02:27:03 +0000 (02:27 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 02:23:45 +0000 (02:23 +0000)]
Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 26 Aug 2010 02:13:20 +0000 (02:13 +0000)]
Restore r112114 now that SmallVector<...,0> is safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Aug 2010 02:09:25 +0000 (02:09 +0000)]
Move some type defines from smmintrin.h to emmintrin.h to match where
gcc defines them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 26 Aug 2010 01:42:22 +0000 (01:42 +0000)]
Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 01:41:44 +0000 (01:41 +0000)]
Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
ready yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 26 Aug 2010 01:17:33 +0000 (01:17 +0000)]
zap dead ctor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 00:55:57 +0000 (00:55 +0000)]
IRgen/NEON: Fix codegen of vzip and vzipq.
- Will be adding an executable test case to test-suite repo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 00:55:55 +0000 (00:55 +0000)]
Driver: Fix thinko where I switched to always using the old toolchain, instead
of always using the new toolchain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112125
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 00:55:52 +0000 (00:55 +0000)]
Driver/Darwin: Pass the right arch specific dir for ARM, when linking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112124
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 26 Aug 2010 00:52:50 +0000 (00:52 +0000)]
Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own
header.", it is teh broken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 26 Aug 2010 00:42:16 +0000 (00:42 +0000)]
With lax vector conversions (the default) make sure we convert between two
vectors that are the same size. Fix up testcases accordingly and add a new one
to make sure we still error if lax vector conversions are disabled.
Fixes rdar://
8328190
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112122
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 26 Aug 2010 00:30:24 +0000 (00:30 +0000)]
Revert "Move the sorting of code-completion results out of the main path and
into the clients", because the C standard library sucks. Where's my
stable sort, huh?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 26 Aug 2010 00:17:38 +0000 (00:17 +0000)]
Add DelayedDiagnostic.h to xcode project file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 26 Aug 2010 00:13:24 +0000 (00:13 +0000)]
More update of clang.xcodeproj for recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 26 Aug 2010 00:06:40 +0000 (00:06 +0000)]
Update clang.xcodeproj for recent refactorings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 25 Aug 2010 23:45:44 +0000 (23:45 +0000)]
Fix typo in error message and testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112115
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 23:44:00 +0000 (23:44 +0000)]
Pull DelayedDiagnostic and AccessedEntity out into their own header.
This works courtesy of the new SmallVector<..., 0> specialization that
doesn't require a complete type. Note that you'll need to pull at least
SmallVector.h from LLVM to compile successfully.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 23:42:51 +0000 (23:42 +0000)]
Revert r112043, static volatiles are removed by the optimizer. Thanks Chris!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 25 Aug 2010 23:39:14 +0000 (23:39 +0000)]
Finally pass "two floats in a 64-bit unit" as a <2 x float> instead of
as a double in the x86-64 ABI. This allows us to generate much better
code for certain things, e.g.:
_Complex float f32(_Complex float A, _Complex float B) {
return A+B;
}
Used to compile into (look at the integer silliness!):
_f32: ## @f32
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm1
movd %xmm0, %rcx
movd %ecx, %xmm0
addss %xmm1, %xmm0
movd %xmm0, %edx
shrq $32, %rax
movd %eax, %xmm0
shrq $32, %rcx
movd %ecx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %eax
shlq $32, %rax
addq %rdx, %rax
movd %rax, %xmm0
ret
Now we get:
_f32: ## @f32
movdqa %xmm0, %xmm2
addss %xmm1, %xmm2
pshufd $16, %xmm2, %xmm2
pshufd $1, %xmm1, %xmm1
pshufd $1, %xmm0, %xmm0
addss %xmm1, %xmm0
pshufd $16, %xmm0, %xmm1
movdqa %xmm2, %xmm0
unpcklps %xmm1, %xmm0
ret
and compile stuff like:
extern float _Complex ccoshf( float _Complex ) ;
float _Complex ccosf ( float _Complex z ) {
float _Complex iz;
(__real__ iz) = -(__imag__ z);
(__imag__ iz) = (__real__ z);
return ccoshf(iz);
}
into:
_ccosf: ## @ccosf
## BB#0: ## %entry
pshufd $1, %xmm0, %xmm1
xorps LCPI4_0(%rip), %xmm1
unpcklps %xmm0, %xmm1
movaps %xmm1, %xmm0
jmp _ccoshf ## TAILCALL
instead of:
_ccosf: ## @ccosf
## BB#0: ## %entry
movd %xmm0, %rax
movq %rax, %rcx
shlq $32, %rcx
shrq $32, %rax
xorl $-
2147483648 , %eax ## imm = 0xFFFFFFFF80000000
addq %rcx, %rax
movd %rax, %xmm0
jmp _ccoshf ## TAILCALL
There is still "stuff to be done" here for the struct case,
but this resolves rdar://
6379669 - [x86-64 ABI] Pass and return
_Complex float / double efficiently
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 23:14:56 +0000 (23:14 +0000)]
Fix miscompilation. The custom new[]/delete[] methods were not getting called for arrays with more than 1 dimension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Wed, 25 Aug 2010 22:46:03 +0000 (22:46 +0000)]
Add missing null checks in PseudoConstantAnalysis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Wed, 25 Aug 2010 22:37:26 +0000 (22:37 +0000)]
Improved the handling of blocks and block variables in PseudoConstantAnalysis
- Removed the assumption that __block vars are all non-constant
- Simplified some repetitive code in RunAnalysis
- Added block walking support
- Code/comments cleanup
- Separated out test for block pseudoconstants
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 25 Aug 2010 22:16:06 +0000 (22:16 +0000)]
Fix RUN line in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 25 Aug 2010 22:16:02 +0000 (22:16 +0000)]
When annotating tokens, don't fallback to annotating with a null cursor for cursors that come before a macro instantiation. Fixes <rdar://problem/
7974151 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 22:15:42 +0000 (22:15 +0000)]
Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112095
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 22:03:47 +0000 (22:03 +0000)]
Split out a header to hold APIs meant for the Sema implementation from Sema.h.
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 25 Aug 2010 21:59:25 +0000 (21:59 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 18:41:16 +0000 (18:41 +0000)]
When combining the code-completion results from Sema long with the
code-completion results cached by ASTUnit, sort the resulting result
set. This makes testing far, far easier, so this commit also includes
tests for the previous few fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 25 Aug 2010 18:17:27 +0000 (18:17 +0000)]
Fix horrible white space errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112067
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 18:07:12 +0000 (18:07 +0000)]
Initialize the translation-unit scope before lexing the first
token. The first token might be something that ends up triggering code
completion, which in turn requires a valid Scope. Test case forthcoming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 18:04:30 +0000 (18:04 +0000)]
Add a missing case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 18:04:15 +0000 (18:04 +0000)]
Fix an off-by-one error when computing the precompiled preamble for
code completion. We were allowing the preamble to include the line
that we're code-completing on. Again, testcase is forthcoming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 18:03:13 +0000 (18:03 +0000)]
Make the cursor kind of macro-name-only completions produced by
ASTUnit match those produced directly by code completion. Test case is
forthcoming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 25 Aug 2010 17:32:22 +0000 (17:32 +0000)]
Robustify test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 17:11:34 +0000 (17:11 +0000)]
Test for previous commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 17:10:00 +0000 (17:10 +0000)]
Add a code-completion context for "natural language" completions, so
that ASTUnit knows not to try to provide completions there.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 17:04:25 +0000 (17:04 +0000)]
Introduce a preprocessor code-completion hook for contexts where we
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 15:47:31 +0000 (15:47 +0000)]
Implement __builtin_printf, __builtin_fprintf. Fixes <rdar://problem/
8336581 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112049
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 25 Aug 2010 13:24:04 +0000 (13:24 +0000)]
Silence a GCC warning saying that unsigned >= UO_PostInc is always true.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112048
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 11:45:40 +0000 (11:45 +0000)]
GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 10:44:55 +0000 (10:44 +0000)]
Random space optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 10:34:54 +0000 (10:34 +0000)]
Recursive functions should be marked when used from another function. Fixes http://llvm.org/PR7923.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112045
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 10:28:54 +0000 (10:28 +0000)]
More incremental progress towards not including Expr.h in Sema.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 10:15:24 +0000 (10:15 +0000)]
Make sure volatile variables are emitted even if static. Fixes rdar://
8315219
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 25 Aug 2010 08:44:16 +0000 (08:44 +0000)]
Rename *PendingImplicitInstantiations to *PendingInstantiations. No
functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 08:40:02 +0000 (08:40 +0000)]
Split FunctionScopeInfo and BlockScopeInfo into their own header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 25 Aug 2010 08:27:02 +0000 (08:27 +0000)]
Support explicit instantiation of function templates and members of class
templates when only the declaration is in scope. This requires deferring the
instantiation to be lazy, and ensuring the definition is required for that
translation unit. We re-use the existing pending instantiation queue,
previously only used to track implicit instantiations which were required to be
lazy. Fixes PR7979.
A subsequent change will rename *PendingImplicitInstantiations to
*PendingInstatiations for clarity given its broader role.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112037
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 07:42:41 +0000 (07:42 +0000)]
Remove Sema.h's dependency on DeclCXX.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 07:03:20 +0000 (07:03 +0000)]
Remove the DenseSet dependency from Sema.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 06:19:51 +0000 (06:19 +0000)]
Teach Sema to live without CodeCompleteConsumer.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 05:56:39 +0000 (05:56 +0000)]
Remove AnalysisBasedWarnings.h's dependency on Type.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112027
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 05:32:35 +0000 (05:32 +0000)]
Move more stuff out of Sema.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 04:28:15 +0000 (04:28 +0000)]
Sort the forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Aug 2010 03:40:27 +0000 (03:40 +0000)]
tests: Disable this test for now, it is overly pessimistic and I am not sure how to fix it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112023
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 25 Aug 2010 03:32:38 +0000 (03:32 +0000)]
IRgen: Fix a horrible bug in pointer to bool conversion, which we were treating
as a truncation not a comparison to null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112021
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 02:50:31 +0000 (02:50 +0000)]
Expression statements undergo lvalue-to-rvalue conversion in C,
but not in C++, so don't emit aggregate loads of volatile references
in null context in C++. Happens to have been caught by an assertion.
We do not get the scalar case right. Volatiles are really broken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112019
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 25 Aug 2010 02:45:51 +0000 (02:45 +0000)]
Reformatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 25 Aug 2010 01:15:20 +0000 (01:15 +0000)]
Add back clang-wpa. It is useful for experimenting with inter-file analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 25 Aug 2010 01:08:01 +0000 (01:08 +0000)]
When performing completions involving Objective-C method declarations
(e.g., for message sends or method declaration/definition
completions), adjust methods that come from a base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 25 Aug 2010 01:03:37 +0000 (01:03 +0000)]
Reorganize and verbosely document some of ASTReader's fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 25 Aug 2010 01:03:30 +0000 (01:03 +0000)]
Remove an unused field in ASTReader
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 00:32:19 +0000 (00:32 +0000)]
Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112006
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 00:32:14 +0000 (00:32 +0000)]
Use a smart pointer instead of delete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 25 Aug 2010 00:32:08 +0000 (00:32 +0000)]
Make sure CXXABI is destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 25 Aug 2010 00:31:58 +0000 (00:31 +0000)]
No need to default synthesize property if implementation
has its own getter and setter methods declared.
Fixed
8349319 (nonfragile-abi2).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112003
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 25 Aug 2010 00:28:56 +0000 (00:28 +0000)]
Fix 'for' loop variables' scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Aug 2010 23:58:17 +0000 (23:58 +0000)]
Give a slight preference to functions returning "void" when we're
performing code completion at the statement level (rather than in an
arbitrary expression).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 24 Aug 2010 23:41:43 +0000 (23:41 +0000)]
Preserve invalidity of typeof operands in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Aug 2010 23:40:45 +0000 (23:40 +0000)]
In code-completion contexts where both types and other values are
present, prefer values to types, since it's more common to compute
with values than it is to declare new entities or perform type
casts. So, tweak the ranking of types vs. other declarations and
constants accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111998
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 24 Aug 2010 23:26:21 +0000 (23:26 +0000)]
Catch the case of trying to turn '&(X::a)' into a member pointer as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111997
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Aug 2010 23:13:41 +0000 (23:13 +0000)]
USRs for class extensions should "mangle" in the location of the extension. (<rdar://problem/
8350262 >)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111991
91177308 -0d34-0410-b5e6-
96231b3b80d8