Ken Dyck
a2d3dda041
Convert NonVirtualAlignment to CharUnits. No change in functionality
...
intended.
llvm-svn: 125638
2011-02-16 01:43:15 +00:00
Argyrios Kyrtzidis
034d68e97d
[analyzer] AnalyzerFrontend is dependent on AnalyzerCheckers.
...
llvm-svn: 125637
2011-02-16 01:40:55 +00:00
Argyrios Kyrtzidis
9d4d4f9104
[analyzer] Use the new registration mechanism on the apple checkers:
...
NilArgChecker
CFNumberCreateChecker
NSAutoreleasePoolChecker
CFRetainReleaseChecker
ClassReleaseChecker
llvm-svn: 125636
2011-02-16 01:40:52 +00:00
Douglas Gregor
042465709f
When searching for visible declarations (e.g., for code completion),
...
be sure to look at all of the Objective-C class declarations within a
@class . Fixes <rdar://problem/8876207>.
llvm-svn: 125635
2011-02-16 01:39:26 +00:00
Devang Patel
25468059e5
Simplify test to check an aggregate argument that has non trivial constructor or destructor.
...
This patch rewrites r125142.
llvm-svn: 125632
2011-02-16 01:11:51 +00:00
Douglas Gregor
b5f1e46d30
When trying to provide a code completion item for a call to "super" in
...
Objective-C, also look in the categories and class extensions of our
superclasses. Fixes <rdar://problem/8853540>.
llvm-svn: 125628
2011-02-16 00:51:18 +00:00
John McCall
bf9a86b50f
Don't call objc_read_weak as part of emitting a block literal.
...
Nobody ever gave me a clear reason for why we were doing this, and
now it's apparently causing serious problems, so if *not* having this
causes problems, we get to solve them the right way this time.
llvm-svn: 125627
2011-02-16 00:49:34 +00:00
Fariborz Jahanian
6fd9435f6d
Check for deprecated implementation unconditionally.
...
Warning and its note will be ignored in default case.
llvm-svn: 125621
2011-02-16 00:30:31 +00:00
Fariborz Jahanian
0c87d36d9d
Fix typo (per Chris's comment).
...
llvm-svn: 125619
2011-02-16 00:14:11 +00:00
Argyrios Kyrtzidis
c541ade850
Warn for missing terminating " or ' instead of error for gcc compatibility. Fixed rdar://8914293.
...
llvm-svn: 125616
2011-02-15 23:45:31 +00:00
Devang Patel
49e3348e56
Only c++ class arguments with non trivial constructor or destructor needs a reference.
...
C struct arguments do not need this adjustment.
This fixes 7 failures in callfuncs.exp from gdb testsuite.
llvm-svn: 125615
2011-02-15 23:36:28 +00:00
Argyrios Kyrtzidis
a9215281de
[analyzer] Use the new registration mechanism on some of the experimental internal checkers:
...
CastToStructChecker
FixedAddressChecker
PointerArithChecker
PointerSubChecker
llvm-svn: 125612
2011-02-15 22:55:20 +00:00
Argyrios Kyrtzidis
b2400924d9
[analyzer] Use the new registration mechanism on the IdempotentOperationChecker.
...
llvm-svn: 125611
2011-02-15 22:55:14 +00:00
John McCall
9743e8d84e
Handle delayed access in local declarations. PR9229.
...
llvm-svn: 125609
2011-02-15 22:51:53 +00:00
Douglas Gregor
24bbc46208
Teach code completion to cope with block types written without a
...
prototype, e.g., ^() rather than ^(void). Fixes
<rdar://problem/8875712>.
llvm-svn: 125608
2011-02-15 22:37:09 +00:00
Rafael Espindola
d62acb569c
Add a hack to avoid adding '\01' to asm names when possible. It would be
...
better for clang to always compute the right name, but for now this hack
fixes PR9177 and lets us build firefox with LTO :-)
llvm-svn: 125607
2011-02-15 22:23:51 +00:00
John McCall
4d9f14234f
Refactor CGRecordLayoutBuilder to use CharUnits more consistently.
...
llvm-svn: 125605
2011-02-15 22:21:29 +00:00
Douglas Gregor
f34a6f0fef
Implement a special code-completion pattern for "IBAction". Fixes
...
<rdar://problem/8767704>.
llvm-svn: 125604
2011-02-15 22:19:42 +00:00
Rafael Espindola
41febc658b
Fix the distro name.
...
llvm-svn: 125601
2011-02-15 21:44:06 +00:00
Zhanyong Wan
bc402abcc9
Moves FileManagerTest.cpp to unittests/Basic such that the unit test
...
directory structure matches the library structure. Reviewed by jyasskin.
llvm-svn: 125600
2011-02-15 21:30:27 +00:00
Argyrios Kyrtzidis
f81ff04ba3
[analyzer] Remove ObjCSelfInitCheck from AnalyzerOptions.
...
llvm-svn: 125599
2011-02-15 21:25:07 +00:00
Argyrios Kyrtzidis
2d3905ffac
[analyzer] Use the new registration mechanism on some of the experimental checks. These are:
...
CStringChecker
ChrootChecker
MallocChecker
PthreadLockChecker
StreamChecker
UnreachableCodeChecker
MallocChecker creates implicit dependencies between checkers and needs to be handled differently.
llvm-svn: 125598
2011-02-15 21:25:03 +00:00
Rafael Espindola
65941e50ef
Fix include paths on 32 bit ubuntu 10.10.
...
Original patch by Jonas Bülow.
llvm-svn: 125597
2011-02-15 21:16:43 +00:00
Douglas Gregor
8003924d10
When code-completing within a list of declaration specifiers,
...
separately handle the case of a local declaration-specifier list,
including all types in the set of options. Fixes
<rdar://problem/8790735> and <rdar://problem/8662831>.
llvm-svn: 125594
2011-02-15 20:33:25 +00:00
Peter Collingbourne
e91b2dbdf1
OpenCL: standardise naming of test cases
...
llvm-svn: 125590
2011-02-15 19:46:41 +00:00
Peter Collingbourne
5df20e02af
Serialization/deserialization support for floating point #pragma
...
options, enabled OpenCL extensions and default FP_CONTRACT setting.
llvm-svn: 125589
2011-02-15 19:46:30 +00:00
Peter Collingbourne
e87167b7d8
OpenCL: semantic analysis support for cl_khr_fp64 extension
...
llvm-svn: 125588
2011-02-15 19:46:23 +00:00
Douglas Gregor
d39ae3eec8
When we encounter an Objective-C class name in an expression, followed
...
by the code completion token, treat this as a class message send where
the opening square bracket is missing. Fixes <rdar://problem/6970911>.
llvm-svn: 125587
2011-02-15 19:17:31 +00:00
Fariborz Jahanian
09948f1af6
In -fapple-kext mode, global object construction code
...
ends up in the text segment. // rdar://8825235.
llvm-svn: 125585
2011-02-15 18:54:46 +00:00
Douglas Gregor
e061015de8
Emit in-class member function definitions that are marked
...
"used". Fixes <rdar://problem/8684363>.
llvm-svn: 125579
2011-02-15 18:11:42 +00:00
Argyrios Kyrtzidis
10b2368e9f
Allow resolving headers from a PCH even after headers+PCH were moved to another path.
...
Store in PCH the directory that the PCH was originally created in.
If a header file is not found at the path that we expect it to be and the PCH file
was moved from its original location, try to resolve the file by assuming that
header+PCH were moved together and the header is in the same place relative to the PCH.
llvm-svn: 125576
2011-02-15 17:54:22 +00:00
Fariborz Jahanian
d724a109cf
Refactoring of code to issue warning on implemented
...
deprecated class and methods in objective-c.
llvm-svn: 125573
2011-02-15 17:49:58 +00:00
Douglas Gregor
9892e3545a
Add missing CMake dependency
...
llvm-svn: 125566
2011-02-15 17:09:56 +00:00
Argyrios Kyrtzidis
6fa0d20a6f
Fix the clang-wpa example.
...
llvm-svn: 125565
2011-02-15 16:54:12 +00:00
Argyrios Kyrtzidis
f2ec88ea54
Initialize InlineCall in AnalyzerOptions.
...
llvm-svn: 125564
2011-02-15 16:54:07 +00:00
John McCall
e3dc1707b5
Assorted cleanup:
...
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code
llvm-svn: 125562
2011-02-15 09:22:45 +00:00
Jeffrey Yasskin
cd3858b103
Add CMake support to the clang unittests.
...
llvm-svn: 125561
2011-02-15 07:54:28 +00:00
Argyrios Kyrtzidis
4e52527c28
[analyzer] Reflect changes for tablegen'ing the checkers.
...
-Update tablegen files for checkers, use the tablegen class name for the checker class name.
-Update ClangSACheckersProvider to not look into hidden checker packages.
llvm-svn: 125560
2011-02-15 07:42:38 +00:00
Argyrios Kyrtzidis
a6d04d541d
[analyzer] Use the new registration mechanism on some of the internal checks. These are:
...
StackAddrLeakChecker
ObjCAtSyncChecker
UnixAPIChecker
MacOSXAPIChecker
The rest have/create implicit dependencies between checkers and need to be handled differently.
llvm-svn: 125559
2011-02-15 07:42:33 +00:00
John McCall
25849cab8b
Return a declaration to the parser when creating a field in C++ so that
...
the parser will complete the declarator with a valid decl and thus trigger
delayed diagnostics for it. It certainly looks like we were intentionally
returning null here, but I couldn't find any good reason for it, and there
wasn't a comment, so farewell to all that.
llvm-svn: 125556
2011-02-15 07:12:36 +00:00
John McCall
0217dfc2ba
Perform zero-initialization of virtual base classes when emitting
...
a zero constant for a complete class. rdar://problem/8424975
To make this happen, track the field indexes for virtual bases
in the complete object. I'm curious whether we might be better
off making CGRecordLayoutBuilder *much* more reliant on
ASTRecordLayout; we're currently duplicating an awful lot of the ABI
layout logic.
llvm-svn: 125555
2011-02-15 06:40:56 +00:00
Ted Kremenek
c7bfdcd4f5
Fix memory leak in CFGBuilder resulting from tracking scope information using SmallVectors.
...
llvm-svn: 125550
2011-02-15 02:47:45 +00:00
Ken Dyck
7ad11e70b6
Convert RecordLayout::Alignment to CharUnits from bit units. No change in
...
functionality intended.
llvm-svn: 125549
2011-02-15 02:32:40 +00:00
Ted Kremenek
4ea9004fe8
IdempotentOperationChecker: don't repeatedly recompute block reachability.
...
llvm-svn: 125548
2011-02-15 02:20:03 +00:00
Fariborz Jahanian
d33ab8c635
Warn if method for a deprecated method is implemented.
...
Warn if class for a deprecated class is implemented.
Warn if category for a deprecated class is implemented.
All under control of -Wdeprecated-implementations.
// rdar://8973810.
llvm-svn: 125545
2011-02-15 00:59:30 +00:00
Chris Lattner
91c08ad14a
update for ConstantVector API change.
...
llvm-svn: 125538
2011-02-15 00:14:06 +00:00
Ted Kremenek
05e63e0e37
Put "incomplete implementation" warning under a flag.
...
llvm-svn: 125535
2011-02-14 23:59:16 +00:00
John McCall
fe9cf0abb7
Don't crash on hierarchy static_casts which appear in variable initializers.
...
PR9221.
llvm-svn: 125532
2011-02-14 23:21:33 +00:00
John McCall
2957e3ef49
Change the context correctly when instantiating a static data member definition.
...
llvm-svn: 125517
2011-02-14 20:37:25 +00:00
Oscar Fuentes
c9987fbbfe
Add current binary and source directories to the header search list
...
for all compiler invocations.
llvm-svn: 125514
2011-02-14 20:14:11 +00:00