summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Banish the notion of a "rank" for code-completion results, since weDouglas Gregor2010-01-132-268/+205
| | | | | | are no longer using it for anything. No intended functionality change. llvm-svn: 93376
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-1323-307/+312
| | | | | | | | the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) llvm-svn: 93370
* Don't report ambiguities in the user-defined conversion if we weren't supposedJohn McCall2010-01-132-1/+17
| | | | | | | | | | | | to be considering user-defined conversions in the first place. Doug, please review; I'm not sure what we should be doing if we see a real ambiguity in selecting a copy constructor when otherwise suppressing user-defined conversions. Fixes PR6014. llvm-svn: 93365
* Don't a.k.a. through the primary typedef of an anonymous tag decl.John McCall2010-01-133-0/+20
| | | | llvm-svn: 93362
* Code-completion for @public, @protected, @private, @package.Douglas Gregor2010-01-135-3/+63
| | | | llvm-svn: 93361
* Reorganize CIndex.cpp into clearer sections of functions, and add a utility ↵Ted Kremenek2010-01-131-98/+117
| | | | | | function 'MakeCXCursor' to centralize the logic for creating CXCursor objects. llvm-svn: 93359
* Fixes a rewrite bug rewriting a block call argument which has a trvialFariborz Jahanian2010-01-132-0/+28
| | | | | | constructor. Fixes radar 7537770. llvm-svn: 93358
* Whenever completing ordinary names for an Objective-C source, alsoDouglas Gregor2010-01-137-102/+216
| | | | | | | | | | | provide completions for @ keywords. Previously, we only provided @-completions after an @ was actually typed, which is useful but probably not the common case. Also, make sure a few Objective-C 2.0 completions only show up when Objective-C 2.0 support is enabled (the default). llvm-svn: 93354
* Fix Release-Asserts.Mike Stump2010-01-131-25/+21
| | | | llvm-svn: 93353
* Fix for Release-Assert.Mike Stump2010-01-131-1/+1
| | | | llvm-svn: 93348
* Fix for Release-Asserts.Mike Stump2010-01-131-14/+14
| | | | llvm-svn: 93347
* Fix Release-Asserts.Mike Stump2010-01-131-44/+42
| | | | llvm-svn: 93346
* Add a BaseSubobject class to uniquely identify a base class subobject. Not ↵Anders Carlsson2010-01-131-0/+25
| | | | | | yet used. llvm-svn: 93345
* Add type source information for both kinds of typeof types.John McCall2010-01-138-28/+142
| | | | | | Patch by Enea Zaffanella. llvm-svn: 93344
* Add 'referringDecl' field to CXCursor to prepare the way to better model ↵Ted Kremenek2010-01-132-10/+11
| | | | | | declaration references from other delcarations. llvm-svn: 93343
* Fix for Release-Asserts.Mike Stump2010-01-131-18/+17
| | | | llvm-svn: 93340
* Predefine __weak attribute when doing objective-cFariborz Jahanian2010-01-135-9/+15
| | | | | | rewriting for any target. (refixes radar 7530235). llvm-svn: 93331
* Add extra null check in clang_disposeString().Ted Kremenek2010-01-131-1/+1
| | | | llvm-svn: 93328
* Reimplement constructor declarator parsing to cope with template-idsDouglas Gregor2010-01-1315-34/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that name constructors, the endless joys of out-of-line constructor definitions, and various other corner cases that the previous hack never imagined. Fixes PR5688 and tightens up semantic analysis for constructor names. Additionally, fixed a problem where we wouldn't properly enter the declarator scope of a parenthesized declarator. We were entering the scope, then leaving it when we saw the ")"; now, we re-enter the declarator scope before parsing the parameter list. Note that we are forced to perform some tentative parsing within a class (call it C) to tell the difference between C(int); // constructor and C (f)(int); // member function which is rather unfortunate. And, although it isn't necessary for correctness, we use the same tentative-parsing mechanism for out-of-line constructors to improve diagnostics in icky cases like: C::C C::f(int); // error: C::C refers to the constructor name, but // we complain nicely and recover by treating it as // a type. llvm-svn: 93322
* Fix pasto in __has_feature(cxx_lambdas) docsDouglas Gregor2010-01-131-1/+1
| | | | llvm-svn: 93320
* Record some basic information about bad conversion sequences. Use thatJohn McCall2010-01-136-65/+184
| | | | | | | information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. llvm-svn: 93316
* Implement semantic checking for C++ literal operators.Alexis Hunt2010-01-1310-10/+195
| | | | | | | This now rejects literal operators that don't meet the requirements. Templates are not yet checked for. llvm-svn: 93315
* Update test function names so as not to use potential keywords.Alexis Hunt2010-01-131-5/+5
| | | | llvm-svn: 93314
* Add a bunch more feature-checking macros for C++0x features. Some of these areAlexis Hunt2010-01-133-0/+188
| | | | | | | disabled with the intent that users can start with them now and not have to change a thing to have them work when we implement the features. llvm-svn: 93312
* Insert clang-flags into the clang command. Currently it needs to be a list;John McCall2010-01-131-18/+18
| | | | | | future work should permit strings (by splitting them into a list o' strings). llvm-svn: 93299
* diagnose invalid values of -ftabstop, patch by Christian Adaker!Chris Lattner2010-01-134-5/+16
| | | | llvm-svn: 93288
* Add an unreachable code checker.Mike Stump2010-01-136-32/+120
| | | | llvm-svn: 93287
* cc1: Factor out CompilerInstance::ExecuteAction which has the majority of theDaniel Dunbar2010-01-133-87/+137
| | | | | | | | clang -cc1 logic for running an action against a set of options. - This should make it easier to build tools that have a clang -cc1 like interface, but aren't actually part of clang -cc1. llvm-svn: 93282
* 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
OpenPOWER on IntegriCloud