Граф коммитов

30100 Коммитов

Автор SHA1 Сообщение Дата
Evan Cheng 2860e30d83 Match createTargetMachine API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135469 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 06:37:41 +00:00
Devang Patel cb2a07e337 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135456 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 00:52:18 +00:00
Sean Hunt 2f5127e6e0 Implement a __WCHAR_UNSIGNED__ macro and use it to include WCHAR_MIN and
WCHAR_MAX in limits.h, thus solving the problem where the system header
thinks it knows better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135455 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 00:50:57 +00:00
Eric Christopher b5fd253af3 Add .gitignore file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135440 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 23:05:36 +00:00
Devang Patel 478b94b945 Check column number also.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135437 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 22:18:04 +00:00
Evan Cheng 884744b65e MCContext now takes MCRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135425 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 20:57:51 +00:00
Sean Hunt 1fba8281b9 Thanks to Chandler for reminding me to update the documentation for the
__underlying_type feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135402 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 17:22:33 +00:00
Sean Hunt 858a325e5f Remember to add a has_feature macro for __underlying_type now that it is
correctly impelmented

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135401 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 17:08:00 +00:00
Jeffrey Yasskin 5b106a872d Define DiagnosticBuilder<<APValue so it's easy to include APValues in
diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135398 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 16:43:53 +00:00
Frits van Bommel e9c0265d6e Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 12:00:32 +00:00
NAKAMURA Takumi 2ac5321014 lib/Headers/mm_malloc.h: Use __mingw_aligned_malloc() in _mm_malloc() on mingw.
By default, mingw does not have _mm_alloc() nor _aligned_malloc().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135388 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 11:13:50 +00:00
Argyrios Kyrtzidis 05fdf9bc3f [arcmt] When a NSData's 'bytes' family of methods are used on a local var,
add __attribute__((objc_precise_lifetime)) to make sure that the object
(and its data) will not get released before the var goes out-of-scope.

rdar://9206226

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135382 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 07:44:50 +00:00
Argyrios Kyrtzidis fd10398c10 [arcmt] NSInvocation's [get/set]ReturnValue and [get/set]Argument are only safe
with __unsafe_unretained parameters. Emit error for strong/weak ones. rdar://9206226

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135381 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 07:44:45 +00:00
Nick Lewycky f57ef0516c Don't crash when codegen'ing an empty redecl of a function in C99 mode, when
neither was inline. Fixes bug introduced in r135377.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135380 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 07:11:55 +00:00
Nick Lewycky dce67a70a8 In C99, emit an inline function when encountering an extern redeclaration.
Fixes PR10233!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135377 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 05:26:13 +00:00
Chris Lattner 2acc6e3fed de-constify llvm::Type, patch by David Blaikie!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 04:24:23 +00:00
Chris Lattner b5f65475d2 Use the new llvm::TinyPtrVector class, which implements exactly what
ShadowMapEntry was.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135368 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 01:54:02 +00:00
Chandler Carruth 8435069798 Revert r135217, which wasn't the correct fix for PR10358. With this
patch, we actually move the state-machine for the value set backwards
one step. This can pretty easily lead to infinite loops where we
continually try to propagate a bit, succeed for one iteration, but then
back up because we find an uninitialized use.

A reduced test case from PR10379 is included.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135359 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 22:27:02 +00:00
Francois Pichet a6c2b3a648 Do not modify string returned by getenv on Windows.
Fixes PR9875, patch by Nikola Smiljanic!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135356 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 21:17:14 +00:00
Benjamin Kramer 12efd57ee4 Zero this struct in a way that neither depends on the size of the struct nor triggers warnings from GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135351 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 20:13:06 +00:00
Ted Kremenek 797a7be0de [analyzer] Per discussions with the Cocoa team, extend CF naming conventions to extend to camel case functions instead of just title case functions. Fixes <rdar://problem/9732321>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135350 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 19:50:36 +00:00
Ted Kremenek 0556048ae8 [analyzer] Place checking for Core Foundation "Create" rule into a proper API. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135349 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 19:50:32 +00:00
Fariborz Jahanian 57080fbac1 Remove a gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135348 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 18:31:33 +00:00
Joerg Sonnenberger 59c8457f01 Correctly handle sysroot prefix in -print-search-dirs. Makes libtool
more happy on NetBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135344 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 10:50:05 +00:00
Fariborz Jahanian 1e159bc43c Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135328 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-16 00:08:33 +00:00
Argyrios Kyrtzidis 82a921a1a4 [arcmt] It's not safe to remove the -release on "[[someivar delegate] release];" since it's very likely
that, after migration, the object that was passed to 'setDelegate:' will not be properly retained, e.g:

-whatever {
  id x = [[MyDoHicky alloc] init];
  [someivar setDelegate: x]; // x won't get retained in ARC.
}
-dealloc {
  [[someivar delegate] release]; // give migration error here.
}

rdar://8858009

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135327 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 23:48:56 +00:00
Tanya Lattner 61b4bc80e9 This handles the missing cases of opencl vector literals.
Test cases provided by Anton Lokhmot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135322 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 23:07:01 +00:00
Jordy Rose deefaf6eac Update retain-release.m to match updated warnings from r135310
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135317 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 22:38:26 +00:00
Argyrios Kyrtzidis debb00f9ce [libclang] Map canonical decl of a category implementation to the category decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135316 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 22:37:58 +00:00
Argyrios Kyrtzidis e2f854ddd3 Revert r135304 and apply fix in clang_getCanonicalCursor per Doug's, Fariborz's comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135314 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 22:27:18 +00:00
Jordy Rose 5b5402bbda Add tests for CFRefReport's path notes, and fix a few typos and non-standard terminology ('+0 retain counts') caught by the tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135310 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 22:17:54 +00:00
Argyrios Kyrtzidis 1aa60ff0ad [arcmt] Rewrite to "foo = nil;" not "foo = 0;", as suggested by Jordy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135309 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 22:04:00 +00:00
Chad Rosier 3e4d10917a Prevent the -save-temps flag from modifying the input file if the input filename
conflicts with a to be produced temp filename.
rdar://9724657

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135308 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 21:54:29 +00:00
Douglas Gregor ba6ffaf21e Augment the interface of ExternalASTSource::FindExternalLexicalDecls()
to allow clients to specify that they've already (correctly) loaded
declarations, and that no further action is needed. 

Also, make sure that we clear the "has external lexical declarations"
bit before calling FindExternalLexicalDecls(), to avoid infinite
recursion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135306 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 21:46:17 +00:00
Argyrios Kyrtzidis cea2e3d7ea The canonical decl for an ObjCImplDecl is it's interface class. Fixes rdar://8728637.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135304 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 21:39:32 +00:00
Argyrios Kyrtzidis f55a869ba4 [arcmt] For:
id x = ...
@try {
 ...
} @finally {
 [x release];
}

Migrator will drop the release. It's better to change it to "x = 0" in a @finally to avoid leak when exception is thrown.

rdar://9398256

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135301 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 21:11:23 +00:00
Douglas Gregor fc71ac810f Don't refer to check.deps unless LLVM_INCLUDE_TESTS is enabled
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135300 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 21:03:20 +00:00
Jordy Rose 8f08426e6f [analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 20:29:02 +00:00
Joerg Sonnenberger e9b5d77b7b Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135285 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 18:23:44 +00:00
Jeffrey Yasskin 3e1ef78498 Use the new APFloat::convertToInt(APSInt) function to simplify uses of
convertToInt(integerParts*) and make them more reliable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135279 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 17:03:07 +00:00
Douglas Gregor 5b8968cc59 Store bracket locations for array subscript expressions, from Erik Verbruggen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135275 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 16:25:15 +00:00
Douglas Gregor 91ae6b43b3 When creating a property in a class extension, make sure to check its
attributes. Fixes <rdar://problem/9561076>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135273 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 15:30:21 +00:00
Jay Foad 4c7d9f1507 Convert CallInst and InvokeInst APIs to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 08:37:34 +00:00
John McCall 4e9272de54 Restore the C-style cast hack for enum template arguments,
which is required given the current setup for template
argument deduction substitution validation, and add a test
case to make sure we don't break it in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135262 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 07:47:58 +00:00
Chandler Carruth f70d12dbd4 Move the Serialization library from 'instantiation' to 'expansion', with
the exception of its uses of SourceManager and SourceLocation APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135260 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 07:25:21 +00:00
John McCall 7110fd6c32 Add serialization support for SubstNonTypeTemplateParmExpr.
Also add the missing serialization support for SEHTryStmt,
SEHFinallyStmt, and SEHExceptStmt, and fix and finish the
serialization support for AsTypeExpr.  In addition, change
the code so that it will no longer link if a Stmt subclass
is missing serialization support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135258 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 07:00:14 +00:00
John McCall 379010addb Fix the definition of AsTypeExpr. I'm still not sure this
is right --- shouldn't there be a TypeLoc in here somewhere? ---
but at least it doesn't have a redundant QualType and a broken
children() method.

Noticed this while doing things in serialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135257 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 06:56:33 +00:00
Chris Lattner d26c071427 protect some calls to ConvertType when a function info is under construction
to prevent recursive compilation problems.  This fixes a failure of CodeGen/decl.c
on x86-32 targets that don't fill in the coerce-to type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135256 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 06:41:05 +00:00
Jordy Rose af5b043fe7 Clean up UnixAPIChecker, including switching its array of BugTypes to llvm::OwningPtr<BugType> vars (the new convention). No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135255 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 06:28:59 +00:00
Jordy Rose 57964bda54 Clean up MacOSXAPIChecker, including switching its array of BugTypes to a single llvm::OwningPtr<BugType> (the new convention). No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135250 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 06:02:19 +00:00