summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Sort overload results by viability.John McCall2010-01-121-10/+19
| | | | llvm-svn: 93215
* Introduce a specific representation for the ambiguous implicit conversionJohn McCall2010-01-127-199/+309
| | | | | | | sequence. Lots of small relevant changes. Fixes some serious problems with ambiguous conversions; also possibly improves associated diagnostics. llvm-svn: 93214
* Eliminate an embarrassing performance regression in C/ObjC, where weDouglas Gregor2010-01-113-1/+13
| | | | | | | | | | were performing name lookup for template names in C/ObjC and always finding nothing. Turn off such lookup unless we're in C++ mode, along with the check that determines whether the given identifier is a "current class name", and assert that we don't make this mistake again. llvm-svn: 93207
* Reverted r93198; done without reading relevant PR.David Chisnall2010-01-111-4/+2
| | | | llvm-svn: 93205
* Fix rewriting for forward class declaration.Fariborz Jahanian2010-01-111-3/+11
| | | | | | (fixes radar 6969189). llvm-svn: 93201
* When performing name lookup into a scope, check that its entity isDouglas Gregor2010-01-111-1/+1
| | | | | | non-NULL before looking at the entity itself. llvm-svn: 93199
* Allow VLAs in C++ if in GNU mode (GNU C++ permits them). Clang can now ↵David Chisnall2010-01-111-2/+4
| | | | | | compile LanguageKit, although the resulting code crashes (although not in any of the functions that use VLAs). llvm-svn: 93198
* C++0x [dcl.typedef]p4, take 3, where we actually figure out what "thatDouglas Gregor2010-01-111-1/+1
| | | | | | | is not also a typedef-name" actually means. For anyone keeping score, that's John: 2, Doug: 0. llvm-svn: 93196
* Use isa<ElaboratedType> rather than getAs<ElaboratedType>, since theDouglas Gregor2010-01-111-1/+1
| | | | | | | latter may (eventually) perform multiple levels of desugaring (thus breaking the newly-added tests) and the former is faster. Thanks, John! llvm-svn: 93192
* Allow redefinitions of typedef-names within class scope when the typeDouglas Gregor2010-01-111-4/+29
| | | | | | | | | they redefine is a class-name but not a typedef-name, per C++0x [dcl.typedef]p4. The code in the test was valid C++98 and is valid C++0x, but an unintended consequence of DR56 made it ill-formed in C++03 (which we were luck enough to implement). Fixes PR5455. llvm-svn: 93188
* Fix a problem related to rewrite of anonymous unions.Fariborz Jahanian2010-01-111-2/+3
| | | | | | (fixes radar 6948022) llvm-svn: 93186
* Fix pasto.Benjamin Kramer2010-01-111-1/+1
| | | | llvm-svn: 93181
* Use the new isInteger() method in a couple places, some random cleanup, andChris Lattner2010-01-111-23/+15
| | | | | | add a fixme. llvm-svn: 93179
* When resolving a single function template specialization to aDouglas Gregor2010-01-111-1/+4
| | | | | | | function, be sure to adjust the resulting argument type to a pointer (if necessary). Fixes PR5910 and PR5949. llvm-svn: 93178
* Avoid use of deprecated functions (CStrInCStrNoCase and StringsEqualNoCase).Benjamin Kramer2010-01-111-12/+13
| | | | llvm-svn: 93175
* When computing surrogates for calls to a value of object type, lookDouglas Gregor2010-01-111-2/+1
| | | | | | for all visible conversion functions. llvm-svn: 93173
* Change return type of getObjCEncodingTypeSize() to CharUnits as the units ↵Ken Dyck2010-01-111-6/+6
| | | | | | are in characters. llvm-svn: 93171
* Fix type mismatch on 64-bit platforms (GNU ObjC).David Chisnall2010-01-111-1/+1
| | | | llvm-svn: 93169
* Remove some pointless FIXMEs. No functionality changeDouglas Gregor2010-01-111-5/+0
| | | | llvm-svn: 93168
* Add support for out-of-line definitions of conversion functionDouglas Gregor2010-01-111-4/+7
| | | | | | | | templates. Previously, a little thinko in the code that replaced a conversion function template with its redeclaration was causing some very weird lookup behavior. llvm-svn: 93166
* Tighten up the "cannot return array or function type" diagnostic toDouglas Gregor2010-01-111-2/+5
| | | | | | | say either "array type" or "function type", whichever it is. No reason to make the user guess. llvm-svn: 93164
* Implement name lookup for conversion function template specializationsDouglas Gregor2010-01-1110-32/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | (C++ [temp.mem]p5-6), which involves template argument deduction based on the type named, e.g., given struct X { template<typename T> operator T*(); } x; when we call x.operator int*(); we perform template argument deduction to determine that T=int. This template argument deduction is needed for template specialization and explicit instantiation, e.g., template<> X::operator float*() { /* ... */ } and when calling or otherwise naming a conversion function (as in the first example). This fixes PR5742 and PR5762, although there's some remaining ugliness that's causing out-of-line definitions of conversion function templates to fail. I'll look into that separately. llvm-svn: 93162
* Fixup rewrite of ivars accessed via an explicit objectFariborz Jahanian2010-01-111-2/+3
| | | | | | in a function. Fixes radar 7522803. llvm-svn: 93159
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-1114-103/+127
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* Make Clang complain about taking the address of an unqualified member ↵Sebastian Redl2010-01-111-1/+16
| | | | | | function. Fixes PR5985. llvm-svn: 93150
* Enhance ScanReachableSymbols::scan(). Now another OSAtomic test case passes.Zhongxing Xu2010-01-111-0/+3
| | | | | | The old test case has a little mistake. llvm-svn: 93148
* Enhance SVals::getAsRegion: get the region that is converted to an integer.Zhongxing Xu2010-01-111-0/+4
| | | | | | This with previous patch fixes a OSAtomic test case. llvm-svn: 93146
* add a TODO for a perf improvement in LexIdentifier.Chris Lattner2010-01-111-2/+5
| | | | llvm-svn: 93141
* Switch RegionStore over to using <BaseRegion+raw offset> to storeTed Kremenek2010-01-114-52/+92
| | | | | | | | | | | | | | value bindings. Along with a small change to OSAtomicChecker, this resolves <rdar://problem/7527292> and resolves some long-standing issues with how values can be bound to the same physical address by not have the same "key". This change is only a beginning; logically RegionStore needs to better handle loads from addresses where the stored value is larger/smaller/different type than the loaded value. We handle these cases in an approximate fashion now (via CastRetrievedVal and help in SimpleSValuator), but it could be made much smarter. llvm-svn: 93137
* Preliminary reworking of value-binding logic in RegionStore:Ted Kremenek2010-01-111-31/+110
| | | | | | | | | | | | | (1) Introduce a new 'BindingKey' class to match 'BindingValue'. This gives us the flexibility to change the current key value from 'const MemRegion*' to something more interesting. (2) Rework additions/removals/lookups from the store to use new 'Remove', 'Add', 'Lookup' utility methods. No "real" functionality change; just prep work and abstraction. llvm-svn: 93136
* Do not parse hexadecimal floating point literals in C++0x mode because they areAlexis Hunt2010-01-102-3/+9
| | | | | | | | | | | | | | | | | | incompatible with user-defined literals, specifically with the following form: 0x1p+1 The preprocessing-number token extends only as far as the 'p'; the '+' is not included. Previously we could get away with this extension as p was an invalid suffix, but now with user-defined literals, 'p' might well be a valid suffix and we are forced to consider it as such. This patch also adds a warning in non-0x C++ modes telling the user that this extension is incompatible with C++0x that is enabled by default (previously and with other languages, we warn only with a compliance option such as -pedantic). llvm-svn: 93135
* Improve code completion by introducing patterns for the various C andDouglas Gregor2010-01-108-30/+594
| | | | | | | | | | | | | | | | | | | | | | C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. llvm-svn: 93134
* Silence MSVC warning.Benjamin Kramer2010-01-101-1/+1
| | | | | | RewriteObjC.cpp(4419) : warning C4804: '>' : unsafe use of type 'bool' in operation llvm-svn: 93124
* Make clone() method out-of-line for Attr classes.Anton Korobeynikov2010-01-102-0/+144
| | | | llvm-svn: 93120
* Try to make cmake happyAnton Korobeynikov2010-01-102-1/+2
| | | | llvm-svn: 93119
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-1013-41/+312
| | | | | | | | | 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
* Rename file to generalization in next commitsAnton Korobeynikov2010-01-101-0/+0
| | | | llvm-svn: 93117
* Simplify code. No functionality change.Benjamin Kramer2010-01-101-18/+1
| | | | llvm-svn: 93114
* stringref'ize a bunch of filename handling logic. MuchChris Lattner2010-01-105-92/+73
| | | | | | nicer than passing around two const char*'s. llvm-svn: 93094
* Fix PR5982, a refacto in checking for '=' in a -D argument.Daniel Dunbar2010-01-101-8/+5
| | | | llvm-svn: 93088
* Fix a FIXME.Daniel Dunbar2010-01-101-2/+2
| | | | llvm-svn: 93087
* Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' whenDaniel Dunbar2010-01-101-6/+0
| | | | | | -weak_reference_mismatches is not present, it is the default. llvm-svn: 93086
* clarify comment.Chris Lattner2010-01-101-2/+2
| | | | llvm-svn: 93084
* implement rdar://7520940: published framework headers shouldChris Lattner2010-01-103-3/+16
| | | | | | | import other headers within the same framework with the full framework path, not with a relative include. llvm-svn: 93083
* Fix overzealous assertion in GRExprEngine::VisitLValue(). ATed Kremenek2010-01-091-7/+25
| | | | | | | | | CallExpr/ObjCMessageExpr can be visited in an "lvalue" context if it returns a struct temporary. Currently the analyzer doesn't reason about struct temporary returned by function calls, but we shouldn't crash here either. llvm-svn: 93081
* implement -ftabstop=width, patch by Christian AdåkerChris Lattner2010-01-093-2/+13
| | | | llvm-svn: 93078
* revert 91891, a workaround for PR5514.Chris Lattner2010-01-091-2/+1
| | | | llvm-svn: 93077
* implement codegen support for preinc as an lvalue, PR5514.Chris Lattner2010-01-091-2/+10
| | | | llvm-svn: 93076
* refactor pre/postinc logic into CGF and require the caller to pass in theChris Lattner2010-01-094-129/+139
| | | | | | lvalue to poke, no functionality change. llvm-svn: 93075
* revert r92749, which is just dead code.Chris Lattner2010-01-091-10/+0
| | | | llvm-svn: 93074
OpenPOWER on IntegriCloud