- Jan 07, 2009
-
-
Ted Kremenek authored
llvm-svn: 61894
-
Ted Kremenek authored
llvm-svn: 61888
-
Douglas Gregor authored
llvm-svn: 61886
-
Douglas Gregor authored
Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions llvm-svn: 61885
-
Fariborz Jahanian authored
of category implementation is undeclared. Issue error instead. llvm-svn: 61882
-
Fariborz Jahanian authored
method on 'super' receiver in a category implementation. Other simpler cases were working by accident. llvm-svn: 61880
-
Douglas Gregor authored
Duplicate-member checking within classes is still a little messy, and anonymous unions are still completely broken in C. We'll need to unify the handling of fields in C and C++ to make this code applicable in both languages. llvm-svn: 61878
-
Steve Naroff authored
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it. llvm-svn: 61866
-
Douglas Gregor authored
Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts llvm-svn: 61861
-
Douglas Gregor authored
out its lookup context (to see through linkage specifications). Addresses <rdar://problem/6477142>. llvm-svn: 61848
-
Douglas Gregor authored
structures and classes) in C++. Covers name lookup and the synthesis and member access for the unnamed objects/fields associated with anonymous unions. Some C++ semantic checks are still missing (anonymous unions can't have function members, static data members, etc.), and there is no support for anonymous structs or unions in C. llvm-svn: 61840
-
Ted Kremenek authored
recent discussions with Thomas Clement and Ken Ferry concerning the "fundamental rule" for Cocoa memory management (http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html). Here is the revised behavior of the checker concerning tracking retain/release counts for objects returned from message expressions involving instance methods: 1) Track the returned object if the return type of the message expression is id<..>, id, or a pointer to *any* object that subclasses NSObject. Such objects are assumed to have a retain count. Previously the checker only tracked objects when the receiver of the message expression was part of the standard Cocoa API (i.e., had class names prefixed with 'NS'). This should significantly expand the amount of checking performed. 2) Consider the object owned if the selector of the message expression contains "alloc", "new", or "copy". Previously we also considered "create", but this doesn't follow from the fundamental rule (discussions with the Cocoa folks confirms this). llvm-svn: 61837
-
Douglas Gregor authored
nested in the translation unit. This fixes <rdar://problem/6476070>. llvm-svn: 61832
-
- Jan 06, 2009
-
-
Ted Kremenek authored
- Big Idea: Source files are now mmaped when ContentCache::getBuffer() is first called. While this doesn't change the functionality when lexing regular source files, it can result in source files not being paged in when using PTH. - Performance change: - No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing regular source lexing. - No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using PTH. We do observe, however, a reduction of 279K in memory mapped source code (3% reduction). The majority of pages from Cocoa.h (and friends) are still being pulled in, however, because any literal will cause Preprocessor::getSpelling() to be called (causing the source for the file to get pulled in). The next possible optimization is to cache literal strings in the PTH file to avoid the need for the original header sources entirely. - Right now there is a preprocessor directive to toggle between "lazy" and "eager" creation of MemBuffers. This is not permanent, and is there in the short term to just test additional optimizations. llvm-svn: 61827
-
-
Ted Kremenek authored
Add whitespace to silence the following warning in a Release build: warning: suggest a space before ';' or explicit braces around empty body in 'while' statement llvm-svn: 61820
-
Ted Kremenek authored
Return UnknownVal in RegionStoreManager::getSizeInElements() for unsupported regions. This silences a warning when compiling Release-Asserts builds. llvm-svn: 61818
-
Fariborz Jahanian authored
to track down, easy to fix. This is on going. llvm-svn: 61817
-
rdar://problem/5956221Steve Naroff authored
Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized. This fix is C++ specific. llvm-svn: 61816
-
Chris Lattner authored
- Simplify ParseDeclCXX to use early exit on error instead of nesting. - Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume. - If we don't see the ; in a using directive, still call the action, for hopefully better error recovery. llvm-svn: 61801
-
Chris Lattner authored
llvm-svn: 61800
-
Chris Lattner authored
llvm-svn: 61799
-
Douglas Gregor authored
llvm-svn: 61798
-
Chris Lattner authored
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier. llvm-svn: 61796
-
Chris Lattner authored
llvm-svn: 61795
-
Douglas Gregor authored
information for declarations that were referenced via a qualified-id, e.g., N::C::value. We keep track of the location of the start of the nested-name-specifier. Note that the difference between QualifiedDeclRefExpr and DeclRefExpr does have an effect on the semantics of function calls in two ways: 1) The use of a qualified-id instead of an unqualified-id suppresses argument-dependent lookup 2) If the name refers to a virtual function, the qualified-id version will call the function determined statically while the unqualified-id version will call the function determined dynamically (by looking up the appropriate function in the vtable). Neither of these features is implemented yet, but we do print out qualified names for QualifiedDeclRefExprs as part of the AST printing. llvm-svn: 61789
-
Chris Lattner authored
shorter and more accurate. The type name might not be qualified. llvm-svn: 61788
-
Ted Kremenek authored
- 'Buffer' is now private and must be accessed via 'getBuffer()'. This paves the way for lazily mapping in source files on demand. - Added 'getSize()' (which gets the size of the content without necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'. - Modifed SourceManager to use these new methods. This reduces the number of places that actually access the MemBuffer object for a file to those that actually look at the character data. These changes result in no performance change for -fsyntax-only on Cocoa.h. llvm-svn: 61782
-
Chris Lattner authored
avoid the version of Preprocessor::getSpelling that returns an std::string. llvm-svn: 61769
-
- Jan 05, 2009
-
-
Daniel Dunbar authored
Improve ext vector test case. llvm-svn: 61766
-
Daniel Dunbar authored
llvm-svn: 61764
-
Daniel Dunbar authored
llvm-svn: 61763
-
Daniel Dunbar authored
- I'm not sure this is appropriate, but it seems reasonable to be able to call getFloatingRank on anything which isFloatingType(). llvm-svn: 61758
-
Sebastian Redl authored
llvm-svn: 61747
-
Sebastian Redl authored
Make C++ classes track the POD property (C++ [class]p4) Track the existence of a copy assignment operator. Implicitly declare the copy assignment operator if none is provided. Implement most of the parsing job for the G++ type traits extension. Fully implement the low-hanging fruit of the type traits: __is_pod: Whether a type is a POD. __is_class: Whether a type is a (non-union) class. __is_union: Whether a type is a union. __is_enum: Whether a type is an enum. __is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1). llvm-svn: 61746
-
Douglas Gregor authored
DeclContexts whose members are visible from enclosing DeclContexts up to (and including) the innermost enclosing non-transparent DeclContexts. Transparent DeclContexts unify the mechanism to be used for various language features, including C enumerations, anonymous unions, C++0x inline namespaces, and C++ linkage specifications. Please refer to the documentation in the Clang internals manual for more information. Only enumerations and linkage specifications currently use transparent DeclContexts. Still to do: use transparent DeclContexts to implement anonymous unions and GCC's anonymous structs extension, and, later, the C++0x features. We also need to tighten up the DeclContext/ScopedDecl link to ensure that every ScopedDecl is in a single DeclContext, which will ensure that we can then enforce ownership and reduce the memory footprint of DeclContext. llvm-svn: 61735
-
Chris Lattner authored
their length. llvm-svn: 61734
-
Douglas Gregor authored
llvm-svn: 61700
-
Chris Lattner authored
isn't worth the complexity and the code already does a ton of lookahead. llvm-svn: 61671
-
Chris Lattner authored
llvm-svn: 61668
-