summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Mark functions referenced by 'cleanup' attribute as used. Fixes rdar://8728293Argyrios Kyrtzidis2010-12-041-0/+1
| | | | llvm-svn: 120872
* Diagnose when accessing property in a class method andFariborz Jahanian2010-12-032-4/+5
| | | | | | | no property accessor class method to be found, instead of crashing in IRGen. // rdar://8703553 llvm-svn: 120855
* Fixed typo.Abramo Bagnara2010-12-031-1/+1
| | | | llvm-svn: 120839
* Added struct/class syntactic info for c++0x scoped enum.Abramo Bagnara2010-12-033-5/+6
| | | | llvm-svn: 120828
* Add some warning messages about invalid use of common/nocommon attributes.Eric Christopher2010-12-031-2/+10
| | | | llvm-svn: 120799
* When we're performing an explicit cast of some sort, don't complainDouglas Gregor2010-12-022-8/+6
| | | | | | | | | about deprecated Objective-C pointer conversions. Plus, make sure to actually set an appropriate AssignmentAction when performing an implicit conversion from an InitializationSequence. Fixes regressions in the GCC DejaGNU testsuite. llvm-svn: 120744
* Do not change the size of LookupResult::Filter based on the NDEBUGDouglas Gregor2010-12-021-2/+0
| | | | | | macri; the extra bool fits into padding anyway. llvm-svn: 120708
* Add support for the common and nocommon attributes.Eric Christopher2010-12-022-0/+14
| | | | | | rdar://8560647 llvm-svn: 120650
* Perform lvalue-to-rvalue at the end of an expression statement in C.John McCall2010-12-021-0/+12
| | | | llvm-svn: 120646
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-024-119/+67
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Swap order of checking for compatible vector types.Bob Wilson2010-12-021-7/+7
| | | | | | | | Check for compatible gcc, Altivec and Neon vectors before handling the lax-vector-conversions case. Otherwise there is no way to avoid the warnings from -Wvector-conversions. llvm-svn: 120633
* Make TypeLocBuilder an implementation detail of Sema. Nobody else should be ↵Douglas Gregor2010-12-022-1/+181
| | | | | | using it llvm-svn: 120628
* Sema/AST work for capturing copy init expressionFariborz Jahanian2010-12-011-0/+21
| | | | | | | to be used in copy helper synthesis of __block variables. wip. llvm-svn: 120617
* 80-col fixups.Eric Christopher2010-12-011-21/+38
| | | | llvm-svn: 120613
* Improve our handling of cv-qualifiers in Objective-C pointerDouglas Gregor2010-12-011-29/+30
| | | | | | | | | | | | | | | conversions. Previously, we would end up collapsing qualification conversions into the Objective-C pointer conversion step, including (possibly) stripping qualifiers that shouldn't be removed. This generalizes BuildSimilarlyQualifiedPointerType() to also work on Objective-C object pointers, then eliminates the (redundant, not totally correct) BuildSimilarlyQualifiedObjCObjectPointerType() function. Fixes <rdar://problem/8714395>. llvm-svn: 120607
* Improve the diagnostic when the fixed underlying type of aDouglas Gregor2010-12-011-1/+4
| | | | | | | redeclaration of an enum type differs from that of the original declaration, from Daniel Wallin llvm-svn: 120577
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-011-37/+50
| | | | llvm-svn: 120555
* Basic, Sema: add support for CUDA location attributesPeter Collingbourne2010-12-012-0/+110
| | | | llvm-svn: 120545
* When unknown method is sent to a receiver ofFariborz Jahanian2010-12-011-1/+3
| | | | | | | 'Class' type, disgnostic should refere to a class method. Fixes // rdar://8592156 llvm-svn: 120517
* Follow through references to catch returned stack addresses, local blocks, ↵Argyrios Kyrtzidis2010-11-301-50/+127
| | | | | | | | | | | | label addresses or references to temporaries, e.g: const int& g2() { int s1; int &s2 = s1; // expected-note {{binding reference variable 's2' here}} return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}} } llvm-svn: 120483
* L-value to r-value conversion is not ready for prime-time.John McCall2010-11-301-50/+37
| | | | llvm-svn: 120433
* Such function decls,as objc's objc_msgSend, builtins in Fariborz Jahanian2010-11-302-13/+3
| | | | | | | | | a specific language. We are adding such language info. by extensing Builtins.def and via a language flag added to LIBBUILTIN/BUILTIN and check for that when deciding a name is builtin or not. Implements //rdar://8689273. llvm-svn: 120429
* Introduce an r-value to l-value cast kind. I'm not promising anythingJohn McCall2010-11-301-37/+50
| | | | | | about the reliability of this yet. llvm-svn: 120422
* Fix bug in r120299 spotted by dgregor.Nico Weber2010-11-301-3/+3
| | | | llvm-svn: 120389
* Fix another case of giving the wrong value kind to a dependent cast toJohn McCall2010-11-301-1/+4
| | | | | | a non-dependent type. llvm-svn: 120384
* Revert r120331 since it causes spurious warnings and a possible assertion ↵Argyrios Kyrtzidis2010-11-291-27/+3
| | | | | | hit when self-host. llvm-svn: 120351
* Emit warnings if we are returning a reference to a local temporary.Argyrios Kyrtzidis2010-11-291-3/+27
| | | | | | The issue was brought to our attention by Matthieu Monrocq. llvm-svn: 120331
* Always use a function's decl context when building default arguments. Fixes ↵Nico Weber2010-11-291-4/+12
| | | | | | http://http://llvm.org/pr8479. llvm-svn: 120299
* Revert r120063, it was wrong.John McCall2010-11-291-2/+2
| | | | llvm-svn: 120296
* Revert parts of r120266 that I did not mean to commitNico Weber2010-11-281-12/+4
| | | | llvm-svn: 120267
* Minor whitespace and comment fixes. No functionality change.Nico Weber2010-11-284-7/+15
| | | | llvm-svn: 120266
* Allow access to non-static members without an object in sizeof expressions, ↵Sebastian Redl2010-11-261-2/+22
| | | | | | in C++0x. Patch by Jakub Wieczorek. llvm-svn: 120182
* For internal consistency's sake, compute the value kind of a dependent castJohn McCall2010-11-261-0/+3
| | | | | | based on the known properties of the casted-to type. Fixes a crash on spirit. llvm-svn: 120180
* Tie DefineVTablesUsed() in with recursive function instantiation so that we emitNick Lewycky2010-11-252-21/+28
| | | | | | | | | | a useful template instantiation stack. Fixes PR8640. This also causes a slight change to where the "instantianted from" note shows up in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but that isn't directly the fault of this patch. llvm-svn: 120135
* Switch a lot of call-sites over to using the new value-kind calculations.John McCall2010-11-247-30/+30
| | | | llvm-svn: 120084
* Redeclarations of using declarations are not okay in function scopes.John McCall2010-11-231-2/+2
| | | | | | | | Not sure what I was thinking before. Fixes PR8668. llvm-svn: 120063
* A few tweaks to the value-kind computation:John McCall2010-11-232-71/+88
| | | | | | | | | | | | | - Default argument expressions pick up the value kind of the incoming expression, not the value kind of the parameter it initializes. - When building a template argument for substitution, A::x is an rvalue if x is an instance method. - Anonymous struct/union paths pick up value kind the same way that normal member accesses do; extract out a common code path for this. Enable the value-kind assertion, now that it passes self-host. llvm-svn: 120055
* Remove static_casts from SemaDeclAttr.cppPeter Collingbourne2010-11-231-22/+22
| | | | llvm-svn: 120053
* Microsoft C anonymous struct implementation.Francois Pichet2010-11-231-29/+95
| | | | | | Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx llvm-svn: 120000
* Fix the source range of CXXNewExprs. Fixes http://llvm.org/pr8661.Nico Weber2010-11-221-2/+2
| | | | llvm-svn: 119966
* Fix a bunch of IndirectFieldDecl-related warnings.Benjamin Kramer2010-11-211-1/+1
| | | | | | - Negative ChainingSize doesn't make sense, make it unsigned. llvm-svn: 119943
* Major anonymous union/struct redesign.Francois Pichet2010-11-215-109/+122
| | | | | | | | | | | A new AST node is introduced: def IndirectField : DDecl<Value>; IndirectFields are injected into the anonymous's parent scope and chain back to the original field. Name lookup for anonymous entities now result in an IndirectFieldDecl instead of a FieldDecl. There is no functionality change, the code generated should be the same. llvm-svn: 119919
* Revert r119838 "Don't warn for empty 'if' body if there is a macro that ↵Argyrios Kyrtzidis2010-11-202-12/+9
| | | | | | | | | | expands to nothing" and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro. Thanks to Abramo Bagnara for the hint! llvm-svn: 119887
* A bundle of whitespace changes, separated out from the functional changes.Nick Lewycky2010-11-205-23/+21
| | | | llvm-svn: 119886
* Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:Argyrios Kyrtzidis2010-11-192-8/+16
| | | | | | | | | if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. llvm-svn: 119838
* objc_msgSend is not a builtin type in non-objc mode.Fariborz Jahanian2010-11-191-2/+7
| | | | | | Fixes //rdar://8686888 llvm-svn: 119813
* Refactoring. Get FunctionScopeInfo to use DiagnosticErrorTrap.Argyrios Kyrtzidis2010-11-191-9/+7
| | | | llvm-svn: 119764
* Refactoring.Argyrios Kyrtzidis2010-11-192-5/+5
| | | | | | Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope. llvm-svn: 119763
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-183-32/+29
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Add an assertion, fix a whole bunch of bugs, comment the assertionJohn McCall2010-11-184-143/+248
| | | | | | out because there are still bugs left. llvm-svn: 119722
OpenPOWER on IntegriCloud