summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Diagnose the use of "inline" on block-scope function declarations inDouglas Gregor2010-08-061-0/+11
| | | | | | C++, from Andrea Nall! llvm-svn: 110439
* Properly pop out of Objective-C method declarations when they are (ill-formedly)John McCall2010-08-061-1/+3
| | | | | | found within contexts other than the translation unit. llvm-svn: 110417
* Implement #pragma GCC visibility.Eli Friedman2010-08-051-0/+15
| | | | llvm-svn: 110315
* Only look up an 'operator delete' on the definition of a destructor, not onJohn McCall2010-08-041-7/+5
| | | | | | a declaration. llvm-svn: 110175
* Further adjustments to -Wglobal-constructors; works for references and directJohn McCall2010-08-021-4/+7
| | | | | | initializations now. llvm-svn: 110063
* Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr ↵Argyrios Kyrtzidis2010-08-021-3/+3
| | | | | | for them that will deserialize them when needed. llvm-svn: 110031
* Kill off RequiresGlobalConstructor in favor of isConstantInitializer.John McCall2010-08-011-53/+2
| | | | | | Note some obvious false positives in the test case. llvm-svn: 109986
* Make a first pass at implementing -Wglobal-constructors. I'm worried that thisJohn McCall2010-08-011-1/+64
| | | | | | | will end up bizarrely mirroring CGExprConstant, but that might be the hazard of this feature. llvm-svn: 109984
* Fix indentation.John McCall2010-08-011-9/+9
| | | | llvm-svn: 109965
* Don't consider all local variables in C++ to mandate scope-checking, justJohn McCall2010-08-011-2/+10
| | | | | | those with initializers. llvm-svn: 109964
* Only run the jump-checker if there's a branch-protected scope *and* there'sJohn McCall2010-08-011-6/+2
| | | | | | | | | | a switch or goto somewhere in the function. Indirect gotos trigger the jump-checker regardless, because the conditions there are slightly more elaborate and it's too marginal a case to be worth optimizing. Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918 llvm-svn: 109962
* Fixed typedef inside extern "C".Abramo Bagnara2010-07-301-29/+9
| | | | llvm-svn: 109865
* Allow a looser form of compatibility checking (which ignoresDouglas Gregor2010-07-291-3/+5
| | | | | | | qualifiers) when checking a K&R function definition against a previous prototype. Fixes <rdar://problem/8193107>. llvm-svn: 109751
* Don't set out-of-line template specialization/definition informationDouglas Gregor2010-07-281-2/+2
| | | | | | | for AST nodes that aren't actually out-of-line (i.e., require a nested-name-specifier). Fixes <rdar://problem/8204126>. llvm-svn: 109704
* Fix namespace polution.Dan Gohman2010-07-261-0/+3
| | | | llvm-svn: 109440
* Remove the vast majority of the Destroy methods from the AST library,Douglas Gregor2010-07-251-4/+1
| | | | | | since we aren't going to be calling them ever. llvm-svn: 109377
* Be careful; even though we had a proper name at the beginning ofDouglas Gregor2010-07-241-1/+1
| | | | | | | Sema::ActOnDeclarator doesn't mean that the Decl we ended up creating has a useful name. <rdar://problem/8229910> llvm-svn: 109296
* We never want to pop the translation unit DC, so assert if this happens.John McCall2010-07-231-0/+1
| | | | llvm-svn: 109280
* Update ImplicitCastExpr to be able to represent an XValue.Sebastian Redl2010-07-201-1/+1
| | | | llvm-svn: 108807
* Revert Microsoft-specific override of the "typedef requires a name"Douglas Gregor2010-07-161-4/+3
| | | | | | | diagnostic. Instead, put it and the "declaration does not declare anything" warning into -Wmissing-declarations. llvm-svn: 108527
* Suppress the "typedef requires a name" warning in Microsoft-extensions modeDouglas Gregor2010-07-161-2/+3
| | | | llvm-svn: 108526
* Treat template parameters as part of the declaration-specifiers for theJohn McCall2010-07-161-1/+1
| | | | | | | | purpose of access control. Fixes PR7644. I can't actually find anything directly justifying this, but it seems obvious. llvm-svn: 108521
* Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.Chandler Carruth2010-07-161-5/+5
| | | | llvm-svn: 108505
* Add builtin definition for scanf, including extending the builtin encoding toTed Kremenek2010-07-161-0/+6
| | | | | | | | | | represent builtins that have the "scanf" attribution (via the format attribute) just like we do with printf functions. Follow-up work is needed to add similar support for fscanf et al. This is to support format-string checking for scanf functions. llvm-svn: 108499
* When there are extra or missing template parameter lists in a templateDouglas Gregor2010-07-141-5/+19
| | | | | | | | | | definition, we're likely going to end up breaking the invariants of the template system, e.g., that the depths of template parameter lists match up with the nesting template of the template. So, make sure we mark such ill-formed declarations as invalid or don't even build them at all. llvm-svn: 108372
* Diagnose typedef of an operator name. Fixes PR7462Douglas Gregor2010-07-131-0/+6
| | | | llvm-svn: 108233
* Complain when an unnamed enumeration has no enumerations (inDouglas Gregor2010-07-131-0/+8
| | | | | | C++). Fixes PR7466. llvm-svn: 108231
* Produce an error on encountering a pointer or reference to a qualified ↵Sebastian Redl2010-07-121-0/+17
| | | | | | function type. Fixes PR7470. llvm-svn: 108209
* Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵Argyrios Kyrtzidis2010-07-071-3/+3
| | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-021-1/+1
| | | | llvm-svn: 107510
* Add a new routine Sema::LookupDestructor and make all destructor-lookup ↵Douglas Gregor2010-07-011-1/+1
| | | | | | calls use that routine llvm-svn: 107444
* Remove unnecessary ASTContext parameter fromDouglas Gregor2010-07-011-1/+1
| | | | | | CXXRecordDecl::getDestructor(); no functionality change. llvm-svn: 107394
* Reinstate fix for PR7526, which was failing because, now that weDouglas Gregor2010-07-011-1/+1
| | | | | | | | | | | | | | | aren't dropping all exception specifications on destructors, the exception specifications on implicitly-declared destructors were detected as being wrong (which they were). Introduce logic to provide a proper exception-specification for implicitly-declared destructors. This also fixes PR6972. Note that the other implicitly-declared special member functions also need to get exception-specifications. I'll deal with that in a subsequent commit. llvm-svn: 107385
* Revert r107374, which broke bootstrap.Douglas Gregor2010-07-011-1/+1
| | | | llvm-svn: 107378
* When building the type of a destructor, make sure to keep theDouglas Gregor2010-07-011-1/+1
| | | | | | exception specification. Fixes PR7526. llvm-svn: 107374
* Add comment for my last patch.Fariborz Jahanian2010-06-251-1/+7
| | | | llvm-svn: 106813
* Fixes a regression when redeclaration of a global satic Fariborz Jahanian2010-06-241-1/+2
| | | | | | is an extern local to a function. Radar 8125274. llvm-svn: 106773
* In C++, allow a declaration of an enum to follow a definition of thatDouglas Gregor2010-06-221-4/+11
| | | | | | enum as a GNU extension. llvm-svn: 106540
* Fixes a corner case bug whereby declaring and defining an extern variable in a Fariborz Jahanian2010-06-211-0/+4
| | | | | | | particular sequence causes its definition to not be generated in the object file. (fixes radar 8071804). llvm-svn: 106424
* Merge the "regparm" attribute from a previous declaration of aDouglas Gregor2010-06-181-2/+16
| | | | | | function to redeclarations of that function. Fixes PR7025. llvm-svn: 106317
* Fix the recently-added warning about 'typename' and 'template'Douglas Gregor2010-06-161-1/+1
| | | | | | | | | disambiguation keywords outside of templates in C++98/03. Previously, the warning would fire when the associated nested-name-specifier was not dependent, but that was a misreading of the C++98/03 standard: now, we complain only when we're outside of any template. llvm-svn: 106161
* Don't poke at an undefined class type of a field. Fixes PR7355.Douglas Gregor2010-06-161-34/+35
| | | | llvm-svn: 106111
* Fix the build. Using declarations should not be considering when lookingJohn McCall2010-06-161-1/+1
| | | | | | for overridden virtual methods. llvm-svn: 106096
* Fix a point of semantics with using declaration hiding: method templatesJohn McCall2010-06-161-8/+6
| | | | | | | | | | | | | | | | | introduced by using decls are hidden even if their template parameter lists or return types differ from the "overriding" declaration. Propagate using shadow declarations around more effectively when looking up template-ids. Reperform lookup for template-ids in member expressions so that access control is properly set up. Fix some number of latent bugs involving template-ids with totally invalid base types. You can only actually get these with a scope specifier, since otherwise the template-id won't parse as a template-id. Fixes PR7384. llvm-svn: 106093
* Give Type::isIntegralType() an ASTContext parameter, so that itDouglas Gregor2010-06-161-2/+2
| | | | | | | | | | | | provides C "integer type" semantics in C and C++ "integral type" semantics in C++. Note that I still need to update isIntegerType (and possibly other predicates) using the same approach I've taken for isIntegralType(). The two should have the same meaning, but currently don't (!). llvm-svn: 106074
* Introduce Type::isIntegralOrEnumerationType(), to cover those placesDouglas Gregor2010-06-161-3/+3
| | | | | | | | | | in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. llvm-svn: 106071
* Patch adds support for copying of thoseFariborz Jahanian2010-06-151-0/+6
| | | | | | | | objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). llvm-svn: 106061
* Allocate template parameter lists for out-of-line definitions via theDouglas Gregor2010-06-151-3/+6
| | | | | | ASTContext rather than via the normal heap. llvm-svn: 106008
* Added template parameters info for out-of-line definitions of class template ↵Abramo Bagnara2010-06-121-5/+26
| | | | | | methods. llvm-svn: 105882
* Split DependentNameType into two types. DependentNameType represents theJohn McCall2010-06-111-8/+2
| | | | | | | | | | | | | | case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. llvm-svn: 105801
OpenPOWER on IntegriCloud