John McCall
b923ece770
Privatize the setter/getter call generation methods, plus some minor
...
modernization. No functionality change.
llvm-svn: 139555
2011-09-12 23:06:44 +00:00
Chad Rosier
c0f3e383c9
[driver] Ignore the '--' option, rather then fail. Do so to match gcc's
...
behavior.
rdar://10110352 and PR10908
llvm-svn: 139551
2011-09-12 22:43:01 +00:00
Anna Zaks
ea8f5725c5
[analyzer] CmpRuns can now optionally delete empty reports.
...
llvm-svn: 139550
2011-09-12 22:40:36 +00:00
Caitlin Sadowski
eecd273951
Thread safety: small formatting change
...
llvm-svn: 139548
2011-09-12 22:28:41 +00:00
Argyrios Kyrtzidis
01e3c590ae
[libclang] For getDeclFromExpr in CIndex.cpp, associate the decl of
...
a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast,
since the implicit cast is the one that is invisible in source code.
llvm-svn: 139547
2011-09-12 22:17:26 +00:00
Anna Zaks
b80d836137
[analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other modules.
...
llvm-svn: 139543
2011-09-12 21:32:41 +00:00
Anna Zaks
03f3598ff1
Rename CmpRuns into CmpRuns.py so that it could be used as a module.
...
llvm-svn: 139540
2011-09-12 21:07:18 +00:00
Douglas Gregor
1e44e02292
Introduce a cc1-level option to provide the path to the module cache,
...
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.
llvm-svn: 139538
2011-09-12 20:41:59 +00:00
Douglas Gregor
7bfedd69c5
Kill off an irrelevant FIXME
...
llvm-svn: 139523
2011-09-12 18:58:37 +00:00
Devang Patel
b0fa5b57ac
By popular demand, enumerate all builtin types!
...
llvm-svn: 139521
2011-09-12 18:50:21 +00:00
Richard Trieu
b420bcaeb0
Refactor CheckAdditionOperands() to use early return for pointer addition.
...
llvm-svn: 139520
2011-09-12 18:37:54 +00:00
Douglas Gregor
41866816ce
Diagnose attempt to mark function-local declarations as __module_private__.
...
llvm-svn: 139519
2011-09-12 18:37:38 +00:00
Anna Zaks
05dda473e6
[analyzer] Simplify the test, use generic/more descriptive names.
...
llvm-svn: 139516
2011-09-12 18:28:35 +00:00
Devang Patel
33e097b699
Add an assert so that new builtins do not sneak without proper debug info.
...
llvm-svn: 139514
2011-09-12 18:24:46 +00:00
Devang Patel
ba15240e83
Update test to fix windows buildbot.
...
llvm-svn: 139513
2011-09-12 18:11:52 +00:00
Argyrios Kyrtzidis
14c32e8894
[libclang] In ASTUnit::Parse copy the CompilerInvocation object instead of
...
modifying directly for the preamble.
This avoids an awful, hard to find, bug where "PreprocessorOpts.DisablePCHValidation = true"
would be persistent for subsequent reparses of the translation unit which would result
in defines, present in command-line but not in the PCH, being ignored.
Fixes rdar://9615399.
llvm-svn: 139512
2011-09-12 18:09:38 +00:00
Argyrios Kyrtzidis
3405baa3f0
[libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment variable,
...
which when set it determines the trial number after which the remapping of files should
take effect.
llvm-svn: 139511
2011-09-12 18:09:31 +00:00
Richard Trieu
993f3ab07b
Fix two comments from warn to emit error to match the actual diagnostic used.
...
llvm-svn: 139510
2011-09-12 18:08:02 +00:00
Anna Zaks
79301b16f3
[analyzer] Fix a failure encountered while analyzing bind (radar://10105448).
...
llvm-svn: 139509
2011-09-12 18:07:30 +00:00
Anna Zaks
6e05e32e12
Doxygen comments.
...
llvm-svn: 139508
2011-09-12 17:57:20 +00:00
Anna Zaks
295208d744
[analyzer] Fix a new failure encountered while building Adium exposed as a result of r138196(radar://10087620). ObjectiveC property of type int has a value of type ObjCPropRef, which is a Loc.
...
llvm-svn: 139507
2011-09-12 17:56:08 +00:00
Anna Zaks
964c186ffe
[analyzer] Test for -analyze-function on ObjectiveC to accompany r139439.
...
llvm-svn: 139506
2011-09-12 17:48:08 +00:00
Devang Patel
98ca8aeca6
Fix debug info encodings for char16_t and char32_t.
...
llvm-svn: 139502
2011-09-12 17:11:58 +00:00
Douglas Gregor
3baa6702ab
Allow __module_private__ on fields
...
llvm-svn: 139499
2011-09-12 16:11:24 +00:00
Douglas Gregor
fc33bcfc4a
Remove the restriction on module-private friends. Since the friend
...
declaration may be the first declaration, we want the ability to that
declaration to be marked module-private.
llvm-svn: 139497
2011-09-12 15:48:15 +00:00
Douglas Gregor
b63ab9477c
Only predefine the __EXCEPTIONS macro if C++ exceptions are turned on.
...
Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C
exceptions are turned on. Fixes PR10910.
llvm-svn: 139496
2011-09-12 15:17:19 +00:00
Hans Wennborg
be207b3c74
Silence ?: precendence warning when parenthesis are present.
...
Fixes PR10898. The warning should be silent when there are parenthesis
around the condition expression.
llvm-svn: 139492
2011-09-12 12:07:30 +00:00
Benjamin Kramer
8a8051f2cd
Silence "end of non-void function" warnings with llvm_unreachable and add an assert.
...
llvm-svn: 139474
2011-09-10 21:52:04 +00:00
Fariborz Jahanian
9f0bc5757c
objc rewriter - more fixes to support compiling the rewritten
...
test case having instancetype. Fix in rewriter is unrelated to
using of instancetype. Test case uses other feature not yet
supported in the rewriter. There is more work to do, but this
is an ongoing task and not urgent at this time.
llvm-svn: 139473
2011-09-10 17:01:56 +00:00
Chris Lattner
d2cd41c5bf
remove pedantic ;
...
llvm-svn: 139472
2011-09-10 16:13:42 +00:00
John McCall
6acaef9fe8
Modernize and comment; no functionality change.
...
llvm-svn: 139470
2011-09-10 09:30:49 +00:00
John McCall
7f16c42b9e
Simplify the generation of Objective-C setters, at least a little.
...
Use a more portable heuristic for deciding when to emit a single
atomic store; it's possible that I've lost information here, but
I'm not sure how much of the logic before was intentionally arch-specific
and how much was just not quite consistent.
llvm-svn: 139468
2011-09-10 09:17:20 +00:00
John McCall
2d637d2e79
Rename the ARC cast kinds to start with "ARC".
...
llvm-svn: 139466
2011-09-10 06:18:15 +00:00
David Blaikie
f1e2924b6b
Correctly referring to the null pointer as 'null' not the macro 'NULL' in the boolean conversion diagnostic message.
...
llvm-svn: 139465
2011-09-10 05:47:59 +00:00
Julien Lerouge
d25ed06c63
Make this test portable on Win32.
...
llvm-svn: 139464
2011-09-10 05:46:15 +00:00
David Blaikie
e5f9a9e603
Show either a location or a fixit note, not both, for uninitialized variable warnings.
...
llvm-svn: 139463
2011-09-10 05:35:08 +00:00
John McCall
5dc5c1ea47
Missed a %local use; hopefully this clears this test up.
...
llvm-svn: 139462
2011-09-10 05:31:57 +00:00
Richard Trieu
7fde916498
Fix a broken assert in AST/DeclCXX.cpp.
...
llvm-svn: 139461
2011-09-10 02:16:48 +00:00
Eli Friedman
5c917278fd
clang part of r139458; un-XFAIL testcase.
...
llvm-svn: 139460
2011-09-10 02:03:28 +00:00
Richard Trieu
c41773ab6a
Revision 139454 fixed a broken assert in LLVM, which causes
...
a test failure in CodeGen/palignr.c, which has been marked
XFAIL for the time being. A bug has been filed at PR10901
for this issue.
llvm-svn: 139457
2011-09-10 01:56:32 +00:00
John McCall
e5e7e6bc84
Make this test not depend on unnecessary details and IR variable names.
...
llvm-svn: 139455
2011-09-10 01:37:23 +00:00
John McCall
cd78e805e9
When converting a block pointer to an Objective-C pointer type, extend
...
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.
There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.
llvm-svn: 139451
2011-09-10 01:16:55 +00:00
Douglas Gregor
97e3590a6e
Fix a diagnostics crasher with -Wmissing-noreturn in Objective-C
...
methods, and improve the diagnostic slightly along the way. Fixes
<rdar://problem/10098695>.
llvm-svn: 139446
2011-09-10 00:56:20 +00:00
Chandler Carruth
73fddfe1b0
Fix a -Wreturn-type warning due to this field not explicitly having the
...
enumeration type.
llvm-svn: 139445
2011-09-10 00:51:24 +00:00
Devang Patel
964d758d17
Emit debug info for wchar_t.
...
llvm-svn: 139443
2011-09-10 00:44:49 +00:00
Douglas Gregor
abc5fbe9d6
Don't crash when we fail to load a module. It's unbecoming of a
...
well-bred compiler like Clang.
llvm-svn: 139442
2011-09-10 00:30:18 +00:00
Douglas Gregor
87d8124b0e
Clean up our handling of Objective-C definitions in AST files. Rather
...
than having CodeGen check whether a declaration comes from an AST file
(which it shouldn't know or care about), make sure that the AST writer and
reader pass along "interesting" declarations that CodeGen needs to
know about.
llvm-svn: 139441
2011-09-10 00:22:34 +00:00
Anna Zaks
dfbea6b244
[analyzer] -analyze-function for ObjectiveC should check if any of the methods match the name (not only the first one).
...
llvm-svn: 139439
2011-09-10 00:12:23 +00:00
Douglas Gregor
98c05b286c
Kill of the Decl::PCHLevel field entirely. We now only need to know
...
whether a Decl was deserialized from an AST file (any AST file).
llvm-svn: 139438
2011-09-10 00:09:20 +00:00
Chandler Carruth
a626d645d5
Extend the Stmt AST to make it easier to look through label, default,
...
and case statements. Use this to make the logic in the CFG builder more
robust at finding the actual statements within a compound statement,
even when there are many layers of labels obscuring it.
Also extend the test cases for a large chunk of PR10063. Still more work
to do here though.
llvm-svn: 139437
2011-09-10 00:02:34 +00:00
Douglas Gregor
1bbf030b8e
The translation unit is never deserialized
...
llvm-svn: 139436
2011-09-09 23:34:14 +00:00
Douglas Gregor
dd57400c06
Eliminate all but one caller of Decl::getPCHLevel()
...
llvm-svn: 139430
2011-09-09 23:07:59 +00:00
Douglas Gregor
b3722e2223
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().
llvm-svn: 139427
2011-09-09 23:01:35 +00:00
Caitlin Sadowski
82e2de512e
Thread safety: removing unnecessary import and reordering import list
...
llvm-svn: 139426
2011-09-09 23:00:59 +00:00
Caitlin Sadowski
0bef2279fb
Thread safety: removing unnecessary import
...
llvm-svn: 139425
2011-09-09 22:49:12 +00:00
Julien Lerouge
e0d5fad37b
Remove trailing } in comment.
...
llvm-svn: 139424
2011-09-09 22:46:39 +00:00
Julien Lerouge
5a6b6987dc
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.
llvm-svn: 139423
2011-09-09 22:41:49 +00:00
Douglas Gregor
51825b49f3
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.
llvm-svn: 139418
2011-09-09 22:02:16 +00:00
Kaelyn Uhrain
45e9370a24
Add smarter sorting of overload candidates that failed template deduction.
...
llvm-svn: 139417
2011-09-09 21:58:49 +00:00
Eric Christopher
65c5c9132f
Carry the debug information from single exit unified return block
...
along with the new insert point.
Fixes PR10829
llvm-svn: 139416
2011-09-09 21:53:04 +00:00
Douglas Gregor
4163aca7db
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.
llvm-svn: 139413
2011-09-09 21:34:22 +00:00
Douglas Gregor
6422642a1d
Friends cannot be declared module-private
...
llvm-svn: 139411
2011-09-09 21:14:29 +00:00
Douglas Gregor
32ed0d204d
Mark the translation unit as having lexical/visible storage only when we actually have data for that lexical or visible storage
...
llvm-svn: 139409
2011-09-09 21:09:37 +00:00
Douglas Gregor
faf2adb6e4
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.
llvm-svn: 139408
2011-09-09 21:05:56 +00:00
Douglas Gregor
3c7cd6a0c4
Specializations cannot be module-hidden. Diagnose attempts to do so.
...
llvm-svn: 139406
2011-09-09 20:53:38 +00:00
John McCall
7959fee258
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.
llvm-svn: 139404
2011-09-09 20:41:01 +00:00
Fariborz Jahanian
e1378a4313
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.
llvm-svn: 139403
2011-09-09 20:35:22 +00:00
Douglas Gregor
64910ca9d5
Don't produce 'instancetype' as the type of a message send expression. Map it down to 'id'.
...
llvm-svn: 139394
2011-09-09 20:05:21 +00:00
Douglas Gregor
2820e6923a
__module_private__ is inherited by redeclarations of an entity, and
...
must also be present of the first declaration of that entity.
llvm-svn: 139384
2011-09-09 19:05:14 +00:00
Anna Zaks
45ce1bf091
[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.)
llvm-svn: 139382
2011-09-09 18:43:53 +00:00
Douglas Gregor
ef15bdbe1a
Propagate __module_private__ from previous declarations to later
...
declarations.
llvm-svn: 139380
2011-09-09 18:32:39 +00:00
Douglas Gregor
6b3bcf29f5
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.
llvm-svn: 139373
2011-09-09 16:51:10 +00:00
Caitlin Sadowski
ff2f3f8105
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
...
llvm-svn: 139370
2011-09-09 16:21:55 +00:00
Caitlin Sadowski
33208340bd
Thread Safety: Moving the analysis to a new file
...
llvm-svn: 139369
2011-09-09 16:11:56 +00:00
Caitlin Sadowski
a2fd6e0473
Thread safety: refactoring test cases
...
llvm-svn: 139368
2011-09-09 16:07:55 +00:00
Caitlin Sadowski
0b3501c5e2
Thread safety: refactoring to use an error handler
...
llvm-svn: 139367
2011-09-09 16:04:02 +00:00
Francois Pichet
2731b7ded3
Update comment because JumpDiagnostics.cpp is not just about VLA scope.
...
llvm-svn: 139364
2011-09-09 11:02:57 +00:00
John McCall
b46f287e48
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.
llvm-svn: 139361
2011-09-09 07:56:05 +00:00
Argyrios Kyrtzidis
2169a75a0a
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.
llvm-svn: 139359
2011-09-09 06:44:21 +00:00
Argyrios Kyrtzidis
e74bc0ef4c
[PCH] When loading the decls linked to an identifier, also make them visible
...
in the translation unit.
llvm-svn: 139358
2011-09-09 06:44:17 +00:00
Argyrios Kyrtzidis
94d3f9dcd0
Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.
...
llvm-svn: 139357
2011-09-09 06:44:14 +00:00
John McCall
9c3467e26c
Code formatting; no functionality change.
...
llvm-svn: 139355
2011-09-09 06:12:06 +00:00
John McCall
fec112d50e
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.
llvm-svn: 139354
2011-09-09 06:11:02 +00:00
John McCall
9320b87cff
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.
llvm-svn: 139352
2011-09-09 05:25:32 +00:00
Richard Trieu
10162ab7ed
Clean up the RebuildUnknownAnyExpr visitor in SemaExpr.cpp. Mainly swapped around variable names so that this visitor be more like other visitors in clang.
...
llvm-svn: 139351
2011-09-09 03:59:41 +00:00
Richard Trieu
9becef691d
Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.
...
llvm-svn: 139350
2011-09-09 03:18:59 +00:00
Richard Trieu
3481fcd869
Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed typedef of AttrTy since it is not used.
...
llvm-svn: 139349
2011-09-09 02:16:15 +00:00
Douglas Gregor
26701a4371
Modules: introduce the __module_private__ declaration specifier, which
...
indicates that a declaration is only visible within the module it is
declared in.
llvm-svn: 139348
2011-09-09 02:06:17 +00:00
Richard Trieu
2bd0401b04
Change all references of type ExprTy to Expr and get rid of the typedefs.
...
llvm-svn: 139347
2011-09-09 02:00:50 +00:00
Richard Trieu
ba63ce6b7b
Capitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts between declarations and definitions from this and previous refactorings.
...
llvm-svn: 139346
2011-09-09 01:45:06 +00:00
Douglas Gregor
3168dcf134
The integer type of an enumeration type isn't always canonical
...
llvm-svn: 139334
2011-09-08 23:29:05 +00:00
Eric Christopher
22164ed943
Rearrange comment slightly for Bill.
...
llvm-svn: 139333
2011-09-08 23:28:19 +00:00
Eric Christopher
bd202c0496
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.
llvm-svn: 139332
2011-09-08 23:25:25 +00:00
Caitlin Sadowski
b4d24a9054
Thread safety: small edit to unused variation on warning left in by accident from earlier commit
...
llvm-svn: 139331
2011-09-08 23:17:03 +00:00
Douglas Gregor
8d9c56bb59
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
...
llvm-svn: 139327
2011-09-08 22:32:33 +00:00
Matt Beaumont-Gay
042ce8e9d8
Extend -Wliteral-conversion to catch "int i = -1.234"
...
llvm-svn: 139326
2011-09-08 22:30:47 +00:00
Caitlin Sadowski
ee5db8b5c4
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.
...
llvm-svn: 139321
2011-09-08 21:52:50 +00:00
Jakob Stoklund Olesen
ed2a360fd1
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>
llvm-svn: 139319
2011-09-08 21:18:03 +00:00
Caitlin Sadowski
2d3f70ac1c
Thread Safety: adding basic no thread safety analysis option
...
llvm-svn: 139310
2011-09-08 18:35:21 +00:00
Caitlin Sadowski
69b367af17
Thread safety: Adding basic support for locks required and excluded attributes
...
llvm-svn: 139308
2011-09-08 18:27:31 +00:00
Caitlin Sadowski
46b057681a
Thread safety: shared vs. exclusive locks
...
llvm-svn: 139307
2011-09-08 18:19:38 +00:00
Caitlin Sadowski
bc1f11162a
Thread safety: small formatting change in test comments
...
llvm-svn: 139306
2011-09-08 18:07:26 +00:00
Douglas Gregor
6a40b088e9
Look through SubstNonTypeTemplateParmExpr nodes in the various
...
Expr::Ignore* methods that also look through implicit casts.
llvm-svn: 139303
2011-09-08 17:56:33 +00:00
Caitlin Sadowski
990d571226
Thread safety: added support for function scopes in attribute arguments.
...
This patch was written by DeLesley Hutchins.
llvm-svn: 139302
2011-09-08 17:42:31 +00:00
Caitlin Sadowski
9385dd7415
Thread Safety: Patch to implement delayed parsing of attributes within a
...
class scope.
This patch was also written by DeLesley Hutchins.
llvm-svn: 139301
2011-09-08 17:42:22 +00:00
Douglas Gregor
dc28ba12e1
Document __has_feature(objc_instancetype).
...
llvm-svn: 139299
2011-09-08 17:19:31 +00:00
Argyrios Kyrtzidis
80f78b961a
[libclang] Fix annotation and getting a "macro expansion" cursor
...
for a builtin macro expansion.
llvm-svn: 139298
2011-09-08 17:18:41 +00:00
Douglas Gregor
8b7d403684
Allow C++0x enumerations with a fixed underlying type in
...
Objective-C. The @encode'ing of such an enumeration type is the same
as its underlying type. <rdar://problem/5276348>.
llvm-svn: 139297
2011-09-08 17:18:35 +00:00
Eric Christopher
d98e424716
Formatting.
...
llvm-svn: 139296
2011-09-08 17:15:04 +00:00
Eric Christopher
d0e4955b14
Add a block comment explaining how the different source locations work
...
including some source examples.
llvm-svn: 139295
2011-09-08 17:15:01 +00:00
Abramo Bagnara
41bfb66e76
Added missing initialization.
...
llvm-svn: 139291
2011-09-08 14:20:25 +00:00
David Blaikie
d937bf13d4
Adding FixIts to static/inline main declaration diagnostics.
...
llvm-svn: 139282
2011-09-08 06:33:04 +00:00
Douglas Gregor
bab8a96f2f
Implement the Objective-C 'instancetype' type, which is an alias of
...
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.
llvm-svn: 139275
2011-09-08 01:46:34 +00:00
Chad Rosier
c31e48d7e4
[driver] i386 kext preprocessor jobs also need their unsupported options
...
filtered. This happenis when -save-temps is specified.
<rdar://problem/10088387>
llvm-svn: 139269
2011-09-08 00:38:00 +00:00
Douglas Gregor
af5c48490e
Optimize the preprocessor's handling of the __import_module__
...
keyword. We now handle this keyword in HandleIdentifier, making a note
for ourselves when we've seen the __import_module__ keyword so that
the next lexed token can trigger a module import (if needed). This
greatly simplifies Preprocessor::Lex(), and completely erases the 5.5%
-Eonly slowdown Argiris noted when I originally implemented
__import_module__. Big thanks to Argiris for noting that horrible
regression!
llvm-svn: 139265
2011-09-07 23:11:54 +00:00
Argyrios Kyrtzidis
37ad0091c3
[arcmt] Try fixing the windows buildbot.
...
llvm-svn: 139262
2011-09-07 21:50:18 +00:00
Argyrios Kyrtzidis
933725c59e
Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful
...
to meet the requirements of the InputIterator concept.
llvm-svn: 139261
2011-09-07 21:50:10 +00:00
Richard Trieu
5f376f6d34
Change diagnoseAddressOfInvalidType() to use an enum to determine what error message to display. Also, move the function call into on location instead of having it spread among many places in the if/else statements.
...
llvm-svn: 139260
2011-09-07 21:46:33 +00:00
Douglas Gregor
5ca153f112
When parsing a function-try-block that does not have a
...
ctor-initializer, remember to call the Sema action to generate default
ctor-initializers. What a delightful little miscompile. Fixes PR10578
/ <rdar://problem/9877267>.
llvm-svn: 139253
2011-09-07 20:36:12 +00:00
Kaelyn Uhrain
5a43b461fc
Fix Sema::CorrectTypo to ignore found but unresolved symbols
...
llvm-svn: 139252
2011-09-07 20:25:59 +00:00
Peter Collingbourne
2d7f219caf
More missing dependencies picked up by Ninja.
...
llvm-svn: 139248
2011-09-07 19:12:36 +00:00
James Molloy
98f3e18f25
Fix up MCInstPrinter creation to take the new SubtargetInfo parameter (see LLVM r139237)
...
llvm-svn: 139238
2011-09-07 17:25:30 +00:00
Fariborz Jahanian
eebdb67420
objc-gc: More sema work for properties declared 'weak'
...
in GC mode. // rdar://10073896
llvm-svn: 139235
2011-09-07 16:24:21 +00:00
Chandler Carruth
3d45b23dfc
Extract the emission of the diagnostic's location into a separate
...
function. This is really the beginning of the second phase of
refactorings here. The end goal is to have (roughly) three interfaces:
1) Base class to format a single diagnostic suitable for display on the
console.
2) Extension of the base class which also displays a caret diagnostic
suitable for display on the console.
3) An adaptor that implements the DiagnosticClient by delegating to #1
and/or #2 as appropriate.
Once we have these, things like libclang's formatDiagnostic can use #1
and #2 to provide really well formatted (and consistently formatted!)
textual formatting of diagnostics.
Getting there is going to be quite a bit of shuffling. I'm basically
sketching out where the interface boundaries can be drawn for #1 and #2
within the existing classes. That lets me shuffle with a minimum of fuss
and delta. Once that's done, and any of the related interfaces that need
to change are updated, I'll hoist these into separate headers and
re-implement libclang in terms of their interfaces. Long WIP, but
comments at each step welcome. =D
llvm-svn: 139228
2011-09-07 08:05:58 +00:00
Chandler Carruth
9779830513
Move the HilightRange method from TextDiagnosticPrinter down to
...
CaretDiagnostic. It's completely generic, with nothing to do with the
diagnostic client or info APIs.
llvm-svn: 139227
2011-09-07 07:02:31 +00:00
Chandler Carruth
e79ddf8c67
Hoist the tab expansion into a helper function.
...
llvm-svn: 139226
2011-09-07 05:36:50 +00:00
Chandler Carruth
0f1006a95a
Don't compute the same line number in two places, once inside a loop.
...
llvm-svn: 139225
2011-09-07 05:01:10 +00:00
Eli Friedman
ce3e2c85b1
Make sure the FunctionDecl's created by "#pragma weak" have correct ParmVarDecl's. PR10878.
...
llvm-svn: 139224
2011-09-07 04:05:06 +00:00
Argyrios Kyrtzidis
9d4fac0f9f
[arcmt] Remove xfail on test for windows, Takumi reported that it passes mingw and msvc.
...
llvm-svn: 139223
2011-09-07 03:43:41 +00:00
Argyrios Kyrtzidis
7d500b3457
operator->() in PreprocessingRecord::iterator is useless since we
...
are returning a pointer to pointer.
llvm-svn: 139222
2011-09-07 03:43:39 +00:00
Richard Trieu
f9bd0f5d99
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
DiagnoseLogicalAndInLogicalOrLHS()
DiagnoseBinOpPrecedence()
ActOnBinOp()
BuildBinOp()
llvm-svn: 139219
2011-09-07 02:02:10 +00:00
Richard Trieu
4a287fb926
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CreateBuiltinBinOp()
DiagnoseBitwisePrecedence()
llvm-svn: 139218
2011-09-07 01:49:20 +00:00
Chandler Carruth
773757a962
Switch the CharSourceRange array to a small vector. The array was
...
a stack array of a magical size with an assert() that we never
overflowed it. That seems incredibly risky. We also have a very nice API
for bundling up a vector we expect to usually have a small size without
loss of functionality or security if the size is excessive.
The fallout is to remove the last pointer+size parameter pair that are
traced through the recursive caret diagnostic emission.
llvm-svn: 139217
2011-09-07 01:47:09 +00:00
Eli Friedman
e9f8113ec4
Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything.
...
There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now.
I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic.
llvm-svn: 139216
2011-09-07 01:41:24 +00:00
Richard Trieu
da4f43a609
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckAssignmentOperands()
DiagnoseSelfAssignment()
checkArithmeticNull()
llvm-svn: 139215
2011-09-07 01:33:52 +00:00
Richard Trieu
bcce2f7189
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckVectorCompareOperands()
CheckBitwiseOperands()
CheckLogicalOperands()
llvm-svn: 139214
2011-09-07 01:19:57 +00:00
Richard Trieu
aa5e256c20
Change the self-reference visitor (which gives the warning for self-reference oninitalization warning of -Wuninitialized) to exclude member variables that can decay into pointers. This will cause it to no longer warn on this code:
...
struct foo { char a[100], *e; } bar = { .e = bar.a };
llvm-svn: 139213
2011-09-07 00:58:53 +00:00
Fariborz Jahanian
5f2b703651
objc-gc: Don't force a __strong type'd property
...
to be 'weak'. This prevents a crash and should
probably be flagged as error - later to come.
llvm-svn: 139211
2011-09-07 00:38:49 +00:00
Francois Pichet
bcf6471010
In Microsoft mode, if we are inside a template class member function and we can't resolve a function call then create a type-dependent CallExpr even if the function has no type dependent arguments. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes.
...
With this patch in, clang will generate only 37 errors (down from 212) when parsing a typical MFC source file.
llvm-svn: 139210
2011-09-07 00:14:57 +00:00
Chad Rosier
e75ef40843
[driver] When clang crashes, don't try to generate diagnostics (i.e.,
...
preprocessor output) with multiple -arch options.
llvm-svn: 139207
2011-09-06 23:52:36 +00:00
Fariborz Jahanian
6dd3f39dae
objc-gc: Adds support for "weak" property attribute under GC.
...
// rdar://10073896
llvm-svn: 139203
2011-09-06 23:32:40 +00:00
Chandler Carruth
cf57ebfd4c
Remove the doxyment for this now defunct parameter.
...
llvm-svn: 139197
2011-09-06 22:34:36 +00:00
Chandler Carruth
935574de2f
Don't recompute the presumed loc twice in 5 lines of code... Spotted by
...
inspection.
llvm-svn: 139196
2011-09-06 22:34:33 +00:00
Chandler Carruth
1f28e6c7e3
Use ArrayRef for the fixit hint array rather than a pointer and a size.
...
Clean up loops over the hints to use the more idiomatic iterator form in
LLVM and Clang.
llvm-svn: 139195
2011-09-06 22:31:44 +00:00
Chandler Carruth
20bfaa0f68
Hoist the construction of the FixItHint line into a member function with
...
a defined interface. This isn't as nice as the previous one, but should
get better as I push through better data types in all these functions.
Also, I'm hoping to pull some aspects of this out into a common routine
(such as tab expansion).
Again, WIP, comments welcome as I'm going through.
llvm-svn: 139190
2011-09-06 22:01:04 +00:00
Richard Trieu
b80728fe9a
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckCompareOperands()
llvm-svn: 139187
2011-09-06 21:43:51 +00:00
Douglas Gregor
e0e9630e07
When extracting the callee declaration from a call expression, be sure
...
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDecl()
rather than attempting to mimick its behavior (badly).
Fixes <rdar://problem/10063539>.
llvm-svn: 139185
2011-09-06 21:41:04 +00:00
Richard Trieu
1762d7cc35
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
checkEnumComparison()
diagnoseDistinctPointerComparison()
convertPointersToCompositeType()
diagnoseFunctionPointerToVoidComparison()
llvm-svn: 139184
2011-09-06 21:27:33 +00:00
Richard Trieu
e4a19fbd0c
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
DiagnoseBadShiftValues()
CheckShiftOperands()
llvm-svn: 139183
2011-09-06 21:21:28 +00:00
Richard Trieu
4ae7e97667
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
diagnoseArithmeticOnTwoVoidPointers()
checkArithmeticBinOpPointerOperands()
diagnosePointerIncompatibility()
CheckAdditionOperands()
CheckSubtractionOperands()
llvm-svn: 139182
2011-09-06 21:13:51 +00:00
Richard Trieu
859d23fa5e
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckVectorOperands()
CheckMultiplyDivideOperands()
CheckRemainderOperands()
llvm-svn: 139181
2011-09-06 21:01:04 +00:00
Ted Kremenek
99c0966fc4
Place 'equality comparison with extraneous parentheses...' into a subgroup of -Wparentheses called -Wparentheses-equality.
...
llvm-svn: 139180
2011-09-06 20:58:32 +00:00
Douglas Gregor
49695f078e
Implement the Named Return Value Optimization (NRVO) for blocks.
...
llvm-svn: 139178
2011-09-06 20:46:03 +00:00
Richard Trieu
eb29914c5d
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckTransparentUnionArgumentConstraints()
CheckSingleAssignmentConstraints()
InvalidOperands()
llvm-svn: 139176
2011-09-06 20:40:12 +00:00
Douglas Gregor
e3f3ea08a8
Implement the Named Return Value Optimization (NRVO) for Objective-C++
...
methods. Fixes PR10835 / <rdar://problem/10050178>.
llvm-svn: 139175
2011-09-06 20:33:37 +00:00
Richard Trieu
de4958fb28
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
CheckAssignmentConstraints()
llvm-svn: 139173
2011-09-06 20:30:53 +00:00
Richard Trieu
a871b97da5
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
checkPointerTypesForAssignment()
checkBlockPointerTypesForAssignment()
checkObjCPointerTypesForAssignment()
CheckAssignmentConstraints()
llvm-svn: 139170
2011-09-06 20:21:22 +00:00
Richard Trieu
d33e46e943
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
DiagnoseConditionalForNull()
CheckConditionalOperands()
IsArithmeticBinaryExpr()
DiagnoseConditionalPrecedence()
llvm-svn: 139167
2011-09-06 20:06:39 +00:00
Benjamin Kramer
499c68b5f6
Spelling.
...
llvm-svn: 139165
2011-09-06 19:57:14 +00:00
Richard Trieu
9a52fbb2d0
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
handleIntegerConversion()
UsualArithmeticConversions()
llvm-svn: 139164
2011-09-06 19:52:52 +00:00
Ted Kremenek
fed48af3de
Don't emit -Wpadded warnings without a valid SourceLocation. This can happen when RecordLayoutBuilder is used by Codegen, not Sema.
...
llvm-svn: 139162
2011-09-06 19:40:45 +00:00
Eli Friedman
cf9b1f6524
Rearrange code so that we pass the right pointer to delete[] when an exception is thrown constructing the array elements in an array new expression. Fixes PR10870.
...
llvm-svn: 139158
2011-09-06 18:53:03 +00:00
Richard Trieu
cfe3f21cec
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
handleFloatConversion()
handleComplexIntConvsersion()
llvm-svn: 139153
2011-09-06 18:38:41 +00:00
Richard Trieu
5065cdd0ea
Rename variables in SemaExpr.cpp to give a more consistant naming scheme.
...
ExprResult LHS, RHS,
Expr *LHSExpr, *RHSExpr
QualType LHSType, RHSType
Functions changed:
handleComplexFloatToComplexFloatConverstion()
handleComplexFloatConversion()
llvm-svn: 139151
2011-09-06 18:25:09 +00:00
Richard Smith
a8a5c402bb
Advertise support for cxx_range_for as an extension in C++98 mode. Patch by Jean-Daniel Dupas!
...
Also provide a modicum of test coverage for ranged for in C++98.
llvm-svn: 139149
2011-09-06 18:03:41 +00:00
Douglas Gregor
cd0d826001
Finish implementing (de-)serialization of the CXXDefinitionData bits
...
needed for implicit move constructors and move assignment
operators. Fixes PR10847.
llvm-svn: 139144
2011-09-06 16:38:46 +00:00
Douglas Gregor
146b8e9a58
When performing a derived-to-base cast on the right-hand side of the
...
synthesized move assignment within an implicitly-defined move
assignment operator, be sure to treat the derived-to-base cast as an
xvalue (rather than an lvalue). Otherwise, we'll end up getting the
wrong constructor.
Optimize a direct call to a trivial move assignment operator to an
aggregate copy, as we do for trivial copy assignment operators, and
update the the assertion in CodeGenFunction::EmitAggregateCopy() to
cope with this optimization.
Fixes PR10860.
llvm-svn: 139143
2011-09-06 16:26:56 +00:00
Richard Smith
3ab15558d7
PR10867: Work around a bug in lit. Multiple RUN: lines are joined with &&, so:
...
RUN: foo
RUN: bar || true
is equivalent to:
RUN: foo && bar || true
which is equivalent to:
RUN: (foo && bar) || true
This resulted in several of the fixit tests not really testing anything.
llvm-svn: 139132
2011-09-06 03:01:15 +00:00
Peter Collingbourne
2e8201422d
Add missing dependency
...
Spotted by Ninja.
llvm-svn: 139129
2011-09-06 02:08:40 +00:00
Peter Collingbourne
15a26dacbc
Fix typo
...
llvm-svn: 139128
2011-09-06 02:08:36 +00:00
Peter Collingbourne
fa9771ffec
Add the resource directory to the search path for Driver::GetFilePath,
...
as well as the search path printed by -print-search-dirs.
The main purpose of this change is to cause -print-file-name=include
to print the path to the include directory under Clang's resource
directory, instead of the system compiler's include directory, whose
header files Clang may not be able to parse. Some build scripts will
do something like:
$(CC) -nostdinc -I`$(CC) -print-file-name=include`
to exclude all header paths except the compiler's.
llvm-svn: 139127
2011-09-06 02:08:31 +00:00
Benjamin Kramer
17ff23c708
Speed up BCPL comment lexing by looking aggressively for newlines and then scannig backwards to see if the newline is escaped.
...
3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage.
llvm-svn: 139116
2011-09-05 07:19:39 +00:00
Benjamin Kramer
dbfb18a0a9
Use the Lexer's definition of whitespace here.
...
llvm-svn: 139115
2011-09-05 07:19:35 +00:00
Benjamin Kramer
e007e80fc0
Stop cluttering the test directory with temporary files.
...
llvm-svn: 139114
2011-09-05 07:19:32 +00:00
Chandler Carruth
58b3749d6c
Enable -Wdangling-fields by default in Clang. I've run this warning over
...
a very large chunk of code and found zero false positives. I've only
found a few bugs, but that likely is because bugs of this nature
actually do manifest. We've also identified several bugs that were
caught by Valgrind, but would have been caught faster and more easily
with this warning.
If anyone has concerns, or this causes fallout on any build bots, lemme
know. I'm happy to just put it under -Wmost.
llvm-svn: 139112
2011-09-05 05:47:35 +00:00
Richard Smith
a528507418
Implement the suggested resolution of WG21 N3307 issue 19: When determining whether a class is an aggregate in C++0x, treat all functions which are neither deleted nor defaulted as user-provided, not just special member functions. The wording of the standard only defines the term "user-provided" for special member functions, but the intent seems to be that any function can be user-provided.
...
llvm-svn: 139111
2011-09-05 02:13:09 +00:00
Richard Smith
3f9211d322
PR10506: Extend test for temporary cleanups in range-based for loop to cover the dependent case.
...
llvm-svn: 139109
2011-09-04 23:52:03 +00:00
Francois Pichet
4391c7529a
Pass 0 instead of a empty TemplateArgumentListInfo when creating a CXXDependentScopeMemberExpr to handle a "this->" fixit (lookup into dependent bases of class template)
...
Otherwise the fixit doesn't really work for subsequent lookup.
llvm-svn: 139105
2011-09-04 23:00:48 +00:00
Benjamin Kramer
60053cf547
Use const_cast to avoid warnings.
...
llvm-svn: 139104
2011-09-04 20:26:28 +00:00
Richard Smith
5065864151
PR10458: Last part of providing 'auto' type specifier as an extension in C++98: permit it within type-ids.
...
llvm-svn: 139103
2011-09-04 20:24:20 +00:00
Richard Smith
58c7433709
PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.
...
llvm-svn: 139102
2011-09-04 19:54:14 +00:00
Sebastian Redl
e9c4e84f8e
Add test case for defaulted copy and move structure validation.
...
Fix bug this uncovered.
Address minor comments from Doug.
Enable cxx_implicit_moves feature.
llvm-svn: 139101
2011-09-04 18:14:28 +00:00
Argyrios Kyrtzidis
b914e3bc5c
Handle a code-completion token being passed to the macro stringify operator.
...
Fixes http://llvm.org/PR10826 .
llvm-svn: 139087
2011-09-04 03:32:19 +00:00
Argyrios Kyrtzidis
5cec2aea3f
Support code-completion for C++ inline methods and ObjC buffering methods.
...
Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.
Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.
Fixes rdar://10056932&8319466
llvm-svn: 139086
2011-09-04 03:32:15 +00:00
Argyrios Kyrtzidis
a3deaeeb52
Fix Lexer::ComputePreamble when MaxLines parameter is non-zero.
...
The function was only counting lines that included tokens and not empty lines,
but MaxLines (mainly initiated to the line where the code-completion point resides)
is a count of overall lines (even empty ones).
llvm-svn: 139085
2011-09-04 03:32:04 +00:00
Benjamin Kramer
a66aaa93ee
More unused variable removal.
...
llvm-svn: 139080
2011-09-03 08:46:20 +00:00
Benjamin Kramer
2667afa980
Make helpers static, remove unused variables.
...
llvm-svn: 139078
2011-09-03 03:30:59 +00:00
Chandler Carruth
d551d4e1da
Teach -Wdangling-field to warn about temporaries bound to references as
...
well.
Also, clean up the flow of the code a bit, and factor things more
nicely.
Finally, add the test case that was missing from my previous
commit (sorry), with new tests added to cover temporaries and other fun
cases.
llvm-svn: 139077
2011-09-03 02:21:57 +00:00
Chandler Carruth
599deef379
Add a simple new warning to catch blatantly dangling pointer and
...
reference members of classes. We've had several bugs reported because of
this, and there's no reason not to flag it right away in the compiler.
Comments especially welcome on the strategy for implementing this
warning (IE, what should trigger this?) and on the text of the warning
itself.
I'm going to extend this to cover obvious cases with temporaries and
beef up the test cases some in subsequent patches. I'll then run it over
a large codebase and make sure its not misbehaving before I add it to
-Wall or turn it on by default. I think this one might be a good
candidate for on by default.
llvm-svn: 139075
2011-09-03 01:14:15 +00:00
Fariborz Jahanian
4efb6b35f6
Revise test and see if it passes with a release-built clang.
...
llvm-svn: 139043
2011-09-02 21:47:51 +00:00
Richard Trieu
48277e5710
Fix some indenting issues in SemaExpr.cpp
...
llvm-svn: 139042
2011-09-02 21:44:27 +00:00
Fariborz Jahanian
2bb8270e6f
blocks: Support capturing complex variable in block.
...
// rdar://10033896
llvm-svn: 139041
2011-09-02 21:33:44 +00:00
Richard Trieu
7aa58f1eea
Refactor UsualArithmeticConversions() in SemaExpr.cpp into several functions.
...
llvm-svn: 139033
2011-09-02 20:58:51 +00:00
Fariborz Jahanian
b74711df52
revert patch in r139020
...
llvm-svn: 139029
2011-09-02 20:03:16 +00:00
Ted Kremenek
aed4677a1c
-Wuninitialized: fix insidious bug resulting from interplay of blocks and dead code. Fixes <rdar://problem/10060250>.
...
llvm-svn: 139027
2011-09-02 19:39:26 +00:00
Fariborz Jahanian
f30bc00103
blocks: Support capturing complex variable in block.
...
// rdar://10033896
llvm-svn: 139020
2011-09-02 18:39:40 +00:00
Eli Friedman
29538899ef
Make StmtDumper::VisitCXXFunctionalCastExpr dump the attached cast kind. Fix the cast kind for a cast from floating-point to enum type. (The difference isn't actually visible, but that's just because IRGen is overly forgiving.) Per report by Enea Zaffanella on cfe-dev.
...
llvm-svn: 139011
2011-09-02 17:38:59 +00:00
Jordy Rose
087611ed81
[analyzer] Remove TransferFuncs.h, then deal with the fallout.
...
And with that, TransferFuncs is gone!
llvm-svn: 139003
2011-09-02 08:02:59 +00:00
Jordy Rose
75e680eae3
[analyzer] Move RetainReleaseChecker to the Checkers library and rename it to RetainCountChecker...and clean up the file while I'm at it.
...
llvm-svn: 139002
2011-09-02 06:44:22 +00:00
Chandler Carruth
d3e83677b4
Hoist the emission of parseable fixits into a helper method, simplifying
...
and reducing indentation through the clever use of early exits. ;]
llvm-svn: 139001
2011-09-02 06:30:30 +00:00