summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* cc1: Lift creation of the FrontendAction higher.Daniel Dunbar2010-01-131-7/+6
| | | | llvm-svn: 93281
* Improve the reporting of non-viable overload candidates by noting the reasonJohn McCall2010-01-1323-79/+152
| | | | | | | | why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. llvm-svn: 93277
* Move definitions for visitor methods in CDeclVisitor out-of-line.Ted Kremenek2010-01-131-73/+103
| | | | llvm-svn: 93276
* Make method definitions in TUVisitor out-of-line, making it easy to tell ↵Ted Kremenek2010-01-131-44/+67
| | | | | | | | what visitor methods are defined. Generalize TUVisitor to take a general "root" and "iterator" callback; this is prep. work to merging TUVisitor and CDeclVisitor. llvm-svn: 93275
* Remove broken fix-it when a default function argument has beenDouglas Gregor2010-01-131-10/+10
| | | | | | | redefined. There's a FIXME with an apology about why we don't try to do better here. Fixes <rdar://problem/7513023>. llvm-svn: 93274
* When in objective-c methods, do the built-in name lookup afterFariborz Jahanian2010-01-123-6/+60
| | | | | | ivar name lookup. Fixes pr5986. llvm-svn: 93271
* Add USR printing modes to c-index-test.Ted Kremenek2010-01-121-10/+54
| | | | llvm-svn: 93269
* Make clang_getDeclUSR() visible.Ted Kremenek2010-01-121-1/+1
| | | | llvm-svn: 93268
* Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl ↵Ted Kremenek2010-01-122-51/+62
| | | | | | | | instead of a CXEntity. Enhance USR generation a bit with support for records. llvm-svn: 93267
* Don't emit string-comparison or self-comparison warnings inDouglas Gregor2010-01-124-12/+59
| | | | | | | | | | unevaluated contexts, because they only matter for code that will actually be evaluated at runtime. As part of this, I had to extend PartialDiagnostic to support fix-it hints. llvm-svn: 93266
* Remove unused code.Mike Stump2010-01-121-3/+0
| | | | llvm-svn: 93262
* testcase for -ftabstop, patch by Christian Adaker!Chris Lattner2010-01-121-0/+30
| | | | llvm-svn: 93260
* use DiagRuntimeBehavior to silence the div/rem by zero warning whenChris Lattner2010-01-124-5/+8
| | | | | | not in an evaluated context. This removes some bogus warnings. llvm-svn: 93258
* Improve recovery for template-ids whose template-name doesn't actuallyDouglas Gregor2010-01-127-6/+123
| | | | | | | | | | | | | | | | | | | | | | name a template, when they occur in a base-specifier. This is one of the (few) places where we know for sure that an identifier followed by a '<' must be a template name, so we can diagnose and recover well: test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing 'template' keyword prior to dependent template name 'T::apply' struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ... ^ template test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown template name 'vector' struct X2 : vector<T> { }; // expected-error{{unknown template name 'vector'}} ^ 2 diagnostics generated. llvm-svn: 93257
* implement PR6004, warning about divide and remainder by zero.Chris Lattner2010-01-128-29/+53
| | | | llvm-svn: 93256
* implement PR6007, diagnosing invalid attribute((section))Chris Lattner2010-01-123-5/+17
| | | | llvm-svn: 93255
* Improve covariance tester to randomize the return value more.Mike Stump2010-01-121-16/+57
| | | | llvm-svn: 93254
* Fix the CodeGen half of PR5911 by changing reference initialization toChandler Carruth2010-01-124-18/+28
| | | | | | | correctly look through arrays to see cv-qualifiers. Also enhances the routine for doing this to preserve more type sugaring for diagnostics. llvm-svn: 93252
* Further tweaking of USR generation. WIP.Ted Kremenek2010-01-121-6/+20
| | | | llvm-svn: 93250
* Make 'CXTranslationUnitIterator' an argument to perform_test_load(),Ted Kremenek2010-01-121-8/+12
| | | | | | perform_test_load_tu(), and perform_test_load_source(). llvm-svn: 93248
* Define __weak attribute for objective-c pointers inFariborz Jahanian2010-01-122-0/+17
| | | | | | win32 targets. Fixes radar 7530235. Daniel please review. llvm-svn: 93246
* Parse dependent template-ids in base clauses and memberDouglas Gregor2010-01-122-3/+10
| | | | | | | | | initializers. This isn't actually in the C++ grammar (in any version), but that's clearly an oversight: both GCC and EDG support this syntax, and it's used within Boost code. I'll file a core issue proposing precisely the change made here. Fixes PR6008. llvm-svn: 93243
* Improve on objective-c pointer recognitionFariborz Jahanian2010-01-121-2/+3
| | | | | | during rewrite. No functionality chang. llvm-svn: 93241
* When determining whether a given name is a template in a dependentDouglas Gregor2010-01-122-2/+20
| | | | | | | | context, do not attempt typo correction. This harms performance (as Abramo noted) and can cause some amusing errors, as in this new testcase. llvm-svn: 93240
* Fix tests for r93231.Benjamin Kramer2010-01-122-2/+2
| | | | llvm-svn: 93238
* Remove trailing semicolons and silence MSVC warning about C linkage.Benjamin Kramer2010-01-121-5/+5
| | | | | | | warning C4190: 'GetEntity' has C-linkage specified, but returns UDT 'clang::idx::Entity' which is incompatible with C llvm-svn: 93237
* So I was sitting around, trying vainly to think of something to commit, and thenJohn McCall2010-01-125-35/+42
| | | | | | | | I said to myself, self, why don't you go add a couple of parameters to a method and then fail to use them, and I thought that sounded like a pretty good idea, so I did it. llvm-svn: 93233
* Use horizontal-space markers in code-completion results rather thanDouglas Gregor2010-01-124-33/+40
| | | | | | embedding single space characters. <rdar://problem/7485503> llvm-svn: 93231
* Add covariance tester.Mike Stump2010-01-121-8/+35
| | | | llvm-svn: 93226
* Remove duplicate class name, MSVC doesn't like this.Daniel Dunbar2010-01-121-1/+1
| | | | llvm-svn: 93225
* Reorganize some of the code to note overload candidates. Improves theJohn McCall2010-01-123-52/+79
| | | | | | | fidelity with which we note them as functions/constructors and templates thereof. Also will be helpful when reporting bad conversions (next). llvm-svn: 93224
* Add a boilerplate implementation for clang_getUSR(). WIP.Ted Kremenek2010-01-121-2/+80
| | | | llvm-svn: 93223
* Fix rewriting of MacOS sjlj based eh.Fariborz Jahanian2010-01-122-4/+24
| | | | | | Fixes radar 7522880. llvm-svn: 93219
* Name lookup should know better than to look into a class before it's definedDouglas Gregor2010-01-121-1/+3
| | | | llvm-svn: 93217
* Chris thinks these diagnostics are better now. :)John McCall2010-01-121-1/+0
| | | | llvm-svn: 93216
* 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-1210-210/+327
| | | | | | | sequence. Lots of small relevant changes. Fixes some serious problems with ambiguous conversions; also possibly improves associated diagnostics. llvm-svn: 93214
* Change clang_getUSR() to return a CXString instead of a 'const char *'.Ted Kremenek2010-01-122-3/+3
| | | | llvm-svn: 93213
* Make createCXString() a static member function of class CIndex.Ted Kremenek2010-01-122-16/+23
| | | | llvm-svn: 93212
* Allow N_FIELDS to be 0.Mike Stump2010-01-121-1/+1
| | | | llvm-svn: 93211
* CIndex:Ted Kremenek2010-01-114-16/+52
| | | | | | | | | - Remove unused (and unimplemented) clang_getDeclarationName(). - Remove unused (and unimplemented) clang_getEntity(). - Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity) - Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl). llvm-svn: 93209
* 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-112-3/+19
| | | | | | (fixes radar 6969189). llvm-svn: 93201
* When performing name lookup into a scope, check that its entity isDouglas Gregor2010-01-112-1/+9
| | | | | | 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-112-4/+7
| | | | | | | 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-112-2/+6
| | | | | | | latter may (eventually) perform multiple levels of desugaring (thus breaking the newly-added tests) and the former is faster. Thanks, John! llvm-svn: 93192
* Add test case from PR5763Douglas Gregor2010-01-111-0/+7
| | | | llvm-svn: 93190
* Allow redefinitions of typedef-names within class scope when the typeDouglas Gregor2010-01-112-5/+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
OpenPOWER on IntegriCloud