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

31293 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 919814def9 Introduce a new predicate Decl::isFromASTFile() to determine whether a
declaration was deserialized from an AST file. Use this instead of
Decl::getPCHLevel() wherever possible. This is a simple step toward
killing off Decl::getPCHLevel().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139427 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 23:01:35 +00:00
Caitlin Sadowski d5b1605578 Thread safety: removing unnecessary import and reordering import list
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139426 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 23:00:59 +00:00
Caitlin Sadowski 0fed26d945 Thread safety: removing unnecessary import
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139425 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 22:49:12 +00:00
Julien Lerouge ef004ec5ad Remove trailing } in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 22:46:39 +00:00
Julien Lerouge 77f68bb90a Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 22:41:49 +00:00
Douglas Gregor 712f2fcb70 In the ASTReader, replace the never-NULL Preprocessor pointer with a
Preprocessor reference. Simplify some code along the way, so there is
no separate "initialize the preprocessor" step.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139418 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 22:02:16 +00:00
Kaelyn Uhrain fd641f943a Add smarter sorting of overload candidates that failed template deduction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139417 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:58:49 +00:00
Eric Christopher acae011241 Carry the debug information from single exit unified return block
along with the new insert point.

Fixes PR10829

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139416 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:53:04 +00:00
Douglas Gregor 3594277947 In ASTReader, replace the never-NULL ASTContext pointer with an
ASTContext reference. Remove all of the extra checking and logic that
was used to cope with a NULL ASTContext. No effective functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139413 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:34:22 +00:00
Douglas Gregor 6274d30d77 Friends cannot be declared module-private
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139411 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:14:29 +00:00
Douglas Gregor 5db255e02f Mark the translation unit as having lexical/visible storage only when we actually have data for that lexical or visible storage
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139409 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:09:37 +00:00
Douglas Gregor 5181ad023c Back out r139358 "[PCH] When loading the decls linked to an
identifier, also make them visible in the translation unit," which
isn't needed now that John's eliminated the AST dependency in blocks
CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139408 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:05:56 +00:00
Douglas Gregor d023aec890 Specializations cannot be module-hidden. Diagnose attempts to do so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139406 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 20:53:38 +00:00
John McCall 13db5cfc4e Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks.  Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 20:41:01 +00:00
Fariborz Jahanian 88914801a4 objc rewriter - Add rewriter test for new instancetype
along with minor rewriter fix to handle that. This
test is still incomplete due to rewriter issues
unrelated to instancetype.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139403 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 20:35:22 +00:00
Douglas Gregor 5c16d635ff Don't produce 'instancetype' as the type of a message send expression. Map it down to 'id'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139394 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 20:05:21 +00:00
Douglas Gregor e761230ae3 __module_private__ is inherited by redeclarations of an entity, and
must also be present of the first declaration of that entity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139384 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 19:05:14 +00:00
Anna Zaks 9134294114 [analyzer] When running scan-build with -plist on ./configure, delete the plist files.
(scan-build does not set the $HtmlDir when running against configure. Previously, this implied that the plist files would appear in the current directory, with this patch they will get deleted.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139382 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 18:43:53 +00:00
Douglas Gregor 6311d2bb3d Propagate __module_private__ from previous declarations to later
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139380 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 18:32:39 +00:00
Douglas Gregor bbcb7ea8a0 When type-checking a call to an overloaded, builtin atomic operation,
construct a new DeclRefExpr rather than re-using the existing
DeclRefExpr. Patch by Likai Liu, fixes PR8345.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139373 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 16:51:10 +00:00
Caitlin Sadowski 99107ebc0a Thread safety: This patch deals with previously unhandled cases when building lock expressions. We now resolve this expressions, avoid crashing when encountering cast expressions, and have a diagnostic for unresolved lock expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 16:21:55 +00:00
Caitlin Sadowski 402aa0698f Thread Safety: Moving the analysis to a new file
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139369 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 16:11:56 +00:00
Caitlin Sadowski a49d1d8a34 Thread safety: refactoring test cases
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139368 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 16:07:55 +00:00
Caitlin Sadowski 75f23aeb1c Thread safety: refactoring to use an error handler
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139367 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 16:04:02 +00:00
Francois Pichet 67bc6071d7 Update comment because JumpDiagnostics.cpp is not just about VLA scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139364 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 11:02:57 +00:00
John McCall 3323fad09e Clean up the sentinel-attribute checking code a lot. Document
what 'nullPos' is supposed to mean, at least at this one site.
Use closed forms for the arithmetic.  Rip out some clever but
ultimately pointless code that was trying to use 0 or 0L depending
the size of a pointer vs. the size of int;  first, it didn't work
on LLP64 systems, and second, the sentinel checking code requires
a pointer-typed value anyway, so this fixit would not have actually
removed the warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139361 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 07:56:05 +00:00
Argyrios Kyrtzidis ead363bdd2 Do a lookup for the blocks runtime globals to see if they were declared,
instead of codegen waiting to consume such a declaration, which won't
happen if that decls are coming from a PCH.

Fixes rdar://10028656.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139359 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 06:44:21 +00:00
Argyrios Kyrtzidis 84ef0b5f6b [PCH] When loading the decls linked to an identifier, also make them visible
in the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139358 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 06:44:17 +00:00
Argyrios Kyrtzidis 45df9c68b4 Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139357 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 06:44:14 +00:00
John McCall 7f3a6d37ba Code formatting; no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139355 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 06:12:06 +00:00
John McCall 0bcc9bc6cd Contextually converting to 'id' is not a useful operation. Contextually
converting to an arbitrary Objective-C pointer type is.  Without
significantly re-implementing anything, change the API to reflect this,
and as a minor optimization, strip the pointer conversion off before
potentially building it.

Mostly, this removes a really bizarre-looking bit of code from
BuildInstanceMessage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139354 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 06:11:02 +00:00
John McCall 1d9b3b25f7 Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers.  In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 05:25:32 +00:00
Richard Trieu 5e4c80b43f Clean up the RebuildUnknownAnyExpr visitor in SemaExpr.cpp. Mainly swapped around variable names so that this visitor be more like other visitors in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139351 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 03:59:41 +00:00
Richard Trieu 90ab75b5ad Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139350 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 03:18:59 +00:00
Richard Trieu b2fc69097d Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed typedef of AttrTy since it is not used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139349 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 02:16:15 +00:00
Douglas Gregor 8d267c57af Modules: introduce the __module_private__ declaration specifier, which
indicates that a declaration is only visible within the module it is
declared in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139348 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 02:06:17 +00:00
Richard Trieu f81e5a9e3f Change all references of type ExprTy to Expr and get rid of the typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139347 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 02:00:50 +00:00
Richard Trieu ccd891ae75 Capitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts between declarations and definitions from this and previous refactorings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139346 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 01:45:06 +00:00
Douglas Gregor 69ff26bd1e The integer type of an enumeration type isn't always canonical
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139334 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 23:29:05 +00:00
Eric Christopher 5330ee0717 Rearrange comment slightly for Bill.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139333 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 23:28:19 +00:00
Eric Christopher e02e5e2b05 Remove WCHAR_MIN and WCHAR_MAX from limits.h. According to posix and c99
these should be in stdint.h - and they already are.

Fixes rdar://10097036.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139332 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 23:25:25 +00:00
Caitlin Sadowski 179b920a8b Thread safety: small edit to unused variation on warning left in by accident from earlier commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139331 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 23:17:03 +00:00
Douglas Gregor e786247644 Add some delay between PCH creation and modifying one of the headers it depends on, which will---hopefully make this test predictably pass on Windows
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139327 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 22:32:33 +00:00
Matt Beaumont-Gay 634c8af080 Extend -Wliteral-conversion to catch "int i = -1.234"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139326 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 22:30:47 +00:00
Caitlin Sadowski 8bccabeac6 Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139321 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 21:52:50 +00:00
Jakob Stoklund Olesen 87198c304c The frexp, modf, and remquo builtins are not 'const'.
These functions return a second value by writing to a pointer argument,
so they cannot be marked 'readnone' which implies that they don't access
memory.

<rdar://problem/10070234>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 21:18:03 +00:00
Caitlin Sadowski af37061fea Thread Safety: adding basic no thread safety analysis option
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139310 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 18:35:21 +00:00
Caitlin Sadowski 978191e090 Thread safety: Adding basic support for locks required and excluded attributes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139308 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 18:27:31 +00:00
Caitlin Sadowski a53257c94a Thread safety: shared vs. exclusive locks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139307 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 18:19:38 +00:00
Caitlin Sadowski 3bb435809c Thread safety: small formatting change in test comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139306 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 18:07:26 +00:00