summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug I introduced with assinging a temporary to a StringRef.Ted Kremenek2010-02-121-2/+2
| | | | llvm-svn: 96041
* restructure code a bit: there are two potential issuesChris Lattner2010-02-121-11/+15
| | | | | | | | | | | | worth asserting about in this code: 1) if the source range is bogus (begin loc after end loc), and 2) if the client is trying to highlight a range that is purely whitespace. It is possible to just silently ignore #2, but it seems like it is always a bug, so lets keep asserting on this condition, but with a better assert message. llvm-svn: 95998
* Fixes a rewriter bug rewriting function decl.Fariborz Jahanian2010-02-121-2/+14
| | | | | | | with block-pointer-type as one or more of its arguments. Fixes radar 7638400. llvm-svn: 95992
* Improve representation of tag declarations first declared or definedDouglas Gregor2010-02-122-2/+2
| | | | | | within the declarator of another declaration, from Enea Zaffanella! llvm-svn: 95991
* Implementing unused function warning.Tanya Lattner2010-02-122-0/+25
| | | | llvm-svn: 95940
* Fixes a rewriting bug where order of constructor expression arguments did ↵Fariborz Jahanian2010-02-111-15/+28
| | | | | | | | | | not match order of constructor arguments (all block API specific). This was exposed only in a large block literal expression in a large file where PtrSet container size execceded its limit and required reallocation. Fixes radar 7638294 llvm-svn: 95936
* Allocate the SubExprs array in ObjCMessageExpr using the allocator ↵Ted Kremenek2010-02-111-2/+2
| | | | | | associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). llvm-svn: 95930
* When AST merging for record declarations fails, warn about theDouglas Gregor2010-02-111-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | incompatibility and show where the structural differences are. For example: struct1.c:36:8: warning: type 'struct S7' has incompatible definitions in different translation units struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here struct S7 { int i : 8; unsigned j : 8; } x7; ^ struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here struct S7 { int i : 8; unsigned j : 16; } x7; ^ There are a few changes to make this work: - ASTImporter now has only a single Diagnostic object, not multiple diagnostic objects. Otherwise, having a warning/error printed via one Diagnostic and its note printed on the other Diagnostic could cause the note to be suppressed. - Implemented import functionality for IntegerLiteral (along with general support for statements and expressions) llvm-svn: 95900
* Check in the beginnings of my new vtable layout builder idea.Anders Carlsson2010-02-111-1/+2
| | | | | | | | Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code. I've also added a very simple new vtable layout test case. llvm-svn: 95865
* Use the allocator associated with ASTContext to allocate the argsTed Kremenek2010-02-111-1/+1
| | | | | | | | array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
* Remove use of 'std::string' from Attr objects, using instead a byteTed Kremenek2010-02-111-2/+2
| | | | | | | | | array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> llvm-svn: 95853
* Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor2010-02-112-5/+5
| | | | | | Decl subclasses. No functionality change. llvm-svn: 95841
* Eliminate the ASTContext parameter from RecordDecl::getDefinition()Douglas Gregor2010-02-111-1/+1
| | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836
* Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's ↵Ted Kremenek2010-02-111-2/+6
| | | | | | BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>. llvm-svn: 95834
* Patch to rewrite blocks into unique api names.Fariborz Jahanian2010-02-101-13/+16
| | | | | | Fixes radar 7630551 llvm-svn: 95796
* Implement basic support for merging function declarations acrossDouglas Gregor2010-02-101-3/+10
| | | | | | translation units. llvm-svn: 95794
* Provide rewriting suppport for use of __typeof__Fariborz Jahanian2010-02-101-1/+43
| | | | | | in a declaration statement. Fixes radar 7628153. llvm-svn: 95788
* Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixesDaniel Dunbar2010-02-101-0/+2
| | | | | | | calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling, for Darwin ARM. llvm-svn: 95787
* clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.Daniel Dunbar2010-02-103-0/+6
| | | | llvm-svn: 95785
* Teach AST merging that variables with incomplete array types can beDouglas Gregor2010-02-101-2/+4
| | | | | | | | merged with variables of constant array types. Also, make sure that we call DiagnosticClient's BeginSourceFile/EndSourceFile, so that it has a LangOptions to work with. llvm-svn: 95782
* Comment out category's property decls. in rewrite.Fariborz Jahanian2010-02-101-0/+4
| | | | | | Fixes radar 7630636. llvm-svn: 95744
* Implement basic support for importing source locations from one ASTDouglas Gregor2010-02-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | into another AST, including their include history. Here's an example error that involves a conflict merging a variable with different types in two translation units (diagnosed in the third AST context into which everything is merged). /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5: error: external variable 'x2' declared with incompatible types in different translation units ('int' vs. 'double') int x2; ^ In file included from /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3: /Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8: note: declared here with type 'double' double x2; ^ Although we maintain include history, we do not maintain macro instantiation history across a merge. Instead, we map down to the spelling location (for now!). llvm-svn: 95732
* Hook up the diagnostics-argument printer when merging AST files, soDouglas Gregor2010-02-091-5/+10
| | | | | | | | | | | that we get readable diagnostics such as: error: external variable 'x1' declared with incompatible types in different translation units ('double *' vs. 'float **') However, there is no translation of source locations, yet. llvm-svn: 95704
* Implement synthesizing properties by default.Fariborz Jahanian2010-02-093-1/+11
| | | | | | | | | This is a non-fragile-abi feature only. Since it breaks existing code, it is currently placed under -fobjc-nonfragile-abi2 option for test purposes only until further notice. WIP. llvm-svn: 95685
* Introduce a testbed for merging multiple ASTs into a single ASTDouglas Gregor2010-02-093-0/+104
| | | | | | | context with the AST importer. WIP, still useless but at least it has a test. llvm-svn: 95683
* Keep track of whether a tag was defined in a declarator vs. beingDouglas Gregor2010-02-082-0/+2
| | | | | | defined by itself, from Enea Zaffanella! llvm-svn: 95586
* Roll r95513 back in.Sam Weinig2010-02-073-0/+45
| | | | llvm-svn: 95515
* Roll out r95513, it seems to have broken self hosting.Sam Weinig2010-02-073-45/+0
| | | | llvm-svn: 95514
* Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.Sam Weinig2010-02-073-0/+45
| | | | llvm-svn: 95513
* Add attributes to namespace decls.Anders Carlsson2010-02-071-1/+2
| | | | llvm-svn: 95510
* Add support for threadsafe statics, and make them the default (matching gcc).Anders Carlsson2010-02-061-3/+5
| | | | | | Daniel, I'd appreciate a review of the driver/cc1 parts. llvm-svn: 95508
* Add guard in RewriteObjC::HandleTopLevelSingleDecl() to not doTed Kremenek2010-02-051-5/+3
| | | | | | | anything when Sema has issued an error. This matches the behavior in RewriteObjC::HandleTranslationUnit(). llvm-svn: 95434
* Fixes a minor rewriter bug messaging inside a function call.Fariborz Jahanian2010-02-051-1/+5
| | | | | | Fixes radar 7617047. llvm-svn: 95392
* Some clean up of replacement text API no longer needed byFariborz Jahanian2010-02-051-2/+2
| | | | | | my recent changes. llvm-svn: 95391
* Tweak inliner thresholds to match llvm-gcc, see r95321.Daniel Dunbar2010-02-051-3/+3
| | | | llvm-svn: 95379
* Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.Ted Kremenek2010-02-051-6/+6
| | | | llvm-svn: 95348
* Fix a nested ivar reference rewriting bug.Fariborz Jahanian2010-02-051-13/+40
| | | | | | (Fixes radar 7607605). llvm-svn: 95341
* First stage of adding AltiVec supportJohn Thompson2010-02-052-3/+7
| | | | llvm-svn: 95335
* Fix rewriting of 'const' __block variables inFariborz Jahanian2010-02-041-2/+16
| | | | | | the rewriter. (Fixes radar 7607781). llvm-svn: 95267
* Fix more rewriting of protocol-quialified 'id' type.Fariborz Jahanian2010-02-031-0/+2
| | | | | | (Fixes radar 7607413). llvm-svn: 95257
* update for llvm api change.Chris Lattner2010-02-031-2/+1
| | | | llvm-svn: 95203
* clang -cc1: Wire up -emit-obj, for emitting object files.Daniel Dunbar2010-02-033-8/+15
| | | | llvm-svn: 95182
* update for llvm api changes.Chris Lattner2010-02-021-3/+3
| | | | llvm-svn: 95125
* update for llvm api change.Chris Lattner2010-02-021-6/+0
| | | | llvm-svn: 95110
* Fix up rewriting of protocol qualified types in objc rewriter.Fariborz Jahanian2010-02-021-1/+9
| | | | | | Fixes radar 7589414. llvm-svn: 95097
* Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.Daniel Dunbar2010-02-011-0/+3
| | | | llvm-svn: 95004
* Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the ↵Sebastian Redl2010-01-312-8/+5
| | | | | | logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list. llvm-svn: 94968
* Use IdentifierInfo * instead of std::string for the AsmStmt names.Anders Carlsson2010-01-303-6/+6
| | | | llvm-svn: 94925
* ASTUnit: Ensure the CompilerInvocation object used in LoadFromCommandLine isDaniel Dunbar2010-01-301-7/+12
| | | | | | | | | live as long as the ASTUnit. This is useful for clients which want to maintain pointers to the LangOptions object which ultimately lives in the CompilerInvocation, although it would be nice to make all of this ownership stuff more explicit and obvious. llvm-svn: 94924
* CompilerInstance: Change to not contain the CompilerInvocation object.Daniel Dunbar2010-01-301-2/+7
| | | | | | | | This allows clients to install their own CompilerInvocation object, which is important for clients that may wish to create references to things like LangOptions whose lifetime will extend past that of the CompilerInstance. llvm-svn: 94923
OpenPOWER on IntegriCloud