summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Prevent rewriter crash when variable type is missing.Fariborz Jahanian2010-02-261-0/+4
| | | | | | Fixes radar 7692183. llvm-svn: 97281
* Minor cleanup of the rewriter.Fariborz Jahanian2010-02-261-18/+22
| | | | llvm-svn: 97280
* Removed some unused code in rewriter.Fariborz Jahanian2010-02-261-28/+2
| | | | llvm-svn: 97274
* Fix rewriting of byref variables in nested blocks.Fariborz Jahanian2010-02-261-2/+9
| | | | | | Fixes radar 7692350. llvm-svn: 97254
* Rewriting of imported variable from outerFariborz Jahanian2010-02-261-0/+1
| | | | | | | blocks's argument in the inner block requires special treatment. Fixes radar 7692419. llvm-svn: 97244
* Support rewriting of property synthesis with retain/copyFariborz Jahanian2010-02-261-25/+98
| | | | | | attributes. Fixes radar 7214439. llvm-svn: 97203
* Move ~CodeGenAction out-of-line.Daniel Dunbar2010-02-251-0/+2
| | | | llvm-svn: 97166
* Update CMake makefilesDouglas Gregor2010-02-251-1/+1
| | | | llvm-svn: 97113
* Frontend: Add CodeGenAction::takeModule().Daniel Dunbar2010-02-251-8/+26
| | | | llvm-svn: 97111
* Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.Daniel Dunbar2010-02-252-55/+54
| | | | | | | | | | This is the way I would like to move the frontend function towards -- distinct pieces of functionality should be exposed only via FrontendAction implementations which have clean and relatively-stable APIs. This also isolates the surface area in clang which depends on LLVM CodeGen. llvm-svn: 97110
* Add TextDiagnosticPrinter::setPrefix, for adding a string to prefix diagnosticDaniel Dunbar2010-02-251-1/+4
| | | | | | messages with. llvm-svn: 97101
* Implement nasty rewriting of nested blocks when innerFariborz Jahanian2010-02-241-4/+76
| | | | | | | blocks use variables not used in any of the outer blocks. (Fixes radar 7682149). llvm-svn: 97073
* Fix rewriting of a method when return type isFariborz Jahanian2010-02-241-0/+4
| | | | | | a block pointer type. Fixes radar 7682149. llvm-svn: 97008
* Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola2010-02-232-1/+2
| | | | | | llvm-gcc does, but are more strict on what uses of weakref we accept. llvm-svn: 96992
* Fixes a rewriting of qualified-id type which exposed a biggerFariborz Jahanian2010-02-231-5/+0
| | | | | | rewriting problem. Fixes radar 7680953. llvm-svn: 96987
* Fixes a rewriting of byref variable when its initializer isFariborz Jahanian2010-02-221-13/+29
| | | | | | itself rewritten. Radar 7669784. llvm-svn: 96798
* Eliminate the default arguments to ASTContext::getFunctionType(),Douglas Gregor2010-02-211-13/+37
| | | | | | | | fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. llvm-svn: 96766
* Implement PCH support for C++ namespaces.Douglas Gregor2010-02-212-0/+28
| | | | llvm-svn: 96738
* Revert: "Change InitListExpr to allocate the array for holding references"Ted Kremenek2010-02-192-12/+8
| | | | | | | | This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. llvm-svn: 96652
* Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall2010-02-191-0/+3
| | | | | | command-line option which defaults off. llvm-svn: 96649
* Change InitListExpr to allocate the array for holding referencesTed Kremenek2010-02-192-8/+12
| | | | | | | | | | | | | | | | to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. llvm-svn: 96642
* Patch removes IVars list from ObjCInterfaceDecl andFariborz Jahanian2010-02-192-4/+3
| | | | | | instead relies on their DeclContext for iteration, etc. llvm-svn: 96638
* Teach ASTUnit to keep track of temporary files, then delete them whenDouglas Gregor2010-02-181-3/+3
| | | | | | the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>. llvm-svn: 96628
* Rework how CIndex handles diagnostics. Rather than using a callback,Douglas Gregor2010-02-182-8/+63
| | | | | | | | | | | | | | | | | | we attach diagnostics to translation units and code-completion results, so they can be queried at any time. To facilitate this, the new StoredDiagnostic class stores a diagnostic in a serializable/deserializable form, and ASTUnit knows how to capture diagnostics in this stored form. CIndex's CXDiagnostic is a thin wrapper around StoredDiagnostic, providing a C interface to stored or de-serialized diagnostics. I've XFAIL'd one test case temporarily, because currently we end up storing diagnostics in an ASTUnit that's never returned to the user (because it contains errors). I'll introduce a temporary fix for this soon; the real fix will be to allow us to return and query invalid ASTs. llvm-svn: 96592
* __typeof should be able to handle block pointer types whenFariborz Jahanian2010-02-181-1/+1
| | | | | | rewriting. Fixes radar 7659483. llvm-svn: 96549
* Sort cases.Ted Kremenek2010-02-181-2/+2
| | | | llvm-svn: 96536
* Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes toTed Kremenek2010-02-182-2/+6
| | | | | | | match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. llvm-svn: 96535
* Add IBAction attribute to keep the IBOutlet attribute company.Ted Kremenek2010-02-172-0/+5
| | | | llvm-svn: 96447
* when a diagnostic is an extension and has no other -W flag, Chris Lattner2010-02-161-1/+4
| | | | | | | | | | | | indicate that it was enabled with -pedantic so people know why they're getting them: $ printf "int x;" | clang -xc - -pedantic <stdin>:1:7: warning: no newline at end of file [-pedantic] int x; ^ llvm-svn: 96365
* Minor rewriter cleanup and a test for a block rewriting bug.Fariborz Jahanian2010-02-161-1/+1
| | | | llvm-svn: 96361
* Fix rewriter bug when function call inside block with block parameter Fariborz Jahanian2010-02-161-4/+41
| | | | | | causes C++ compile error (radar 7651312). llvm-svn: 96352
* ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support ↵Daniel Dunbar2010-02-162-6/+4
| | | | | | this as an argument. llvm-svn: 96316
* ASTUnit::LoadFromCompilerInvocation - Take ownership of the provided invocation.Daniel Dunbar2010-02-161-7/+4
| | | | llvm-svn: 96315
* CompilerInstance: Move LLVMContext member out of constructor.Daniel Dunbar2010-02-161-7/+6
| | | | llvm-svn: 96314
* Don't import __va_list_tag or __builtin_va_list when mergingDouglas Gregor2010-02-161-0/+6
| | | | llvm-svn: 96299
* Tell ASTMerge to merge every declaration it sees, rather than cherry-picking ↵Douglas Gregor2010-02-151-15/+1
| | | | | | those declarations that we know will work. llvm-svn: 96280
* Fix a broken rewritin of @implementation keyword.Fariborz Jahanian2010-02-151-1/+1
| | | | | | (fixes radar 7649577). llvm-svn: 96270
* Change LLVMConventionsChecker to accept an entire translation unit insteadTed Kremenek2010-02-141-3/+2
| | | | | | | | | | | | | | | | of operating on each code decl. This exposes two flaws in AnalysisConsumer that should eventually be fixed: (1) It is not possible to associate multiple "actions" with a single command line argument. This will require the notion of an "analysis" group, and possibly tablegen support. (although eventually we want to support dynamically loading analyses as well) (2) AnalysisConsumer may not actually be scanning the declarations in namespaces. We'll experiment first in LLVMConventionsChecker before changing the behavior in AnalysisConsumer. llvm-svn: 96183
* Rework translation unit actions to actually take an entire translation unitTed Kremenek2010-02-141-43/+50
| | | | | | as imput. llvm-svn: 96182
* Pass StringRefs to InsertText/ReplaceText in RewriteObjC and remove a ton of ↵Benjamin Kramer2010-02-141-120/+91
| | | | | | unnecessary length arguments. llvm-svn: 96164
* Add new static analyzer for checking LLVM coding conventions: ↵Ted Kremenek2010-02-141-0/+8
| | | | | | | | | | | | | -analyzer-check-llvm-conventions Currently these checks are intended to be largely syntactical, but may get more sophisticated over time. As an initial foray into this brave new world, emit a static analyzer warning when binding a temporary 'std::string' to an 'llvm::StringRef' where the lifetime of the 'std::string' does not outlive the 'llvm::StringRef'. llvm-svn: 96147
* Two changes to AnalysisConsumer::HandleTopLevelSingleDecl():Ted Kremenek2010-02-141-23/+11
| | | | | | | | | | | | (1) Since CXXMethodDecl subclasses FunctionDecl (and CXXDestructorDecl and CXXConversion subclass CXXMethodDecl), refactor switch statement to handle them all in one spot. (2) Use 'DeclarationName::getAsString()' to handle all functions that don't have simple identifiers (fixing a null dereference when scanning for specific functions). llvm-svn: 96146
* add support for t Fedora 12 (February 2010), patch byChris Lattner2010-02-131-0/+4
| | | | | | Dyachenko Dmitry. Our system is "not so elegant" here. llvm-svn: 96111
* Raise the responsibility for passing -disable-llvm-verifier in NDEBUG buildsJohn McCall2010-02-131-6/+2
| | | | | | | to the driver, and support it in CodeGenOptsToArgs(). Note that this changes the default behavior of clang -cc1 to always run the verifier. llvm-svn: 96077
* Add an option to disable the LLVM verifier pass (which is still alwaysJohn McCall2010-02-121-1/+1
| | | | | | | disabled in NDEBUG builds). The option applies only to -cc1 invocations and is: -disable_llvm_verifier llvm-svn: 96046
* 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
OpenPOWER on IntegriCloud