Daniel Dunbar
f324fa7095
Driver: Store Option ID field as unsigned to drop dependency on the options
...
type.
llvm-svn: 89232
2009-11-18 20:19:19 +00:00
Ken Dyck
24cfcf15c3
Predefine __INTPTR_WIDTH__ for future use in stdint.h.
...
llvm-svn: 89231
2009-11-18 20:05:48 +00:00
Ken Dyck
fa01168a5c
Remove the __INTMAX_TYPE__ and __UINTMAX_TYPE__ built-in macros as they are no
...
longer used by stdint.h.
llvm-svn: 89230
2009-11-18 19:51:06 +00:00
Daniel Dunbar
f2ce9a217d
Use llvm::sys::Path to check isAbsolute, instead of hard coding. Also, remove random FIXME (?).
...
llvm-svn: 89229
2009-11-18 19:50:41 +00:00
Douglas Gregor
88e72a0bf6
Improve diagnostics and recovery when parsing @synthesized definitions
...
llvm-svn: 89227
2009-11-18 19:45:45 +00:00
Ken Dyck
ac11b7b625
Define INTMAX_C and UINTMAX_C in terms of the corresponding exact-width
...
INTn_C and UINTn_C macros.
llvm-svn: 89226
2009-11-18 19:42:57 +00:00
Ken Dyck
63c8ef8256
Define INTMAX_MIN, INTMAX_MAX, and UINTMAX_MAX in terms of the limit macros for
...
their corresponding exact-width type.
llvm-svn: 89224
2009-11-18 19:22:15 +00:00
Douglas Gregor
5d34fd3674
Implement code completion for Objective-C category names in @interface
...
and @implementation declarations.
llvm-svn: 89223
2009-11-18 19:08:43 +00:00
Mike Stump
ea950e249f
Reflow to fit 80-col.
...
llvm-svn: 89222
2009-11-18 18:57:56 +00:00
Ken Dyck
47181584f1
Define intmax_t and uintmax_t as the [u]intN_t type corresponding to
...
__INTMAX_WIDTH__.
llvm-svn: 89221
2009-11-18 18:57:04 +00:00
Fariborz Jahanian
41e803d8c7
Don't warn if objc method param types in declaration and
...
implementation mismatch in their qualifiers only.
This will match similar behavior in c/c++ and
fixes radar 7211653.
llvm-svn: 89220
2009-11-18 18:56:09 +00:00
Mike Stump
643818bdd8
Trim whitespace.
...
llvm-svn: 89219
2009-11-18 18:52:31 +00:00
Fariborz Jahanian
76197416ac
Improve on diagnosing type mismatches because of
...
lack of viable convesion functions.
llvm-svn: 89216
2009-11-18 18:26:29 +00:00
Sebastian Redl
55db1ec3ec
CastsAwayConstness shouldn't care if member pointers point into different classes. Fixes PR5545.
...
llvm-svn: 89215
2009-11-18 18:10:53 +00:00
Daniel Dunbar
21432d38a0
Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
...
into a string).
llvm-svn: 89212
2009-11-18 17:42:34 +00:00
Douglas Gregor
49c22a74eb
Code completion for Objective-C class names after @interface,
...
@implementation, and in the declaration of the superclass of an
@interface.
llvm-svn: 89207
2009-11-18 16:26:39 +00:00
Edward O'Callaghan
c14422223b
Fix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.
...
llvm-svn: 89205
2009-11-18 14:51:31 +00:00
Benjamin Kramer
fb4ff27367
Update index tests for r89203.
...
llvm-svn: 89204
2009-11-18 14:20:01 +00:00
Ken Dyck
c0c98291e0
Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
...
stdint.h.
llvm-svn: 89203
2009-11-18 13:52:57 +00:00
Eli Friedman
acfb1dfa4d
Minor cleanup to member pointer handling.
...
llvm-svn: 89201
2009-11-18 09:41:26 +00:00
John McCall
5cebab12d5
Split LookupResult into its own header.
...
llvm-svn: 89199
2009-11-18 07:57:50 +00:00
Eli Friedman
928a567af1
Clean up EmitPointerToDataMemberBinaryExpr a bit.
...
llvm-svn: 89197
2009-11-18 05:01:17 +00:00
Douglas Gregor
5b4671c328
Code completion after @property, providing the names of forward-declared properties
...
llvm-svn: 89196
2009-11-18 04:49:41 +00:00
Douglas Gregor
23f21f7ba3
Rename code-completion test to actually make sense
...
llvm-svn: 89195
2009-11-18 04:41:01 +00:00
Douglas Gregor
baf6961ed4
Code completion for Objective-C properly lists
...
llvm-svn: 89194
2009-11-18 04:19:12 +00:00
Mike Stump
c0f632d6b2
Set up vtable visibility appropriately.
...
llvm-svn: 89193
2009-11-18 04:00:48 +00:00
Eli Friedman
030eee4e5c
Make CreateOverloadedUnaryOp build the correct node for postinc/dec operators.
...
llvm-svn: 89192
2009-11-18 03:58:17 +00:00
Mike Stump
83d5e00a96
Propagate hidden to the _ZTS symbols appropriately. WIP.
...
llvm-svn: 89191
2009-11-18 03:46:51 +00:00
Eli Friedman
794290ca29
Add an assertion to catch bad calls to EmitCallArgs.
...
llvm-svn: 89190
2009-11-18 03:42:04 +00:00
Eli Friedman
cfdd40c807
Simplify ActOnPostfixUnaryOp.
...
llvm-svn: 89188
2009-11-18 03:38:04 +00:00
Mike Stump
c5d2ed73ff
Be sure to set visibility for ZTI symbols for classes from the class.
...
llvm-svn: 89186
2009-11-18 03:21:29 +00:00
Mike Stump
f77aaa0089
Make _ZTI symbols hidden. This speeds up the dynamic linker.
...
llvm-svn: 89185
2009-11-18 02:53:28 +00:00
John McCall
e61f2ba7e4
Incremental progress on using declarations. Split UnresolvedUsingDecl into
...
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.
llvm-svn: 89184
2009-11-18 02:36:19 +00:00
Ted Kremenek
0469b7ea00
Add special clang_getCursor() support for @class . Handles <rdar://problem/7383421>.
...
llvm-svn: 89183
2009-11-18 02:02:52 +00:00
Douglas Gregor
9291bade4f
Code completion for member accesses that involve Objective-C properties and instance variables
...
llvm-svn: 89182
2009-11-18 01:29:26 +00:00
Douglas Gregor
63ce44aa6c
Eliminate some completely-redundant lookups
...
llvm-svn: 89181
2009-11-18 01:29:02 +00:00
Eli Friedman
132e70bfa4
PR5520: Make sure to check whether the base type is complete before looking for
...
operator->.
llvm-svn: 89180
2009-11-18 01:28:03 +00:00
Ted Kremenek
49939c2914
Add ObjCClassDecl::getSourceRange().
...
llvm-svn: 89179
2009-11-18 01:26:56 +00:00
Eli Friedman
24f55430c8
Missing piece of r89173.
...
llvm-svn: 89174
2009-11-18 00:57:03 +00:00
Eli Friedman
fe81e3fb3c
Refactor emitting call to delete operator into common function EmitDeleteCall.
...
llvm-svn: 89173
2009-11-18 00:50:08 +00:00
Mike Stump
5bbbb13765
Fix one last gotcha with typeid.
...
llvm-svn: 89172
2009-11-18 00:40:12 +00:00
Ted Kremenek
9b124e10a4
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class .
...
llvm-svn: 89170
2009-11-18 00:28:11 +00:00
Douglas Gregor
a3329fa05e
Finish code completion for Objective-C message sends
...
llvm-svn: 89168
2009-11-18 00:06:18 +00:00
Mike Stump
4aaf79a942
Cleanup.
...
llvm-svn: 89166
2009-11-17 23:51:10 +00:00
Mike Stump
103a084cbe
Add rtti support for arrays, functiond without prototypes, vectors and
...
enums.
llvm-svn: 89165
2009-11-17 23:45:57 +00:00
Douglas Gregor
090dd181e5
Rename Objective-C message send completion functions to indicate that we're referring to message sends
...
llvm-svn: 89164
2009-11-17 23:31:36 +00:00
Douglas Gregor
bab2b3c70f
Refactor code-completion support for message sends, collecting the
...
code to find and add Objective-C methods (starting at an
ObjCContainerDecl) into a single, static function. Also, make sure
that we search into the implementations of classes and categories to
find even more methods.
llvm-svn: 89163
2009-11-17 23:22:23 +00:00
Ted Kremenek
a26da8503c
Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration().
...
llvm-svn: 89162
2009-11-17 23:12:20 +00:00
Mike Stump
96b96d5f2e
Add rtti info for function prototypes and refactor. This allows
...
pointer to member functions to work. WIP.
llvm-svn: 89161
2009-11-17 23:11:22 +00:00
Ted Kremenek
707ece6025
Do not register ObjCInterfaceDecls implicitly created by @class in the
...
current DeclContext. These "imaginary" declarations pose issues for
clients searching DeclContext for actual declarations. Instead,
register them for name lookup, and add the ObjCInterfaceDecl later to
the DeclContext when we hit an actual @interface declaration.
This also fixes a bug where the invariant that the Decls in a
DeclContext are sorted in order of their appearance is no longer
violated. What could happen is that an @class causes an
ObjCInterfaceDecl to get added first to the DeclContext, then the
ObjCClassDecl itself is added, and then later the SourceLocation of
the ObjCInterfaceDecl is updated with the correct location (which is
later in the file). This breaks an assumed invariant in
ResolveLocation.cpp (and possibly other clients).
llvm-svn: 89160
2009-11-17 22:58:30 +00:00
Fariborz Jahanian
95ace55701
This patch finalizes implementatin of weak_import
...
objective-c2 classes (radar 6815425).
llvm-svn: 89157
2009-11-17 22:42:00 +00:00
Mike Stump
6fdfea67ad
Add rtti support for pointer to data members.
...
llvm-svn: 89155
2009-11-17 22:33:00 +00:00
Daniel Dunbar
f6e32e4abe
Drop unnecessary #include.
...
llvm-svn: 89154
2009-11-17 22:25:16 +00:00
Daniel Dunbar
ba0c9e8685
Remove unnecessary &&s.
...
llvm-svn: 89153
2009-11-17 22:25:07 +00:00
Fariborz Jahanian
3ad8dcfd55
More cases for weak_import objective-c2 classes.
...
(still radar 6815425).
llvm-svn: 89152
2009-11-17 22:02:21 +00:00
Daniel Dunbar
aa1e2efbc3
Fix -Asserts warning.
...
llvm-svn: 89149
2009-11-17 21:51:03 +00:00
Mike Stump
db72c89eb1
Add rtti support for non-member pointers. WIP.
...
llvm-svn: 89148
2009-11-17 21:44:24 +00:00
Fariborz Jahanian
6726055375
More support for weak_import objective-c2 class.
...
(radar 6815425).
llvm-svn: 89146
2009-11-17 21:37:35 +00:00
Douglas Gregor
e8f0801265
Improve location information when adding conversion candidates
...
llvm-svn: 89141
2009-11-17 21:16:22 +00:00
Benjamin Kramer
10d0831718
fgetln is a BSDism; replace it with more portable code.
...
llvm-svn: 89140
2009-11-17 20:51:40 +00:00
Ted Kremenek
2df52dca49
Add c-index-test mode "-test-file-scan", which scans a source file and calls clang_getCursor() on every character.
...
llvm-svn: 89136
2009-11-17 19:37:36 +00:00
Ted Kremenek
1e8a6f8527
Fix test case.
...
llvm-svn: 89135
2009-11-17 19:36:36 +00:00
David Chisnall
950a9518b1
Added block type introspection support.
...
As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.
llvm-svn: 89134
2009-11-17 19:33:30 +00:00
David Chisnall
cb1b7bf79d
Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.
...
llvm-svn: 89133
2009-11-17 19:32:15 +00:00
Ted Kremenek
92978f8122
Rename test.
...
llvm-svn: 89132
2009-11-17 19:29:41 +00:00
Ted Kremenek
e05d7806ff
Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).
...
llvm-svn: 89131
2009-11-17 19:28:59 +00:00
Jakob Stoklund Olesen
061644a69d
Undo previous test fix. -split-phi-edges now disables automatically when the
...
local register allocator is used.
llvm-svn: 89127
2009-11-17 19:18:32 +00:00
Fariborz Jahanian
d3612399c5
Start support of weak_import objective-c classes.
...
(Radar 6815425).
llvm-svn: 89124
2009-11-17 19:08:08 +00:00
Ken Dyck
19ac306c2c
Replace (-INT8_C(128)), which uses an illegally out-of-range argument for
...
INT8_C, with (-INT8_C(127)-1) in the definition of INT8_MIN. Apply similar
changes to the definitions of INT16_MIN and INT24_MIN.
llvm-svn: 89120
2009-11-17 18:29:12 +00:00
Ted Kremenek
123344e5dd
Allow "source_filename" to be an optional argument (the client can provide NULL). This allows the client to put the source_filename in the command_line_args without fear of the file being named twice.
...
llvm-svn: 89118
2009-11-17 18:18:02 +00:00
Ted Kremenek
1cd27d50b3
Organize c-index-test into logic sections, and add section headers.
...
llvm-svn: 89117
2009-11-17 18:13:31 +00:00
Ted Kremenek
ef3339b7d4
Clean up c-index-test command line usage a bit by requiring a "-test-load-tu" option when testing clang_loadTranslationUnit(). Running c-index-test without the correct arguments now also prints a useful summary of its correct usage.
...
llvm-svn: 89115
2009-11-17 18:09:14 +00:00
Sebastian Redl
6eedcc1b86
Adjust format attribute index for implicit object arguments. Fixes PR5521.
...
llvm-svn: 89113
2009-11-17 18:02:24 +00:00
Douglas Gregor
8ce3321eb6
Implement code completion for Objective-C message sends to "super".
...
llvm-svn: 89112
2009-11-17 17:59:40 +00:00
Fariborz Jahanian
bc02a10ef3
Fixes a typo, reported by Doug.
...
llvm-svn: 89107
2009-11-17 17:15:16 +00:00
Anders Carlsson
6aa503900f
Fix PR5531.
...
llvm-svn: 89106
2009-11-17 17:11:23 +00:00
Douglas Gregor
99fcb0eaa9
Make sure, for sure this time, that expressions do not have reference type
...
llvm-svn: 89104
2009-11-17 16:44:57 +00:00
Douglas Gregor
d3c5d79837
Augment code-completion results to provide argument names and
...
placeholder arguments for Objective-C message sends.
llvm-svn: 89103
2009-11-17 16:44:22 +00:00
Douglas Gregor
ab6ccb5f88
StringRef'ify CodeCompletionString
...
llvm-svn: 89102
2009-11-17 16:43:05 +00:00
Ken Dyck
f78dc738a5
Use the INTn_C integer constant macros to generate limit constants with correct
...
suffixes. This corrects the suffixes for the limit constants of the 32-bit
types on MSP430 and PIC16, and the 64-bit types on PPC64, SystemZ, X86_64.
llvm-svn: 89101
2009-11-17 16:26:27 +00:00
Nuno Lopes
b9ac1dc910
recognize .hpp as c++ (needed for ./configure'ing boost)
...
llvm-svn: 89100
2009-11-17 15:36:35 +00:00
Nuno Lopes
11ab472ba1
add Fedora 11 include path. what a crap..
...
llvm-svn: 89098
2009-11-17 15:28:35 +00:00
Benjamin Kramer
b70e4aba9a
Make test header independent so it doesn't fail on freebsd. I hope this doesn't
...
hurt the intention of the test.
llvm-svn: 89096
2009-11-17 14:02:16 +00:00
Ken Dyck
e115235705
Remove unnecessary parens around the bodies of integer constant macros. C99
...
requires that their arguments be decimal, hex, octal constants---no signs
allowed---making the parens unnecessary.
llvm-svn: 89095
2009-11-17 13:54:02 +00:00
Benjamin Kramer
6018b39dd1
Fix MSVC warning.
...
llvm-svn: 89092
2009-11-17 11:15:38 +00:00
John McCall
afcee245cd
Temporarily unbreak the clang-on-llvm tests. :) Not going to fix unresolved
...
lookup all in a night.
llvm-svn: 89089
2009-11-17 10:36:41 +00:00
Daniel Dunbar
f386ce5429
... and add back a few more triple forces.
...
llvm-svn: 89088
2009-11-17 10:27:58 +00:00
Daniel Dunbar
664a1c2f98
Remove stale reference to old WPA dir, patch by Kovarththanan Rajaratnam.
...
llvm-svn: 89086
2009-11-17 10:15:57 +00:00
Daniel Dunbar
633d5b3ee2
Use clang to run tests which include headers from the system.
...
llvm-svn: 89085
2009-11-17 10:14:55 +00:00
Daniel Dunbar
cba26d4dc5
Add some -triples I was a little too liberal in removing.
...
llvm-svn: 89084
2009-11-17 10:04:38 +00:00
Daniel Dunbar
7e4ae04bed
Merge several visibility tests into hidden-visibility.m, and check .ll output
...
not .s output.
llvm-svn: 89083
2009-11-17 10:04:28 +00:00
Daniel Dunbar
53f6f61c95
Add missed CMake file for adding clang examples to CMake build.
...
llvm-svn: 89080
2009-11-17 09:40:40 +00:00
John McCall
1e9de059cc
Skip over shadow using decls during codegen.
...
llvm-svn: 89079
2009-11-17 09:33:40 +00:00
Daniel Dunbar
2c88b01bb6
Add optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.
...
llvm-svn: 89078
2009-11-17 09:32:51 +00:00
Daniel Dunbar
aca02c2730
Simplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.
...
llvm-svn: 89074
2009-11-17 09:15:57 +00:00
Daniel Dunbar
2208c57116
Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
...
in the driver.
llvm-svn: 89073
2009-11-17 09:15:44 +00:00
Daniel Dunbar
fba0b44d35
Use -fblocks and -fobjc-nonfragile-abi when that is what is being tested, instead of forcing the triple.
...
llvm-svn: 89072
2009-11-17 09:04:12 +00:00
Zhongxing Xu
23baa01af4
Add PreVisitReturn to Malloc checker. Now we can recognize returned memory
...
block.
llvm-svn: 89071
2009-11-17 08:58:18 +00:00
Daniel Dunbar
feedba68b5
Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.
...
llvm-svn: 89070
2009-11-17 08:57:36 +00:00
Daniel Dunbar
f85fabec35
Remove some redundant tests.
...
llvm-svn: 89069
2009-11-17 08:57:06 +00:00
John McCall
7731b855dc
Commit this random test case.
...
llvm-svn: 89068
2009-11-17 08:57:02 +00:00
Daniel Dunbar
4930e3357b
Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
...
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.
llvm-svn: 89065
2009-11-17 08:07:36 +00:00
Daniel Dunbar
f408303a3f
Add driver::types::isObjC predicate.
...
llvm-svn: 89064
2009-11-17 08:07:16 +00:00
Zhongxing Xu
4668c7ed1c
Add EvalEndPath interface to Checker. Now we can check memory leaked at the
...
end of the path. Need to unify interfaces.
llvm-svn: 89063
2009-11-17 07:54:15 +00:00
John McCall
f0f1cf087e
Store "sugared" decls in LookupResults (i.e. decl aliases like using declarations);
...
strip the sugar off in getFoundDecl() and getAsSingleDecl(), but leave it on for
clients like overload resolution who want to use the iterators.
Refactor a few pieces of overload resolution to strip off using declarations in
a single place. Don't do anything useful with the extra context knowledge yet.
llvm-svn: 89061
2009-11-17 07:50:12 +00:00
Zhongxing Xu
f19f251523
Clear the dest set.
...
llvm-svn: 89060
2009-11-17 07:19:51 +00:00
Daniel Dunbar
4656c53e12
Move -fnext-runtime defaulting to driver (and change clang-cc default to
...
-fnext-runtime), instead of using getDefaultLangOptions.
llvm-svn: 89058
2009-11-17 07:07:28 +00:00
Daniel Dunbar
0730e4f7e0
Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
...
llvm-svn: 89057
2009-11-17 07:06:20 +00:00
Ted Kremenek
98524b1ce2
Sort visitor methods. No functionality change.
...
llvm-svn: 89055
2009-11-17 07:02:15 +00:00
Douglas Gregor
5492edc852
Be more careful with anonymous namespaces, since Clang diagnoses the ambiguity here
...
llvm-svn: 89054
2009-11-17 06:52:37 +00:00
Daniel Dunbar
d609b7bbe9
Move char-is-signed defaulting to driver, instead of using
...
getDefaultLangOptions.
llvm-svn: 89053
2009-11-17 06:37:03 +00:00
Ted Kremenek
99b944c037
Add newline at the end of the file.
...
llvm-svn: 89052
2009-11-17 06:34:24 +00:00
Douglas Gregor
120f6a6675
Silence some warnings produced by Clang, and add a missing header
...
llvm-svn: 89051
2009-11-17 06:14:37 +00:00
Douglas Gregor
e0b2866147
Implement template instantiation for using directives, which is dead simple.
...
Also, make the "don't know how to instantiate a particular kind of
declaration" diagnostic nicer, so we don't have to trap Clang in a
debugger to figure out what went wrong.
llvm-svn: 89050
2009-11-17 06:07:40 +00:00
Daniel Dunbar
629f6bb95d
Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
...
- Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.
llvm-svn: 89049
2009-11-17 06:02:29 +00:00
John McCall
3f746828d7
Instead of hanging a using declaration's target decls directly off the using
...
decl, create shadow declarations and put them in scope like normal.
Work in progress.
llvm-svn: 89048
2009-11-17 05:59:44 +00:00
Daniel Dunbar
d6ea9028e7
Simplify PreprocessorOptions, it doesn't need abstracted field access.
...
llvm-svn: 89047
2009-11-17 05:52:41 +00:00
Ted Kremenek
4c4d643b6e
Have clang_getCursorSource() return NULL when the source location is invalid or refers to a built-in buffer. Implements <rdar://problem/7296243>.
...
llvm-svn: 89044
2009-11-17 05:31:58 +00:00
Douglas Gregor
92d8292699
Add missing #include found by Clang
...
llvm-svn: 89043
2009-11-17 05:21:59 +00:00
Douglas Gregor
3fad61786e
Require the object type of a member access expression ("." or "->") to
...
be complete.
llvm-svn: 89042
2009-11-17 05:17:33 +00:00
Daniel Dunbar
a9d7cdf552
Reorder options alphabetically.
...
llvm-svn: 89041
2009-11-17 05:05:17 +00:00
Daniel Dunbar
19b04fff34
Move InitializeAnalyzerOptions for consistency.
...
llvm-svn: 89040
2009-11-17 05:05:08 +00:00
Daniel Dunbar
8870e97dc6
Remove unused NoPreprocess variable.
...
llvm-svn: 89039
2009-11-17 05:04:57 +00:00
Daniel Dunbar
59d964e79f
Remove unused program action.
...
llvm-svn: 89038
2009-11-17 05:04:48 +00:00
Daniel Dunbar
d16ff094f1
Rename CompilerInvocation::DiagOpts -> DiagnosticOpts for consistency.
...
llvm-svn: 89037
2009-11-17 05:04:39 +00:00
Daniel Dunbar
388b9be16b
Add missing defaults to AnalyzerOptions.
...
llvm-svn: 89036
2009-11-17 05:04:28 +00:00
Daniel Dunbar
92881dbe73
Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.
...
llvm-svn: 89035
2009-11-17 05:04:15 +00:00
Anders Carlsson
dee9a30204
Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.
...
llvm-svn: 89034
2009-11-17 04:44:12 +00:00
Anders Carlsson
cfd3012756
More const is always good.
...
llvm-svn: 89033
2009-11-17 03:57:07 +00:00
Zhongxing Xu
aafa1425e9
Add a comment.
...
llvm-svn: 89032
2009-11-17 03:20:08 +00:00
Mike Stump
3afea1d8fe
Fix typo. Thanks Ted.
...
llvm-svn: 89031
2009-11-17 03:01:03 +00:00
Mike Stump
8f5e6770e7
Add typeinfo support for T* and const T* for all builtin types T.
...
llvm-svn: 89030
2009-11-17 02:57:13 +00:00
Ted Kremenek
5b2592ed65
Add test to verify that the analyzer plist output is what we expect.
...
llvm-svn: 89029
2009-11-17 02:31:39 +00:00
Mike Stump
3f75d552a3
Add typeid for the builtin types. WIP.
...
llvm-svn: 89028
2009-11-17 02:16:21 +00:00
John McCall
27b18f8144
Carry lookup configuration throughout lookup on the LookupResult. Give
...
LookupResult RAII powers to diagnose ambiguity in the results. Other diagnostics
(e.g. access control and deprecation) will be moved to automatically trigger
during lookup as part of this same mechanism.
This abstraction makes it much easier to encapsulate aliasing declarations
(e.g. using declarations) inside the lookup system: eventually, lookup will
just produce the aliases in the LookupResult, and the standard access methods
will naturally strip the aliases off.
llvm-svn: 89027
2009-11-17 02:14:36 +00:00
Jakob Stoklund Olesen
4359796e52
Fix tests after enabling -split-phi-edges.
...
object-size.c aws simply too fragile.
constructor-default-arg.cpp triggers an issue when LiveVariables is run before RALocal.
llvm-svn: 89025
2009-11-17 01:47:01 +00:00
Eli Friedman
b0bc559b19
PR5526: Make sure to set the right cast kinds for the inserted implicit casts.
...
llvm-svn: 89023
2009-11-17 01:22:05 +00:00
Douglas Gregor
6c254bf522
When querying type qualifiers on QualType via one of the "non-local"
...
interfaces (which are used throughout the front end), combine the
qualifiers on the QualType instance with the qualifiers on the
canonical type to produce the set of qualifiers that, semantically,
apply to that type. This should design away a large category of
"qualifier-hidden-behind-a-typedef" buts like we saw in PR5383.
Performance-wise, this caused a regression of ~0.5% on Cocoa.h, but
it's totally worth it. We may actually be able to get a little more
performance back by using CanQualType more often.
llvm-svn: 89018
2009-11-17 00:55:50 +00:00
Mike Stump
c2c03349f3
Ensure we peer through () when handling typeid(*p).
...
llvm-svn: 89015
2009-11-17 00:45:21 +00:00
Ted Kremenek
c40943224d
Remove extra space in warn_maynot_respond diagnostic. Fixes <rdar://problem/7364274>.
...
llvm-svn: 89013
2009-11-17 00:35:14 +00:00
Mike Stump
8a5acf1440
Note why this doesn't yet work.
...
llvm-svn: 89012
2009-11-17 00:30:31 +00:00
Mike Stump
61232fd252
Trim spacing.
...
llvm-svn: 89006
2009-11-17 00:14:04 +00:00
Mike Stump
4d0e9095e4
Since we always have 2 edges, we don't need to reserve 3 slot for the
...
PHI node.
llvm-svn: 89005
2009-11-17 00:10:05 +00:00
Mike Stump
e8cdcc9ab0
Minor CFG refinements for typeid and dynamic_cast.
...
llvm-svn: 89004
2009-11-17 00:08:50 +00:00
Eli Friedman
e85ef718d5
Fix up EmitMemberInitializer to handle many more cases.
...
llvm-svn: 88999
2009-11-16 23:53:01 +00:00
Mike Stump
82a1e6184a
Testcase for dynamic_cast.
...
llvm-svn: 88996
2009-11-16 23:36:30 +00:00
Eli Friedman
5e7d969526
Reorganize EmitMemberInitializer to put anonymous unions on the common codepath.
...
llvm-svn: 88995
2009-11-16 23:34:11 +00:00
Eli Friedman
22683fef03
Simplify the AST a bit by skipping creating member initializers for members
...
with a trivial constructor.
llvm-svn: 88990
2009-11-16 23:07:59 +00:00
Eli Friedman
c1daba3ec8
Make member initializers for union members work correctly.
...
llvm-svn: 88989
2009-11-16 22:58:01 +00:00
Mike Stump
6ca0e21de4
Implement dynamic_cast<void*>(E).
...
llvm-svn: 88988
2009-11-16 22:52:20 +00:00
Daniel Dunbar
5e1415156a
Update test, I don't know why this changed but seems innocuous.
...
llvm-svn: 88983
2009-11-16 22:38:57 +00:00
Daniel Dunbar
2cbf4a7d6e
Trim includes.
...
llvm-svn: 88982
2009-11-16 22:38:48 +00:00
Daniel Dunbar
24347f7cda
Store more information in HeaderSearchOptions so that its initialization is not
...
language dependent.
llvm-svn: 88981
2009-11-16 22:38:40 +00:00
Daniel Dunbar
77a9d2b3ec
clang-cc: Eliminate cyclic dependency in initializing CodeGenOptions.
...
llvm-svn: 88980
2009-11-16 22:38:14 +00:00
Eli Friedman
c2ef215bda
Implement a few more cases for copy constructor synthesis.
...
llvm-svn: 88971
2009-11-16 21:47:41 +00:00
Douglas Gregor
1b8fe5b716
First part of changes to eliminate problems with cv-qualifiers and
...
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:
typedef const int CInt;
typedef CInt Self;
Self.isConstQualified() currently returns false!
Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:
- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.
This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()
expressions over to
Context.hasSameUnqualifiedType(T1, T2)
llvm-svn: 88969
2009-11-16 21:35:15 +00:00
Eli Friedman
c08bdea63d
Clean up scalar cast kind handling; make cast kind handling explicitly handle
...
more cases. No intended visible change.
llvm-svn: 88968
2009-11-16 21:33:53 +00:00
Mike Stump
bf44533846
Audit done, all the required casts are already done.
...
llvm-svn: 88966
2009-11-16 21:22:19 +00:00
Devang Patel
37b4b8b1da
revert r88963.
...
llvm-svn: 88965
2009-11-16 21:17:07 +00:00
Devang Patel
b71c28db22
Use TrackingVH to hold forward decl. This one is for RecordType.
...
llvm-svn: 88963
2009-11-16 21:06:35 +00:00
Eli Friedman
00dbf4c3c6
Parallel fix to r88951: use TrackingVH to hold forward decl.
...
llvm-svn: 88962
2009-11-16 21:04:30 +00:00
Sebastian Redl
658262fd26
Repair broken FindCompositePointerType. Correct early termination condition. Get CVR qualifiers from canonical types. Traverse collected qualifiers in reverse order on rebuilding the pointer, so that we don't swap inner and outer qualifiers. That last one fixes PR5509.
...
llvm-svn: 88960
2009-11-16 21:03:45 +00:00
Eli Friedman
b05d0824c6
Fix valgrind uninitialized error.
...
llvm-svn: 88952
2009-11-16 20:33:31 +00:00
Devang Patel
10909d5faf
Use TrackingVH to hold forward decl.
...
llvm-svn: 88951
2009-11-16 20:09:38 +00:00
Ted Kremenek
9dc2d26fdc
Fix condition in LocationCheck::classof(). Thanks to Marius Wachtler for pointing this out!
...
llvm-svn: 88949
2009-11-16 20:06:54 +00:00
Rafael Espindola
abab87936e
Use configure options for searching for libstdc++.
...
llvm-svn: 88945
2009-11-16 19:49:37 +00:00
Mike Stump
4cdedd9d44
Fix members to be public.
...
llvm-svn: 88944
2009-11-16 19:48:50 +00:00
Mike Stump
3d47c2b3c2
Make bots happy.
...
llvm-svn: 88941
2009-11-16 19:34:15 +00:00
Eli Friedman
f2f534d12a
Fix PR5488: special-case the overloaded arrow operator so that we don't try to
...
treat it as a unary operator.
llvm-svn: 88938
2009-11-16 19:13:03 +00:00
David Chisnall
b3b44ce433
Fixed two minor differences between clang and GCC-generated runtime structures for the GNU runtime.
...
llvm-svn: 88937
2009-11-16 19:05:54 +00:00
Fariborz Jahanian
9290ede494
Handle case of missing '@end' in implementation context
...
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.
llvm-svn: 88934
2009-11-16 18:57:01 +00:00
Mike Stump
6fa768df29
Fix spelling for target triplet.
...
llvm-svn: 88928
2009-11-16 18:06:39 +00:00
Anders Carlsson
0d82fa66a5
The ssp and sspreq function attributes should only be applied to function definitions, not declarations or calls.
...
llvm-svn: 88915
2009-11-16 16:56:03 +00:00
Ken Dyck
2dc8d5fa3e
Parameterize the constant-generating macros in stdint.h with new built-in
...
__INTn_C_SUFFIX__ macros that are defined for types with corresponding
constant suffixes (i.e. long and long long).
llvm-svn: 88914
2009-11-16 16:36:33 +00:00
Duncan Sands
7876dad8e7
Pass a value for the isSigned parameter of CreateIntCast, rather than
...
passing the name (an exotic way of specifying that the result is signed!).
llvm-svn: 88909
2009-11-16 13:11:21 +00:00
Mike Stump
65511704f7
Implement most of dynamic_cast. WIP.
...
llvm-svn: 88901
2009-11-16 06:50:58 +00:00
Mike Stump
266ee4a5b3
Try and fix buildbot issue.
...
llvm-svn: 88900
2009-11-16 06:49:10 +00:00
Eli Friedman
49ddc5fb94
Make GetAddrOfConstantStringFromLiteral return a constant of the correct type.
...
This doesn't have any visible effects at the moment because normally the
implicit cast code forces the type to the expected type.
llvm-svn: 88896
2009-11-16 05:55:46 +00:00
Eli Friedman
8c98dffd1f
Some minor cleanup for EmitCastLValue.
...
llvm-svn: 88894
2009-11-16 05:48:01 +00:00
Eli Friedman
03bf60a704
Set the cast kind for a few more code paths.
...
llvm-svn: 88893
2009-11-16 05:44:20 +00:00
Eli Friedman
e6ce354795
Fix a couple of cases where we weren't generating the right kind of call
...
for a call to a virtual function.
llvm-svn: 88891
2009-11-16 05:31:29 +00:00
Eli Friedman
011c4c341b
Implement two-argument form of delete operator.
...
llvm-svn: 88890
2009-11-16 05:16:40 +00:00
Eli Friedman
794d4d8127
Fix test on Linux.
...
llvm-svn: 88889
2009-11-16 05:14:40 +00:00
Zhongxing Xu
731f46264f
* Do the same thing to the basicstore as in r84163.
...
* Add a load type to GRExprEngine::EvalLoad().
* When retrieve from 'theValue' of OSAtomic funcitions, use the type of the
region instead of the argument expression as the load type.
* Then we can convert CastRetrievedSVal to a pure assertion. In the future
we can let all Retrieve() methods simply return SVal.
llvm-svn: 88888
2009-11-16 04:49:44 +00:00
Eli Friedman
141fbf3f36
Add constant evaluation for comma operator with floating-point operand. Fixes
...
PR5449.
llvm-svn: 88885
2009-11-16 04:25:37 +00:00
Zhongxing Xu
223f5119e1
Remove an unused parameter.
...
llvm-svn: 88882
2009-11-16 02:52:18 +00:00
Chandler Carruth
2496fe14ec
Fix a missing include from r88876.
...
llvm-svn: 88879
2009-11-15 23:10:57 +00:00
Anders Carlsson
d787204e6d
When generating the deleting ctor, emit a call to delete.
...
llvm-svn: 88878
2009-11-15 23:03:25 +00:00
Anders Carlsson
2a50e95da4
Make sure that virtual destructors have delete operators.
...
llvm-svn: 88877
2009-11-15 22:49:34 +00:00
Anders Carlsson
1b69be2a8f
Add DeclarationName::dump().
...
llvm-svn: 88876
2009-11-15 22:30:43 +00:00
Mike Stump
4ac39ef6f9
Peer through refernces for typeid. WIP.
...
llvm-svn: 88871
2009-11-15 20:30:39 +00:00
Anders Carlsson
7ade203c6c
Deallocation functions must also be static.
...
llvm-svn: 88859
2009-11-15 19:08:46 +00:00
Anders Carlsson
623e9798df
allocation functions are always static.
...
llvm-svn: 88858
2009-11-15 18:59:32 +00:00
Anders Carlsson
e1d34ba0e4
Factor finding a deallocation function for a record type out into a separate function.
...
llvm-svn: 88857
2009-11-15 18:45:20 +00:00
Mike Stump
a46efbb857
Fix linux buildbots.
...
llvm-svn: 88856
2009-11-15 17:57:00 +00:00
Mike Stump
1bf924b121
Finish off zero check for typeid(*p) so that it will do a __cxa_bad_typeid.
...
llvm-svn: 88852
2009-11-15 16:52:53 +00:00
Anders Carlsson
2c9e274e57
If we find a deallocation function in the class scope, but it is a placement function we should not look for a deallocation function in the global scope.
...
llvm-svn: 88851
2009-11-15 16:43:15 +00:00
Edward O'Callaghan
e9a58b10ad
Add MIPS support to Triple for Linux and the PSP. Credit to Bruno Cardoso Lopes.
...
llvm-svn: 88850
2009-11-15 10:22:07 +00:00
Douglas Gregor
8f3952cda9
When performing a static downcast as part of a static_cast, make sure
...
that we're dealing with canonical types like the documentation say
(yay, CanQualType). Alas, this is another instance where using
getQualifiers() on a non-canonical QualType got us in trouble.
Good news: with this fix, Clang can now parse all of its own headers!
llvm-svn: 88848
2009-11-15 09:20:52 +00:00
Douglas Gregor
598caeee37
Don't gratuitously mark the default constructors of base or member initializers as used
...
llvm-svn: 88847
2009-11-15 08:51:10 +00:00