]>
granicus.if.org Git - clang/log
Fariborz Jahanian [Wed, 21 Jul 2010 18:31:47 +0000 (18:31 +0000)]
Fix source location of the initializer in
a copy initialization. Back out hack in objc rewriter.
fixes radar
8213998 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 21 Jul 2010 18:11:42 +0000 (18:11 +0000)]
Catch thinko that Daniel Dunbar found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109023
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 21 Jul 2010 18:08:50 +0000 (18:08 +0000)]
Fix regression caused by r108911.
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 21 Jul 2010 17:36:39 +0000 (17:36 +0000)]
Fix a rewriter bug which originates in SemaInit involving
Constructor Initialization which computes Source Location
differently now. Fixes radar
8213998 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109018
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Wed, 21 Jul 2010 15:28:28 +0000 (15:28 +0000)]
Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109012
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Wed, 21 Jul 2010 12:55:25 +0000 (12:55 +0000)]
Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109010
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 07:22:38 +0000 (07:22 +0000)]
Rename LazyCleanup -> Cleanup. No functionality change for these last three
commits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109000
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 07:11:21 +0000 (07:11 +0000)]
Rip out EHCleanupScope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108999
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 07:04:01 +0000 (07:04 +0000)]
Kill the CleanupBlock API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108998
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 06:59:36 +0000 (06:59 +0000)]
Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazy
cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108997
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 06:45:54 +0000 (06:45 +0000)]
Code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108996
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 06:44:28 +0000 (06:44 +0000)]
Switch the main possibly-conditional temporary cleanup over to being lazy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108995
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 06:29:51 +0000 (06:29 +0000)]
Switch the destructor for a temporary arising from a reference binding over to
using a lazy cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108994
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 06:20:50 +0000 (06:20 +0000)]
Switch the __cxa_guard_abort cleanup to being a lazy cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108993
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 06:13:08 +0000 (06:13 +0000)]
Switch some random local-decl cleanups over to using lazy cleanups. Turn on
the block-release unwind cleanup: we're never going to test it if we don't turn
it on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108992
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 05:47:49 +0000 (05:47 +0000)]
Switch finally cleanups over to being lazy cleanups. We get basically nothing
from the laziness features here except better block ordering, but it removes yet
another CleanupBlock use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108990
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 05:30:47 +0000 (05:30 +0000)]
Implement proper base/member destructor EH chaining.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 21 Jul 2010 05:21:41 +0000 (05:21 +0000)]
Move some methods inline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 21 Jul 2010 02:02:56 +0000 (02:02 +0000)]
Fix win64 compilation of constants like 0xFFFFFFFFFFFFFFFFULL
intmax_t is __int64 (long long to clang), per VS 2010 stdint.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108980
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 01:41:18 +0000 (01:41 +0000)]
Change PushDestructorCleanup to use lazy cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108979
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 01:23:41 +0000 (01:23 +0000)]
Convert the EH cleanups for base and member destructors in a constructor into
lazy cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108978
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 21 Jul 2010 01:10:17 +0000 (01:10 +0000)]
Implement zero-initialization for array new when there is an
initializer of (). Make sure to use a simple memset() when we can, or
fall back to generating a loop when a simple memset will not
suffice. Fixes <rdar://problem/
8212208 >, a regression due to my work
in r107857.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108977
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 00:52:03 +0000 (00:52 +0000)]
Convert the end-catch call for finally blocks to a lazy cleanup. This kills off
the last of the shared-code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 21 Jul 2010 00:46:22 +0000 (00:46 +0000)]
Allow loading identifiers from any file in the chain. WIP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108974
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 00:41:47 +0000 (00:41 +0000)]
Convert the ObjC @synchronized cleanups to laziness. This is not actually
a big deal, except that I want to eliminate the shared-code EH cleanups
in preparation for a significant algorithmic fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108973
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 21 Jul 2010 00:40:03 +0000 (00:40 +0000)]
Add a little helper method which will be useful soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108972
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 20 Jul 2010 22:55:31 +0000 (22:55 +0000)]
Apparently not every system thinks that references in pairs are as cool as I think.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 20 Jul 2010 22:46:15 +0000 (22:46 +0000)]
Allow loading declarations from any file in the chain. WIP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 20 Jul 2010 22:37:49 +0000 (22:37 +0000)]
Allow loading types from any file in the chain. WIP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 20 Jul 2010 22:32:37 +0000 (22:32 +0000)]
Remove unintended code that was checked in as part of r108916.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 20 Jul 2010 22:20:10 +0000 (22:20 +0000)]
Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108946
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 20 Jul 2010 22:17:55 +0000 (22:17 +0000)]
Fix the IR generation for catching pointers by references.
Fixes <rdar://problem/
8212123 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108944
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 21:55:52 +0000 (21:55 +0000)]
in 'new int[4]', constant fold the 4*4=16 instead of
doing an overflow check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 20 Jul 2010 21:50:20 +0000 (21:50 +0000)]
Allow loading source locations from any file in the chain. WIP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 21:34:36 +0000 (21:34 +0000)]
don't demand names to be on IR.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 21:32:10 +0000 (21:32 +0000)]
temporarily disable this to fix the build bot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108936
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 20 Jul 2010 21:20:32 +0000 (21:20 +0000)]
More work on getting PCHReader to handle multiple files. Promote SLocOffsets to per-file data. WIP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 21:07:09 +0000 (21:07 +0000)]
Follow the implementation approach suggested by PR6687,
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:
__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108927
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Jul 2010 20:30:03 +0000 (20:30 +0000)]
Adopt objc_assign_threadlocal() for __thread variables of GC types.
Implements radar
8203301 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108917
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 20 Jul 2010 20:24:18 +0000 (20:24 +0000)]
Print template argument names for template class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 20:19:24 +0000 (20:19 +0000)]
implement rdar://
5739832 - operator new should check for overflow in multiply,
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:
void *test(long N) {
return new int[N];
}
int main() {
test(1L << 62);
}
We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.
This is heavily based on a patch that Fariborz wrote.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 20 Jul 2010 20:18:03 +0000 (20:18 +0000)]
Introduce a new lexer function to compute the "preamble" of a file,
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 Jul 2010 20:13:52 +0000 (20:13 +0000)]
Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:47 +0000 (20:04 +0000)]
Hookup checking for invalid length modifiers in scanf format strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:42 +0000 (20:04 +0000)]
Move 'hasValidLengthModifier' from PrintfFormatSpecifier to FormatSpecifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:36 +0000 (20:04 +0000)]
Cleanup whitespace in switch statement. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:32 +0000 (20:04 +0000)]
Refactor ScanfConversionSpecifier to subclass ConversionSpecifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:27 +0000 (20:04 +0000)]
Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and
derived 'PrintfConversionSpecifier' from this class. We will do the same for
'ScanfConversionSpecifier'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:20 +0000 (20:04 +0000)]
Tidy up analyze_printf::ConversionSpecifier::Kind declaration, prepping it to be merged
with analyze_scanf::ConversionSpecifier::Kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:15 +0000 (20:04 +0000)]
Rename 'UnicodeStrArg' to 'SArg'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108901
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:10 +0000 (20:04 +0000)]
Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and printf checking).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:04:04 +0000 (20:04 +0000)]
Rename 'VoidPtrArg' to 'pArg' in printf/scanf checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108899
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:03:58 +0000 (20:03 +0000)]
Rename 'CStrArg' to 'sArg' for printf checking to match with the analagous enum for scanf checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108898
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:03:49 +0000 (20:03 +0000)]
Rename analyze_printf::ConversionSpecifier::IntAsCharArg to 'cArg' to match
analagous enum in analyze_scanf. This is prep for refactoring the logic for handling
ConversionSpecifiers for both scanf and printf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 20 Jul 2010 20:03:43 +0000 (20:03 +0000)]
Rename diagnostic so that it can be reused with scanf checking. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 18:49:33 +0000 (18:49 +0000)]
delete a loop that just generates dead code. In an example
like this:
void *test(long N) {
return new int[N][42][42];
}
the loop generates two dead mul instructions:
%tmp = load i64* %N.addr ; <i64> [#uses=2]
%0 = mul i64 %tmp, 7056 ; <i64> [#uses=1]
%1 = mul i64 %tmp, 42 ; <i64> [#uses=1]
%2 = mul i64 %1, 42 ; <i64> [#uses=0]
%call = call noalias i8* @_Znam(i64 %0) ; <i8*> [#uses=1]
The scale of these multiplies is already handled by the typesize stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 Jul 2010 18:45:57 +0000 (18:45 +0000)]
remove the special case for constant array sizes from
EmitCXXNewAllocSize. This code uses IRBuilder, which does
constant folding already.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 20 Jul 2010 16:20:26 +0000 (16:20 +0000)]
Re-apply fixed version of 108749, correctly conditionalizing the new sections on
ObjC ABI version 2 this time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 20 Jul 2010 14:34:35 +0000 (14:34 +0000)]
Slip up long string literal
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108838
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 20 Jul 2010 14:33:20 +0000 (14:33 +0000)]
Complain when string literals are too long for the active language
standard's minimum requirements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 20 Jul 2010 13:59:58 +0000 (13:59 +0000)]
Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce
FunctionTemplateDecl::findSpecialization.
Redeclarations of specializations will not cause the previous decl to be removed from the set,
the set will keep the canonical decl. findSpecialization will return the most recent redeclaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 20 Jul 2010 13:59:40 +0000 (13:59 +0000)]
Whether the specialization should be added to template's folding set when read from PCH,
is determined by a isCanonicalDecl check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 20 Jul 2010 13:59:28 +0000 (13:59 +0000)]
Hide the specializations folding sets of ClassTemplateDecl as an implementation detail (InsertPos
leaks though) and add methods to its interface for adding/finding specializations.
Simplifies its users a bit and we no longer need to replace specializations in the folding set with
their redeclarations. We just return the most recent redeclarations.
As a bonus, it fixes http://llvm.org/PR7670.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 20 Jul 2010 12:59:03 +0000 (12:59 +0000)]
Add -lstdc++ to DragonFly tools.
Patch by Sascha Wildner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 06:22:24 +0000 (06:22 +0000)]
Constify all references to Stmt* and CFGBlock* in libChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108811
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 06:15:27 +0000 (06:15 +0000)]
Add const iterator to InitListExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108810
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 20 Jul 2010 04:20:21 +0000 (04:20 +0000)]
Update ImplicitCastExpr to be able to represent an XValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 20 Jul 2010 04:06:54 +0000 (04:06 +0000)]
Fix test for Win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 02:56:49 +0000 (02:56 +0000)]
Constify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 02:53:15 +0000 (02:53 +0000)]
remove const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 20 Jul 2010 02:47:40 +0000 (02:47 +0000)]
Driver: Switch to using a SmallVector instead of std::vector, and stop
accessing outside the range of the vector (which always asserts on Win32).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 02:46:11 +0000 (02:46 +0000)]
constify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 02:41:28 +0000 (02:41 +0000)]
Constify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 20 Jul 2010 02:14:22 +0000 (02:14 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Mon, 19 Jul 2010 23:56:31 +0000 (23:56 +0000)]
Correct line info for declarations/definitions. Radar
8063111 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Jul 2010 22:53:57 +0000 (22:53 +0000)]
and revert the related tests, too
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Jul 2010 22:43:34 +0000 (22:43 +0000)]
Temporarily revert. Some odd internal breakage is likely related.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108764
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 19 Jul 2010 22:38:35 +0000 (22:38 +0000)]
Remove PCHReader::getStream(), it was unused. Inline PCHReader::getDelsCursor() into its sole caller and remove it. This reduces the attack surface of multiple PCH files towards code outside the PCH implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 19 Jul 2010 22:28:42 +0000 (22:28 +0000)]
Promote IdentifierOffsets to per-file data.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 19 Jul 2010 22:06:55 +0000 (22:06 +0000)]
Promote DeclOffsets and TypeOffsets to per-file data.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108760
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 19 Jul 2010 22:02:22 +0000 (22:02 +0000)]
Patch to type match comparing Objective-C Classes which implement
protocols (Radar
8191774 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 19 Jul 2010 22:01:06 +0000 (22:01 +0000)]
Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since
these don't actually consume an argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108757
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 19 Jul 2010 21:46:24 +0000 (21:46 +0000)]
Introduce a new libclang API, clang_reparseTranslationUnit(), which
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Jul 2010 21:39:14 +0000 (21:39 +0000)]
Update tests for r108749
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108754
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 19 Jul 2010 21:25:57 +0000 (21:25 +0000)]
Hook up 'invalid conversion' warning for scanf format strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Jul 2010 20:54:43 +0000 (20:54 +0000)]
Put ObjC method names, method types and class names in separate string literal
sections. rdar://
8207705
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 19 Jul 2010 20:52:06 +0000 (20:52 +0000)]
Promote the identifier table to per-file data. Also, if a CHAINED_METADATA record exists, it has to be the first thing in the PCH file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108748
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 19 Jul 2010 20:20:06 +0000 (20:20 +0000)]
Put warnings in the 'Deprecated' group into a 'Deprecations' DiagCategory. Fixes <rdar://problem/
8203182 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 19 Jul 2010 19:47:40 +0000 (19:47 +0000)]
Add missing conversion specifier parsing for 'u', 'x', 'o', and 's'. Fixes <rdar://problem/
8204052 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108742
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 19 Jul 2010 19:44:22 +0000 (19:44 +0000)]
Driver: Make -fnext-runtime the default when rewriting Objective-C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108741
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 19 Jul 2010 17:11:38 +0000 (17:11 +0000)]
IRgen: Add a test case I forgot to commit at some point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 19 Jul 2010 17:11:36 +0000 (17:11 +0000)]
Driver/Darwin: Add deployment target after doing argument translation, so that
-mmacosx-version-min works inside a -Xarch_ flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 19 Jul 2010 17:11:33 +0000 (17:11 +0000)]
Driver: Factor out Darwin::AddDeploymentTarget.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 19 Jul 2010 16:18:30 +0000 (16:18 +0000)]
Remove unused location-to-AST-node resolver. libclang's implementation supercedes it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 19 Jul 2010 16:14:33 +0000 (16:14 +0000)]
Categories cannot synthesize property ivars,
and a minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 19 Jul 2010 15:20:12 +0000 (15:20 +0000)]
Implement support for reading arguments specified in a file with @file. If
there is no file named "file", keep the @file option unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 19 Jul 2010 13:16:50 +0000 (13:16 +0000)]
Fix construction of AnalysisContext. Thanks Daniel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 19 Jul 2010 11:48:10 +0000 (11:48 +0000)]
Adjust test for float printing differences. Windows uses three digits for the exponent, everyone else two.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108693
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 19 Jul 2010 10:14:41 +0000 (10:14 +0000)]
Fix http://llvm.org/PR7660
A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext,
in which case isStaticDataMember() will erroneously return true.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 19 Jul 2010 07:21:12 +0000 (07:21 +0000)]
Revert r108672, "Implement support for reading arguments specified in a file
with @file.", it doesn't correctly handle cases where arguments starting with
'@' are passed to other command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108686
91177308 -0d34-0410-b5e6-
96231b3b80d8