Commit Graph

6647 Commits

Author SHA1 Message Date
John McCall ab8c273b4f Access control for implicit calls to copy assignment operators and copy
constructors from implicitly-defined members.

llvm-svn: 98614
2010-03-16 06:11:48 +00:00
Douglas Gregor 00a0cf70d9 Don't consume tokens past the end-of-file in an @interface. Fixes
<rdar://problem/7735566>.

llvm-svn: 98613
2010-03-16 06:04:47 +00:00
John McCall f857e0bbe7 Perform access control even for the implicit destructor calls from implicit
destructor definitions.  Remove some code duplication.

llvm-svn: 98611
2010-03-16 05:36:30 +00:00
John McCall 1064d7ef29 Perform access control for the implicit base and member destructor calls
required when emitting a destructor definition.

llvm-svn: 98609
2010-03-16 05:22:47 +00:00
Douglas Gregor 7bda4b8310 Introduce optional "Invalid" parameters to routines that invoke the
SourceManager's getBuffer() and, therefore, could fail, along with
Preprocessor::getSpelling(). Use the Invalid parameters in the literal
parsers (string, floating point, integral, character) to make them
robust against errors that stem from, e.g., PCH files that are not
consistent with the underlying file system.

I still need to audit every use caller to all of these routines, to
determine which ones need specific handling of error conditions.

llvm-svn: 98608
2010-03-16 05:20:39 +00:00
Ted Kremenek e01bec9791 Add 'expected-note'
llvm-svn: 98560
2010-03-15 18:47:29 +00:00
Ted Kremenek 679708ee34 Correctly determine if the @property has been previously declared. If
a property has the same name as the ivar it wraps then the old logic
wouldn't find the previous property declaration.

llvm-svn: 98559
2010-03-15 18:47:25 +00:00
Fariborz Jahanian b397e43dea objective-c++ must take into account qualifiers when
considering valid objc pointer converions.

llvm-svn: 98557
2010-03-15 18:36:00 +00:00
Douglas Gregor ea16606fcd During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.

llvm-svn: 98546
2010-03-15 15:26:48 +00:00
Douglas Gregor 6623006249 Implement C++ [temp.local]p8, which specifies that a template
parameter hides a namespace-scope declararion with the same name in an
out-of-line definition of a template. The lookup requires a strange
interleaving of lexical and semantic scopes (go C++), which I have not
yet handled in the typo correction/code completion path.

Fixes PR6594.

llvm-svn: 98544
2010-03-15 14:33:29 +00:00
John McCall c33dec3664 Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.
llvm-svn: 98541
2010-03-15 10:54:44 +00:00
John McCall 1e3a1a7eff Remember access paths for visible conversion decls.
llvm-svn: 98539
2010-03-15 09:07:48 +00:00
Douglas Gregor b14d123774 Give explicit template instantiations weak ODR linkage. Former
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.

llvm-svn: 98441
2010-03-13 18:23:07 +00:00
Rafael Espindola 13327bbe55 Fix PR6562. If a type is dependent, we don't know if it will have implicit
destructors.

llvm-svn: 98440
2010-03-13 18:12:56 +00:00
Douglas Gregor 17b76185f1 Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent
llvm-svn: 98425
2010-03-13 03:49:57 +00:00
Douglas Gregor 89cae0f224 Reinstate patch to turn explicit template instantiations into weak symbols
llvm-svn: 98424
2010-03-13 03:14:19 +00:00
John McCall 44c064be73 Check compatibility of vector types using their canonicalizations.
Fixes an assertion arising C overload analysis, but really I can't imagine
that this wouldn't cause a thousand other uncaught failures.

Fixes PR6600.

llvm-svn: 98400
2010-03-12 23:14:13 +00:00
John McCall c493a73240 Improve the unused-value check to look into comma expressions and filter out
voids in sub-expressions.  Patch by Mike M!

Fixes PR4806.

llvm-svn: 98335
2010-03-12 07:11:26 +00:00
Douglas Gregor 539bc40906 Revert the linkage change for explicit template instantiations; something is amiss
llvm-svn: 98332
2010-03-12 05:13:59 +00:00
Douglas Gregor ee3f72299c Give explicit template instantiations weak linkage (but don't defer
them). Fixes PR6578.

llvm-svn: 98328
2010-03-12 04:49:06 +00:00
John McCall 9caafbc5ca Add an extra test to this test-case.
llvm-svn: 98322
2010-03-12 01:20:21 +00:00
John McCall 16927f6274 Implement basic support for friend types and functions in non-dependent
contexts.

llvm-svn: 98321
2010-03-12 01:19:31 +00:00
John McCall 71d8d9b468 Warn about comparing an unsigned expression with 0 in tautological ways.
Patch by mikem!

llvm-svn: 98279
2010-03-11 19:43:18 +00:00
John McCall 6b0dcd9dd1 Remember the PR number.
llvm-svn: 98276
2010-03-11 19:33:57 +00:00
John McCall e40b58ec2f Implement -Wmissing-field-initializers. Patch by mikem!
llvm-svn: 98275
2010-03-11 19:32:38 +00:00
Daniel Dunbar 44e51ea41f Use -emit-llvm-only, to avoid leaving a temp around.
llvm-svn: 98267
2010-03-11 18:23:02 +00:00
Fariborz Jahanian 3a106e7029 Add tentative support for accessing local variables with
external linkage (static, extern, etc.) in blocks in
rewriter. wip.

llvm-svn: 98265
2010-03-11 18:20:03 +00:00
Chris Lattner 9723d6c699 fix PR6433, crash on va_arg of typedef.
llvm-svn: 98264
2010-03-11 18:19:55 +00:00
Rafael Espindola 4d5c3d99e5 Correctly mangle address of member in template arguments. Fixes PR6460
llvm-svn: 98254
2010-03-11 14:07:00 +00:00
John McCall 45d878b0f0 Fix a self-host problem caused by this over-eager assertion. I'm not sure
there's a good equivalent that's actually true, unfortunately.

llvm-svn: 98253
2010-03-11 09:33:17 +00:00
Anders Carlsson 3521552ebe Add a test.
llvm-svn: 98246
2010-03-11 06:44:31 +00:00
Anders Carlsson 423406f335 Fix calculation of whether a member function needs a thunk in construction vtables.
llvm-svn: 98191
2010-03-10 21:25:37 +00:00
Fariborz Jahanian a4a925febb Change the 'super' messaging API in the rewriter.
Fixes radar 7738452.

llvm-svn: 98190
2010-03-10 21:17:41 +00:00
Anders Carlsson 115b4756b5 We were mistakenly marking morally virtual bases as being uninteresting. Fix this.
llvm-svn: 98180
2010-03-10 19:39:11 +00:00
Anders Carlsson 703a08605f Ignore non-interesting bases when emitting construction vtables.
llvm-svn: 98177
2010-03-10 19:15:26 +00:00
Rafael Espindola e81620fb88 Move test and also test codegen.
llvm-svn: 98154
2010-03-10 14:01:14 +00:00
John McCall 85f9055955 When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.

llvm-svn: 98149
2010-03-10 11:27:22 +00:00
Anders Carlsson 45be0e069d Add newline.
llvm-svn: 98140
2010-03-10 06:51:56 +00:00
Anders Carlsson 804cf51dcf Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.
llvm-svn: 98139
2010-03-10 06:51:42 +00:00
Zhongxing Xu 1bb6a1a593 Add use-after-free check to MallocChecker.
llvm-svn: 98136
2010-03-10 04:58:55 +00:00
Douglas Gregor 6cf3f3c75e Statement expressions can be used in global- or namespace-scoped blocks
llvm-svn: 98135
2010-03-10 04:54:39 +00:00
John McCall e78aac41de Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type;  the canonical type is still a template 
specialization type.  This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.     

llvm-svn: 98134
2010-03-10 03:28:59 +00:00
Rafael Espindola 69902a0a0d add missing test
llvm-svn: 98129
2010-03-10 02:43:01 +00:00
Anders Carlsson ca82a4fdba Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.
llvm-svn: 98127
2010-03-10 02:33:41 +00:00
Rafael Espindola e7113ca907 Delay codegen of vtables when handling implicit instantiations.
This fixes PR6474.

llvm-svn: 98123
2010-03-10 02:19:29 +00:00
Ted Kremenek 575398e29b When computing in AnalysisContext the variables referenced
by a block, also look at the contained blocks.

llvm-svn: 98111
2010-03-10 00:18:11 +00:00
Devang Patel 93f274c161 Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.
llvm-svn: 98096
2010-03-09 22:49:11 +00:00
Fariborz Jahanian eb1690d2bd Fix the test some more.
llvm-svn: 98090
2010-03-09 22:17:52 +00:00
Fariborz Jahanian 9d227a1d5e See if this test makes it though buildbot.
llvm-svn: 98087
2010-03-09 21:50:08 +00:00
Devang Patel 4f26205ba8 More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.
This fixes PR 6554.

llvm-svn: 98083
2010-03-09 21:32:27 +00:00