summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a couple uninitialized variables from my previous commit.Steve Naroff2008-12-081-1/+3
| | | | llvm-svn: 60713
* Remove the #include of ScheduleDAGSDNodes.h, which is no longer necessary.Dan Gohman2008-12-081-1/+0
| | | | llvm-svn: 60712
* Fix <rdar://problem/6423452> clang ObjC rewriter: Don't use ↵Steve Naroff2008-12-081-28/+30
| | | | | | __declspec(dllimport) for Blocks functions, as they are linked statically. llvm-svn: 60704
* Handle chained/nested property 'getters' (obj.p1.p2.p3).Steve Naroff2008-12-081-10/+58
| | | | | | This is a follow-up to fixing <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize. llvm-svn: 60700
* Add support for calls to dependent names within templates, e.g.,Douglas Gregor2008-12-061-1/+2
| | | | | | | | | | | | | | | | | | template<typename T> void f(T x) { g(x); // g is a dependent name, so don't even bother to look it up g(); // error: g is not a dependent name } Note that when we see "g(", we build a CXXDependentNameExpr. However, if none of the call arguments are type-dependent, we will force the resolution of the name "g" and replace the CXXDependentNameExpr with its result. GCC actually produces a nice error message when you make this mistake, and even offers to compile your code with -fpermissive. I'll do the former next, but I don't plan to do the latter. llvm-svn: 60618
* Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always ↵Steve Naroff2008-12-051-1/+23
| | | | | | executed llvm-svn: 60593
* -std=c99 defaults blocks to off even on darwin, but -fblocks overridesChris Lattner2008-12-051-2/+10
| | | | | | even it. llvm-svn: 60568
* Finish up support for <rdar://problem/6213955> clang ObjC rewriter: rewriter ↵Steve Naroff2008-12-041-19/+54
| | | | | | doesn't appear to support @property and @synthesize. llvm-svn: 60565
* instead of forcing blocks on by default, make them default to off, but letChris Lattner2008-12-041-2/+7
| | | | | | | | specific targets default them to on. Default blocks to on on 10.6 and later. Add a -fblocks option that allows the user to override the target's default. Use -fblocks in the various testcases that use blocks. llvm-svn: 60563
* replace useNeXTRuntimeAsDefault with a generic hook that allows targetsChris Lattner2008-12-041-6/+6
| | | | | | to specify their default language options. llvm-svn: 60561
* Remove unneeded assertion. We already know that FE->getName() is an ↵Ted Kremenek2008-12-041-5/+4
| | | | | | absolute path. llvm-svn: 60558
* Several things...Steve Naroff2008-12-041-20/+76
| | | | | | | | | | | - Implement RewritePropertySetter(). While the routine is simple, there were some tricky changes to RewriteFunctionBodyOrGlobalInitializer(), the main rewriter loop. It also required some additional instance data to distinguish setters from getters, as well as some changes to RewritePropertyGetter(). - Implement FIXME: for pretty printing ObjCPropertyRefExpr's. - Changed ObjCPropertyRefExpr::getSourceRange() to point to the end of the property name (not the beginning). Also made a minor name change from "Loc"->"IdLoc" (to make it clear the Loc does not point to the "."). llvm-svn: 60540
* PTH:Ted Kremenek2008-12-031-1/+4
| | | | | | Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*. This leads to a 4% speedup at -fsyntax-only using PTH. llvm-svn: 60452
* More support for rewriting property getter/setters.Steve Naroff2008-12-031-1/+44
| | | | llvm-svn: 60450
* Add "-token-cache" option for using pretokenized cache files.Ted Kremenek2008-12-021-0/+15
| | | | llvm-svn: 60440
* PTH emission:Ted Kremenek2008-12-021-66/+61
| | | | | | | | | - Output 32 bit integers using bit-shifting + write of individual bytes. This is motivated because we aren't guaranteed to load 32-bit ints of the mmaped PTH file at 4-byte offsets. - Don't emit flags for IdentifierInfos. These are lazily populated by the Preprocessor/Parser. - Only write out tokens for files with absolute paths. This is potentially temporary, but simplifies things for now. llvm-svn: 60435
* Add a couple FIXME's.Steve Naroff2008-12-021-0/+6
| | | | llvm-svn: 60427
* Make sure synthesized properties get inserted into the classes/categories ↵Steve Naroff2008-12-021-3/+22
| | | | | | meta data. llvm-svn: 60426
* Simplify previous commit.Steve Naroff2008-12-021-17/+14
| | | | llvm-svn: 60416
* More work to rewrite synthesize properties (<rdar://problem/6213955>)Steve Naroff2008-12-021-0/+50
| | | | llvm-svn: 60414
* Handle new by passing the Declaration to the Action, not a processed type.Sebastian Redl2008-12-021-1/+1
| | | | llvm-svn: 60413
* -Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.Steve Naroff2008-12-011-0/+11
| | | | | | -Start adding support for rewriting @synthesize. llvm-svn: 60368
* Add LangOptions marker for assembler-with-cpp mode and use to defineDaniel Dunbar2008-12-011-0/+1
| | | | | | | __ASSEMBLER__ properly. Patch from Roman Divacky (with minor formatting changes). Thanks! llvm-svn: 60362
* Enable blocks in C++Douglas Gregor2008-12-011-3/+0
| | | | llvm-svn: 60361
* Add support for pluggable components of static analyzer.Zhongxing Xu2008-11-271-12/+46
| | | | | | | | | | - Creator function pointers are saved in ManagerRegistry. - The Register* class is used to notify ManagerRegistry new module is available. - AnalysisManager queries ManagerRegistry for configurable module. Then it passes them to GRExprEngine, in turn to GRStateManager. llvm-svn: 60143
* - Enhance PTH generation to write out IdentifierInfo table in two parts:Ted Kremenek2008-11-261-19/+59
| | | | | | | | - a table including the IdentifierInfo data - an index from persistent IdentifierInfo IDs to indices within this file. - Enhance PTH generation to write out file map information, mapping inodes to tokens. llvm-svn: 60132
* Implement implicit conversions for Objective-C specific types, e.g., Douglas Gregor2008-11-261-1/+1
| | | | | | | | | | | | converting a pointer to one Objective-C interface into a pointer to another Objective-C interface, and conversions with 'id'. The semantics seems to match GCC, although they seem somewhat ad hoc. Fixed a few cases where we assumed the C++ definition of isObjectType, but were getting the C definition, causing failures in trouble with conversions to void pointers. llvm-svn: 60130
* Add plugin loading for clang. This will be used to load alternative ↵Zhongxing Xu2008-11-261-0/+1
| | | | | | constraint manager for static analysis. llvm-svn: 60091
* Disable -loop-index-split for now.Devang Patel2008-11-261-1/+1
| | | | llvm-svn: 60089
* Re-apply r60071 now that raw_fd_ostream::tell has been committed.Ted Kremenek2008-11-261-44/+91
| | | | llvm-svn: 60086
* Revert 60071, depends on uncommitted LLVM changes.Daniel Dunbar2008-11-261-91/+44
| | | | llvm-svn: 60077
* Migrate token-cache generation logic from dummy harness in PPLexerChange.cpp ↵Ted Kremenek2008-11-261-44/+91
| | | | | | to CacheTokens.cpp. llvm-svn: 60071
* Display the function we are analyzing before running LiveVariables.Ted Kremenek2008-11-241-4/+4
| | | | llvm-svn: 59983
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-243-113/+115
| | | | | | | | | | | uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
* Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make itChris Lattner2008-11-242-24/+24
| | | | | | | | | assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. llvm-svn: 59936
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-244-23/+21
| | | | | | | | | | | | | a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
* Rewrite FindDiagnostics to be more strict about the formatting of the Chris Lattner2008-11-241-31/+55
| | | | | | | expected-foo strings. Now the only allowed characters between expected-error and {{ is whitespace. llvm-svn: 59925
* clean up -verify mode output. If the expected-error string is Chris Lattner2008-11-231-35/+34
| | | | | | mangled, report it using the diagnostics machinery instead of printf. llvm-svn: 59924
* reverting this because it breaks some blocks cases, I'll send doug a testcaseTed Kremenek2008-11-221-0/+3
| | | | llvm-svn: 59850
* Implementation of new and delete parsing and sema.Sebastian Redl2008-11-211-1/+1
| | | | | | This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. llvm-svn: 59835
* Don't turn off blocks in C++Douglas Gregor2008-11-211-3/+0
| | | | llvm-svn: 59827
* Change -verify mode to find the "expected-error" and "expected-warning" stringsChris Lattner2008-11-211-15/+14
| | | | | | | | with a raw lexer instead of a PP lexer. This means that -verify doesn't scan #include'd headers for expected-error/warning strings, and it also means that it doesn't ignore them in #if 0. llvm-svn: 59774
* Output 'ANALYZE' messages to standard error. This should address the ↵Ted Kremenek2008-11-201-2/+2
| | | | | | intermixing of 'ANALYZE' and the other diagnostics the clang driver emits to standard error. llvm-svn: 59730
* Use ScheduleDAGSDNodes.h instead of ScheduleDAG.h (stuff moved around).Ted Kremenek2008-11-201-1/+1
| | | | llvm-svn: 59684
* Fix <rdar://problem/6291588> assertion failure: SourceManager.h line 489.Steve Naroff2008-11-191-2/+14
| | | | llvm-svn: 59664
* Support overloading of the subscript operator[], including support forDouglas Gregor2008-11-191-2/+3
| | | | | | | | | built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. llvm-svn: 59643
* Added operator overloading for unary operators, post-increment, andDouglas Gregor2008-11-191-3/+3
| | | | | | | | | | | | | post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. llvm-svn: 59638
* switch TextDiagnosticPrinter to raw_ostream.Chris Lattner2008-11-191-1/+2
| | | | llvm-svn: 59597
* This reworks some of the Diagnostic interfaces a bit to change how diagnosticsChris Lattner2008-11-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are formed. In particular, a diagnostic with all its strings and ranges is now packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a ton of random stuff. This has the benefit of simplifying the interface, making it more extensible, and allowing us to do more checking for things like access past the end of the various arrays passed in. In addition to introducing DiagnosticInfo, this also substantially changes how Diagnostic::Report works. Instead of being passed in all of the info required to issue a diagnostic, Report now takes only the required info (a location and ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to stuff strings and ranges into the DiagnosticInfo with the << operator. When the dtor runs on the DiagnosticInfo object (which should happen at the end of the statement), the diagnostic is actually emitted with all of the accumulated information. This is a somewhat tricky dance, but it means that the accumulated DiagnosticInfo is allowed to keep pointers to other expression temporaries without those pointers getting invalidated. This is just the minimal change to get this stuff working, but this will allow us to eliminate the zillions of variant "Diag" methods scattered throughout (e.g.) sema. For example, instead of calling: Diag(BuiltinLoc, diag::err_overload_no_match, typeNames, SourceRange(BuiltinLoc, RParenLoc)); We will soon be able to just do: Diag(BuiltinLoc, diag::err_overload_no_match) << typeNames << SourceRange(BuiltinLoc, RParenLoc)); This scales better to support arbitrary types being passed in (not just strings) in a type-safe way. Go operator overloading?! llvm-svn: 59502
* remove a helper method with only one call site.Chris Lattner2008-11-181-1/+1
| | | | llvm-svn: 59495
OpenPOWER on IntegriCloud