summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert a number of statement parsers to smart pointers.Sebastian Redl2008-12-114-87/+88
| | | | llvm-svn: 60888
* Actually distinguish between RecordDecl::field_iterator and ↵Douglas Gregor2008-12-113-9/+10
| | | | | | RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls. llvm-svn: 60883
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-1131-371/+825
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
* Identify AnonPointeeRegion by the symbol that is concretized.Zhongxing Xu2008-12-111-10/+7
| | | | llvm-svn: 60870
* AnonPointeeRegions are now identified by the MemRegion of the pointer pointingZhongxing Xu2008-12-111-6/+6
| | | | | | to them. llvm-svn: 60868
* Make sure to promote expressions of the form (floating point + complex ↵Anders Carlsson2008-12-101-2/+10
| | | | | | integer) correctly, to (complex floating point + complex floating point) llvm-svn: 60862
* PreprocessorLexer (and subclasses):Ted Kremenek2008-12-101-10/+2
| | | | | | | | - Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token). PPLexerChange.cpp: - Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file. This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)'). It's also not a really hot part of the Preprocessor. llvm-svn: 60860
* Added a warning when referencing an if's condition variable in theDouglas Gregor2008-12-103-0/+28
| | | | | | | | | | | | | | | "else" clause, e.g., if (int X = foo()) { } else { if (X) { // warning: X is always zero in this context } } Fixes rdar://6425550 and lets me think about something other than DeclContext. llvm-svn: 60858
* The "real" fix for <rdar://problem/6424347> clang on xcode: Assertion ↵Steve Naroff2008-12-101-28/+30
| | | | | | | | failed: (0 && "unexpected type"), function mergeTypes, Commit r60845 was premature. llvm-svn: 60852
* Fix PR clang/3175: CheckAddressOfOperand does not handle references to class ↵Douglas Gregor2008-12-101-1/+4
| | | | | | vars llvm-svn: 60849
* Some cleanups to the dependent-types commit, as suggested by SebastianDouglas Gregor2008-12-102-41/+37
| | | | llvm-svn: 60848
* Fix <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && ↵Steve Naroff2008-12-101-27/+27
| | | | | | "unexpected type"), function mergeTypes, llvm-svn: 60845
* Declare PerIDCache as IdentifierInfo** instead of void*. This is just ↵Ted Kremenek2008-12-101-2/+2
| | | | | | cleaner. No performance change. llvm-svn: 60843
* Fix <rdar://problem/6418623> Bogus block type compatibility warning.Steve Naroff2008-12-101-1/+20
| | | | llvm-svn: 60842
* Use a scoped object to manage entry/exit from a parser scope rather than ↵Douglas Gregor2008-12-108-90/+70
| | | | | | explicitly calling EnterScope/ExitScope llvm-svn: 60830
* Append an extra newline to the module inline asm if it's not empty.Anders Carlsson2008-12-101-0/+5
| | | | llvm-svn: 60827
* Patch to allow a getter call using property dot-syntax notation.Fariborz Jahanian2008-12-101-1/+8
| | | | llvm-svn: 60816
* Modify the move emulation according to the excellent design of Howard ↵Sebastian Redl2008-12-109-181/+189
| | | | | | Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers. llvm-svn: 60809
* Fix to BasicStoreManager::getElementLValue: If the base region is a symbol, ↵Ted Kremenek2008-12-091-2/+13
| | | | | | layer an AnonTypedRegion on top of it. llvm-svn: 60808
* Prevent bogus warning on unimplemented setter/getter when userFariborz Jahanian2008-12-091-0/+8
| | | | | | has added declaration of these methods in its @interface. llvm-svn: 60803
* Have BasicStoreManager::getLValueElement() have logic similar to ↵Ted Kremenek2008-12-091-2/+37
| | | | | | BasicStoreManager::getLValueField() (i.e., don't just return the 'base' as the SVal) llvm-svn: 60795
* Support for implementation of property in the case whereFariborz Jahanian2008-12-095-14/+22
| | | | | | | the synthesis is in an implementation of s subclass of a super class where the property has been declared. llvm-svn: 60792
* Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResultSebastian Redl2008-12-0911-222/+108
| | | | llvm-svn: 60791
* Add preliminary CFG support for @throw. We basically treat it like a return ↵Ted Kremenek2008-12-091-1/+23
| | | | | | statement. llvm-svn: 60790
* In GRExprEngine treat @throw as an 'abort' that ends the current path. This ↵Ted Kremenek2008-12-091-0/+9
| | | | | | is a temporary solution. llvm-svn: 60789
* Lay the groundwork for converting the entire parser-sema chain to smart ↵Sebastian Redl2008-12-092-6/+9
| | | | | | pointers. llvm-svn: 60782
* Sema::ActOnMethodDeclaration(): Make sure we perform the default ↵Steve Naroff2008-12-091-2/+7
| | | | | | | | | function/array conversion for parameter types. This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"? and http://llvm.org/bugs/show_bug.cgi?id=2997. llvm-svn: 60781
* Fix a serious null termination bug found by David Chisnall!Chris Lattner2008-12-091-1/+1
| | | | llvm-svn: 60778
* Consistently use smart pointers for stmt and expr nodes in parser local ↵Sebastian Redl2008-12-0911-522/+530
| | | | | | variables. llvm-svn: 60761
* Add utility method. Remove an unused method.Zhongxing Xu2008-12-091-0/+2
| | | | llvm-svn: 60758
* [static analyzer] Extend VLA size checking to look for undefined sizes.Ted Kremenek2008-12-092-12/+40
| | | | llvm-svn: 60734
* Fixed LiveVariables bug where we didn't consider block-level expressions ↵Ted Kremenek2008-12-091-2/+12
| | | | | | that functioned as the size of a VLA to be live. llvm-svn: 60730
* Change condition under which 'retain'/'copy' are directly evaluated.Fariborz Jahanian2008-12-081-4/+6
| | | | llvm-svn: 60729
* Add checking for zero-sized VLAs.Ted Kremenek2008-12-082-3/+57
| | | | llvm-svn: 60726
* Fix PR3172: if we see an eof or } at the top level, reject it.Chris Lattner2008-12-081-0/+9
| | | | | | | This is important because ParseDeclarationOrFunctionDefinition skips to, but does not consume, an } on error. llvm-svn: 60719
* improve comment.Chris Lattner2008-12-081-1/+1
| | | | llvm-svn: 60718
* 'self.myIvar = nil' (properties) only releases myIvar when the property has ↵Ted Kremenek2008-12-081-2/+5
| | | | | | kind 'assign'. This fixes <rdar://problem/6380411>. llvm-svn: 60717
* ObjCInterfaceDecl::lookupInstanceMethod() needs to look through a categories ↵Steve Naroff2008-12-081-0/+8
| | | | | | | | protocols. Fixes <rdar://problem/6418640> clang on prokit: error: incompatible type returning 'id', expected 'NSSize' llvm-svn: 60716
* Changed 'readonly' 'retain/copy' diagnostics intoFariborz Jahanian2008-12-081-2/+3
| | | | | | warning as it is allowed in gcc and will break projects. llvm-svn: 60710
* Since we do not allow a readonly property to be 'copy'retain', weFariborz Jahanian2008-12-081-5/+1
| | | | | | | must allow the continuation class to extend it to a 'readwrite' and 'copy/retain'. llvm-svn: 60709
* Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it ↵Douglas Gregor2008-12-084-17/+10
| | | | | | belongs llvm-svn: 60708
* fix 80-col violation.Zhongxing Xu2008-12-081-1/+1
| | | | llvm-svn: 60693
* fix typo.Zhongxing Xu2008-12-081-1/+1
| | | | llvm-svn: 60686
* Workaround for PR3173. The fix is correct in the sense that if the enum Eli Friedman2008-12-081-0/+3
| | | | | | | | | code were working correctly, it would be a no-op, but it's not really a proper fix. That said, I don't really want to touch the enum code at the moment because I don't understand it very well, and this seems to be a relatively visible regression. llvm-svn: 60680
* add missing gentoo c++ include pathsNuno Lopes2008-12-071-0/+9
| | | | llvm-svn: 60655
* Pass the VLA size expr range to the VLA diagsAnders Carlsson2008-12-071-3/+13
| | | | llvm-svn: 60645
* Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.Anders Carlsson2008-12-071-10/+30
| | | | llvm-svn: 60638
* Setters returning a typedef of 'void' should not cause error.Fariborz Jahanian2008-12-061-1/+2
| | | | | | Bug reported by Chris L. llvm-svn: 60635
* Use of properties declared in protocols in the categoryFariborz Jahanian2008-12-063-8/+83
| | | | | | | via the category's protocol list1s, with appropriate diagnsostics and a test case. llvm-svn: 60634
* Improve error reporting of property and setter/getterFariborz Jahanian2008-12-061-2/+6
| | | | | | type mimatches. llvm-svn: 60630
OpenPOWER on IntegriCloud