summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix crash in code completion when an ObjCMethodDecl doesn't have an ↵Ted Kremenek2010-05-311-4/+7
| | | | | | | | associated @interface. Fixes <rdar://problem/8026215>. llvm-svn: 105256
* Convert DeclNodes to use TableGen.Alexis Hunt2010-05-302-2/+2
| | | | | | | | The macros required for DeclNodes use have changed to match the use of StmtNodes. The FooFirst enumerator constants have been named firstFoo to match usage elsewhere. llvm-svn: 105165
* Teach code-completion for calls to be more careful with aDouglas Gregor2010-05-301-2/+14
| | | | | | potentially-NULL "function" argument. llvm-svn: 105152
* Teach code completion to adjust its completion priorities based on theDouglas Gregor2010-05-302-30/+243
| | | | | | | | | type that we expect to see at a given point in the grammar, e.g., when initializing a variable, returning a result, or calling a function. We don't prune the candidate set at all, just adjust priorities to favor things that should type-check, using an ultra-simplified type system. llvm-svn: 105128
* Copy source information for the inner type of an elaborated type; fixes someJohn McCall2010-05-281-32/+31
| | | | | | valgrind problems. llvm-svn: 105062
* Sema: Fix comment, apparently #pragma options align=power is just the same asDaniel Dunbar2010-05-281-6/+1
| | | | | | align=native, at least for the platforms we support. llvm-svn: 105000
* Sema: Just ignore '#pragma options align=power' for now, this is no worse thanDaniel Dunbar2010-05-281-1/+6
| | | | | | | what we used to be doing, and makes sure that paired '#pragma options align=reset' won't fail. llvm-svn: 104998
* A more minimal fix for PR6762.John McCall2010-05-283-55/+54
| | | | llvm-svn: 104991
* Roll back r104941.John McCall2010-05-282-23/+3
| | | | llvm-svn: 104990
* Disable exception-spec compatibility checking under -fno-exceptions.John McCall2010-05-281-0/+9
| | | | | | Fixes PR7243. llvm-svn: 104942
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-282-3/+23
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Optimize and complete associated-class-and-namespace collection fromJohn McCall2010-05-281-85/+115
| | | | | | a type. llvm-svn: 104938
* When we complain about a member being inaccessible due to a constraintDouglas Gregor2010-05-281-0/+4
| | | | | | | along an access path, add another note pointing at the member we actually found. llvm-svn: 104937
* When filtering out previous declarations of friend functions, consider theJohn McCall2010-05-281-5/+10
| | | | | | lookup context, not the direct semantic context. Fixes PR7230. llvm-svn: 104917
* Don't put method bodies into code completions unless code patterns areDouglas Gregor2010-05-281-1/+1
| | | | | | turned on. llvm-svn: 104909
* Do not produce types as valid code completions when we're in anDouglas Gregor2010-05-281-3/+57
| | | | | | | expression context in C/Objective-C, or when we're in an @interface/@implementation/@protocol in Objective-C(++). llvm-svn: 104908
* Make -code-completion-patterns only cover multi-line codeDouglas Gregor2010-05-281-241/+247
| | | | | | | completions. Plus, tweak a few completion patterns to better reflect the language grammar. llvm-svn: 104905
* Implement a code-completion hook for the receiver of an Objective-CDouglas Gregor2010-05-272-1/+99
| | | | | | | message. This completion gives better results than just using the "expression" completion, which is effectively what happened before. llvm-svn: 104895
* Tweak the fix-it for a copy constructor declared to take its argumentDouglas Gregor2010-05-271-1/+4
| | | | | | by-value. We now only prepend a space if it is needed. llvm-svn: 104889
* Parse/Sema: Add support for '#pragma options align=packed', which, it should beDaniel Dunbar2010-05-271-0/+7
| | | | | | noted, is not the same as __attribute__((packed)). That would be ridiculous! llvm-svn: 104865
* Parse/Sema: Add support for '#pragma options align=native'.Daniel Dunbar2010-05-271-0/+4
| | | | llvm-svn: 104864
* Require a complete type when performing the qualified lookup duringJohn McCall2010-05-271-0/+3
| | | | | | instantiation of a dependent elaborated type specifier. Fixes PR 7199. llvm-svn: 104822
* Sema: Add initial support for '#pragma options align=mac68k'.Daniel Dunbar2010-05-271-7/+16
| | | | | | | - Docs are fairly sketchy, if someone wants to pore through gcc to look for holes I'd appreciate any failing test cases! llvm-svn: 104809
* Sema: Factor out struct for alignment stack entries.Daniel Dunbar2010-05-271-5/+11
| | | | llvm-svn: 104799
* Sema: Replace getPragmaPackAlignment with AddAlignmentAttributesForRecord, whichDaniel Dunbar2010-05-273-17/+18
| | | | | | exposes less details. llvm-svn: 104797
* AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.Daniel Dunbar2010-05-271-1/+1
| | | | llvm-svn: 104795
* Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.Daniel Dunbar2010-05-271-0/+14
| | | | llvm-svn: 104789
* Sema: Support for #pragma options align={reset,natural}. '#pragma options align'Daniel Dunbar2010-05-272-1/+41
| | | | | | shares the stack with '#pragma pack', who knew!? llvm-svn: 104786
* Introduce priorities into the code-completion results.Douglas Gregor2010-05-262-40/+78
| | | | llvm-svn: 104751
* Improve on flexible array diagnostics (PR7029).Fariborz Jahanian2010-05-261-1/+1
| | | | llvm-svn: 104739
* Fixes misc. flexible array bugs in c++ (PR7029).Fariborz Jahanian2010-05-262-1/+21
| | | | llvm-svn: 104733
* Added source order to CXXBaseOrMemberInitializer.Abramo Bagnara2010-05-261-0/+3
| | | | llvm-svn: 104712
* When transforming a C++ "new" expression's constructor arguments, dropDouglas Gregor2010-05-261-0/+3
| | | | | | | | | any arguments that are default-argument expressions. The can show up when we have a new expression whose constructor arguments are not type-dependent and whose allocated type is not dependent and has a constructor with default arguments. Fixes PR7202. llvm-svn: 104690
* Tell the string literal parser when it's not permitted to emitDouglas Gregor2010-05-261-2/+3
| | | | | | | | diagnostics. That would be while we're parsing string literals for the sole purpose of producing a diagnostic about them. Fixes <rdar://problem/8026030>. llvm-svn: 104684
* Only enable code patterns (e.g., try { statements } catch (...) {Douglas Gregor2010-05-251-204/+246
| | | | | | statements }) in the code-completion results if explicitly requested. llvm-svn: 104637
* Make sure to strip off top-level cv-qualifiers as part of aDouglas Gregor2010-05-251-1/+1
| | | | | | derived-to-base conversion on a pointer. Fixes PR7224. llvm-svn: 104607
* Improve code completion in failure cases in two ways:Douglas Gregor2010-05-252-22/+6
| | | | | | | | | | | 1) Suppress diagnostics as soon as we form the code-completion token, so we don't get any error/warning spew from the early end-of-file. 2) If we consume a code-completion token when we weren't expecting one, go into a code-completion recovery path that produces the best results it can based on the context that the parser is in. llvm-svn: 104585
* IRgen/C++: When mark vtables used, make sure to still append to the ↵Daniel Dunbar2010-05-251-2/+9
| | | | | | | | | VTableUse array if we promote a vtable from being just used to having its definition required. This ensures that we properly inform the consumer about whether the vtable is required or not, previously we could fail to do so when the vtable was in the VTableUses array before the decl which marked it as required. - I think this can be cleaned up, since this means we may notify the consumer about the vtable twice, but I didn't see an easy fix for this without more substantial refactoring. - Doug, please review! llvm-svn: 104577
* Simplify.Daniel Dunbar2010-05-251-2/+1
| | | | llvm-svn: 104576
* Don't complain about VLAs of non-POD types when the array type isDouglas Gregor2010-05-241-1/+2
| | | | | | dependent. Fixes <rdar://problem/8021385>. llvm-svn: 104550
* Make sure that we instantiate variably modified types, even if theyDouglas Gregor2010-05-242-7/+11
| | | | | | aren't dependent. Fixes <rdar://problem/8020206>. llvm-svn: 104511
* Downgrade deletion of a void* from an error (which is should be) to anDouglas Gregor2010-05-241-1/+7
| | | | | | | extension warning (which other compilers seem to use). Works around a known bug in Xalan. llvm-svn: 104509
* An identity conversion is better than any non-identityDouglas Gregor2010-05-232-0/+15
| | | | | | conversion. Fixes PR7095. llvm-svn: 104476
* In C++, one cannot assign from an arithmetic type to an enumerationDouglas Gregor2010-05-231-1/+2
| | | | | | type. Fixes PR7051. llvm-svn: 104475
* It turns out that people love using VLAs in templates, too. Weaken ourDouglas Gregor2010-05-232-16/+13
| | | | | | | | VLA restrictions so that one can use VLAs in templates (even accidentally), but not as part of a non-type template parameter (which would be very bad). llvm-svn: 104471
* Complain about sizeof(overloaded function) rather than crashing.Douglas Gregor2010-05-231-0/+6
| | | | llvm-svn: 104470
* Provide the overloaded functions for UnresolvedLookupExpr andDouglas Gregor2010-05-233-13/+12
| | | | | | | UnresolvedMemberExpr in their constructors, rather than adding them after the fact. No functionality change. llvm-svn: 104468
* Don't look for a destructor in a dependent type. Fixes PR7198.Douglas Gregor2010-05-221-1/+1
| | | | llvm-svn: 104445
* When determining whether we can use "this", make sure to look throughDouglas Gregor2010-05-221-1/+1
| | | | | | | enum contexts (along with block contexts, which we already did). Fixes PR7196. llvm-svn: 104444
* Implement support for variable length arrays in C++. VLAs are limitedDouglas Gregor2010-05-222-9/+34
| | | | | | | | | | | | | in several important ways: - VLAs of non-POD types are not permitted. - VLAs cannot be used in conjunction with C++ templates. These restrictions are intended to keep VLAs out of the parts of the C++ type system where they cause the most trouble. Fixes PR5678 and <rdar://problem/8013618>. llvm-svn: 104443
OpenPOWER on IntegriCloud