Commit Graph

11367 Commits

Author SHA1 Message Date
Ted Kremenek 4e81c3ccac Allow two codepaths for PathDiagnostic generation. This patch mainly consists of
refactoring to make this possible (no functionality change).

llvm-svn: 68141
2009-03-31 20:22:36 +00:00
Douglas Gregor b046ffb002 Some cleanup and renaming. No functionality change
llvm-svn: 68140
2009-03-31 20:22:05 +00:00
Daniel Dunbar a207254f94 Driver: Add extra parameters for help text to option definitions.
- Currently unused.

And yes, now may be about the time I want a TableGen backend.

llvm-svn: 68139
2009-03-31 20:12:05 +00:00
Daniel Dunbar 4cb6715434 Add two FIXMEs
llvm-svn: 68138
2009-03-31 20:10:05 +00:00
Douglas Gregor 7ef46d9ae2 Improve the dependent nested-name-specifier test a bit
llvm-svn: 68136
2009-03-31 20:07:16 +00:00
Daniel Dunbar 35579146aa x86_32 Darwin ABI: Treat empty unions like empty structures.
- Current return-arguments-32 status: 15/1000 failures

llvm-svn: 68132
2009-03-31 19:01:39 +00:00
Ted Kremenek 7b4df3c3e6 Rename clang.[cpp,h] to clang-cc.[cpp,h] to reflect the name change of the
low-level frontend driver.

llvm-svn: 68131
2009-03-31 18:58:14 +00:00
Ted Kremenek 97823d32ea Update VS project.
llvm-svn: 68130
2009-03-31 18:57:19 +00:00
Douglas Gregor aa59489b18 Implement template instantiation for template names, including both
template template parameters and dependent template names. For
example, the oft-mentioned

  typename MetaFun::template apply<T1, T2>::type

can now be instantiated, with the appropriate name lookup for "apply".

llvm-svn: 68128
2009-03-31 18:38:02 +00:00
Fariborz Jahanian 89d239796a Patch to fix proptocol reference ir-gen for GNU runtime.
Patch by David Chisnal.

llvm-svn: 68125
2009-03-31 18:27:22 +00:00
Fariborz Jahanian 63a224ad59 ir-gen support for nonfragile abi's synthesized ivars.
llvm-svn: 68122
2009-03-31 18:11:23 +00:00
Daniel Dunbar 8eb473c477 Driver: Call 'as' directly on FreeBSD.
- Patch by Ed Schouten!

llvm-svn: 68121
2009-03-31 17:45:15 +00:00
Daniel Dunbar d640be24fd (LLVM up) Update to use llvm::sys::getHostTriple().
- Always pass -triple to clang-cc (-arch will be removed).

 - clang-cc doesn't play guess work with the target triple anymore.

llvm-svn: 68119
2009-03-31 17:35:15 +00:00
Steve Naroff 1bf3b718cd Add -Wdeprecated-declarations to driver and add a test case.
llvm-svn: 68117
2009-03-31 17:28:26 +00:00
Anders Carlsson 452e1c8a6a We fully support namespace aliases now.
llvm-svn: 68116
2009-03-31 17:17:14 +00:00
Fariborz Jahanian 3254a6f94c More toward nonfragile abi's synthesized ivars.
llvm-svn: 68115
2009-03-31 17:00:52 +00:00
Steve Naroff 66afeb5968 Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.
Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).

llvm-svn: 68114
2009-03-31 16:53:37 +00:00
Douglas Gregor f1b876d5de Implement -Wmissing-prototypes. Fixes PR3911.
llvm-svn: 68110
2009-03-31 16:35:03 +00:00
Steve Naroff ea9a107ada Add support for -Wdeprecated-declarations.
This fixes <rdar://problem/6712496> Unable to disable deprecated warning.

llvm-svn: 68108
2009-03-31 15:00:11 +00:00
Steve Naroff f2a880ca22 Incorporate feedback from Eli.
llvm-svn: 68107
2009-03-31 10:29:45 +00:00
Chris Lattner 8b14b98bab Fix a problem in ASTContext::addRecordToClass handling forward declarations.
In a case like:

@class foo;
foo *P;

addRecordToClass was making an empty shadow struct for the foo interface and
completing it.  Later when an:

@interface foo
...
@endif

foo *Q;

was seen, ASTContext::addRecordToClass would think that foo was already laid
out and not lay out the definition.  This fixes it to create a forward declared
struct the first time around, then complete it when the definition is seen.

Note that this causes two tests to regress, because something is trying to get
the size of the forward declared structs returned by this.  Previously, this
would end up getting a size of zero but now it properly dies.  I'm not sure
what the right solution is for this, so I xfailed the tests.

Fariborz, please take a look at this.  The testcase in rdar://6676794 now gets
farther, but dies later because the objc ivar is not assigned a field number.

As an aside, I really don't like the fact that the objc front-end is creating
shadow C structs for ObjC types.  This seems like an implementation detail of
the code generator that could be fixed by better factoring of the extant code.

llvm-svn: 68106
2009-03-31 09:24:30 +00:00
Chris Lattner 05aa49128c remove a dead prototype
llvm-svn: 68105
2009-03-31 09:07:15 +00:00
Chris Lattner 733dc19be6 remove the warning. We don't control what users do, and this code
is run for perfectly reasonable things like NSString* because type
layout is recursive.

llvm-svn: 68104
2009-03-31 09:04:50 +00:00
Chris Lattner 6d35cc945f disable copying of Type objects.
llvm-svn: 68103
2009-03-31 08:58:42 +00:00
Chris Lattner 3e2f36e905 do not *copy* objc interface types, just use their reference.
llvm-svn: 68102
2009-03-31 08:55:07 +00:00
Chris Lattner 5b36ddb1ad fill in temporary smallvectors instead of vectors for performance.
Fix BuildAggrIvarLayout to not access vectors out of range.

llvm-svn: 68101
2009-03-31 08:48:01 +00:00
Chris Lattner d8a47c42cd simplify some casting
llvm-svn: 68098
2009-03-31 08:36:08 +00:00
Chris Lattner 06ae0e2c3b small cleanups.
llvm-svn: 68095
2009-03-31 08:33:16 +00:00
Chris Lattner f71b69f7f3 add a const version of the lookupFieldDeclForIvar method.
llvm-svn: 68094
2009-03-31 08:31:13 +00:00
Chris Lattner fe4847e331 reduce nesting.
llvm-svn: 68091
2009-03-31 08:18:48 +00:00
Chris Lattner 5d68896c7b Codegen sometimes crashes on comparisons that aren't legal, just
disable this feature for now, to err on the side of rejecting instead
of sometimes crashing.  rdar://6326239

llvm-svn: 68088
2009-03-31 07:46:52 +00:00
Anders Carlsson dafd621b22 Check in test for namespace aliases+using directives.
llvm-svn: 68086
2009-03-31 05:47:19 +00:00
Anders Carlsson 10b9f81eaf Document NamespaceAliasDecl.
llvm-svn: 68085
2009-03-31 04:51:13 +00:00
Ted Kremenek f0ec333fc1 Update test case.
llvm-svn: 68084
2009-03-31 03:34:38 +00:00
Douglas Gregor b67535d1b6 Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in

  typename MetaFun::template apply<T1, T2>::type

At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.

llvm-svn: 68081
2009-03-31 00:43:58 +00:00
Fariborz Jahanian b35b4a9b42 fe support for objc2's nonfragile-abi synthesized ivars.
llvm-svn: 68077
2009-03-31 00:06:29 +00:00
Steve Naroff 7b753d21b5 Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.
From a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn't appear to handle them). Will be investigating.

llvm-svn: 68076
2009-03-30 23:46:03 +00:00
Eli Friedman 29f80c343b Slight generalization for Evaluate with const variables.
llvm-svn: 68075
2009-03-30 23:39:01 +00:00
Douglas Gregor dc572a3266 Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").

One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as

  std::(vector<int>)

we represent it as

  (std::vector)<int>

which more closely follows the C++ grammar. 

Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.

llvm-svn: 68074
2009-03-30 22:58:21 +00:00
Ted Kremenek 89cc8ea794 Add partial CFG support for Objective-C exception-handling blocks. We basically
assume that @catch blocks are never executed.

llvm-svn: 68072
2009-03-30 22:29:21 +00:00
Ted Kremenek 7857bd2743 Re-apply 68028. The code had drifted enough that the tests would fail without
it.  Will discuss offline whether symbolic regions should by typed or typeless.

llvm-svn: 68070
2009-03-30 22:20:54 +00:00
Daniel Dunbar cbe5b2f800 Comment fix.
llvm-svn: 68069
2009-03-30 22:11:38 +00:00
Ted Kremenek 5715393da2 Revert 68028.
llvm-svn: 68068
2009-03-30 21:56:17 +00:00
Fariborz Jahanian 6683b8a272 Added new info to property impl. AST node to support
objc2's ivar synthesis.

llvm-svn: 68064
2009-03-30 21:33:50 +00:00
Ted Kremenek 3cd88e5d99 Remove dead code.
llvm-svn: 68063
2009-03-30 21:27:41 +00:00
Eli Friedman 1a4029c5df Implement -Wno-pointer-sign.
llvm-svn: 68062
2009-03-30 21:19:48 +00:00
Daniel Dunbar e24297c6b5 Driver: Sketch FreeBSD tool chain.
- Patch by Ed Schouten!

llvm-svn: 68061
2009-03-30 21:06:03 +00:00
Fariborz Jahanian ed308a94da Code gen does not yet supports __asm__ on a variable
declaration. Reject it.

llvm-svn: 68058
2009-03-30 20:32:06 +00:00
Ted Kremenek ac508988a5 Simplify more code by using SVal::getAsSymbol().
llvm-svn: 68052
2009-03-30 19:53:37 +00:00
Ted Kremenek 248fd2bc24 Simplify more code by using SVal::getAsSymbol() instead of
loc::SymbolVal/nonloc::SymbolVal probing.

llvm-svn: 68049
2009-03-30 18:45:36 +00:00