summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] Enhance clang_getOverriddenCursors.Argyrios Kyrtzidis2012-03-087-42/+79
| | | | | | | | | | | | | | | | | | | | | | | | Basically the current design is: -for an implementation method, show as overridden the interface method. This is not useful, and is inconsistent with the C++ side -for an interface method, show as overridden the protocols methods (this is desirable) and the methods from the categories; methods from categories are not useful since they are considered the same method (same USR). -If there is a protocol method or category method reported, it does not check the super class for overridden methods. This is really problematic since overridden methods from super class is what we want to give back. Change clang_getOverriddenCursors to show as overridden any method in the class's base class, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). If no such method exists, the search continues to the class's superclass, its protocols, and its categories, and so on. A method from an Objective-C implementation is considered to override the same methods as its corresponding method in the interface. rdar://10967206 llvm-svn: 152270
* Workaround module test failures by removing the version info from module hashes.Bob Wilson2012-03-071-1/+4
| | | | | | | | | | PR12196: The module hash strings are not actually hashing the compiler version string; the entire version string is being included in the hash. Depending on the module cache directory name, that can lead to failures where the path names become too long. As a temporary workaround, just remove the version string from the hash. llvm-svn: 152266
* Remove unnecessary include in ExprObjC.hRichard Trieu2012-03-071-1/+0
| | | | llvm-svn: 152239
* Be smarter in discovering list-initialization of temporaries. Fixes PR12182.Sebastian Redl2012-03-072-1/+9
| | | | llvm-svn: 152231
* Correct the documentation to give a legal example of a raw string literal.Richard Smith2012-03-071-1/+2
| | | | llvm-svn: 152216
* AST representation for user-defined literals, plus just enough of semanticRichard Smith2012-03-0729-23/+385
| | | | | | | | | | | | | | | | | | | | | analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation. UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids). User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present. This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday. llvm-svn: 152211
* Test fix-it added in r152198.Richard Smith2012-03-071-0/+9
| | | | llvm-svn: 152199
* Add -Wc++11-compat warning for string and character literals followed byRichard Smith2012-03-073-5/+25
| | | | | | | identifiers, in cases where those identifiers would be treated as user-defined literal suffixes in C++11. llvm-svn: 152198
* Don't even try to directly emit the value of a DeclRefExpr if that declarationRichard Smith2012-03-072-3/+12
| | | | | | is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c. llvm-svn: 152193
* [PCH] Mark a PCH file with a flag to indicate if the serialized AST hadArgyrios Kyrtzidis2012-03-0715-26/+97
| | | | | | | | | | | | | | | | compiler errors or not. -Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time. By default, such a PCH file will be rejected with an error when trying to load it. [libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors occurred. -Have libclang API calls accept a PCH that had compiler errors. The general idea is that we want libclang to stay functional even if a PCH had a compiler error. rdar://10976363. llvm-svn: 152192
* Correct test from r152189.Eli Friedman2012-03-071-1/+1
| | | | llvm-svn: 152191
* Make sure we consistently canonicalize types when canonicalizing ↵Eli Friedman2012-03-072-3/+11
| | | | | | TemplateTemplateParmDecls. PR12179. llvm-svn: 152189
* objective-c lldb support: don't perform ivar access control check Fariborz Jahanian2012-03-073-10/+82
| | | | | | when debugging. // rdar://10997647 llvm-svn: 152187
* More git-svn compatible version string, by request.Andrew Trick2012-03-071-11/+18
| | | | | | | | | | | | | | | | | If you're using git-svn, the clang and llvm repository will typically map to a different revision. Before we had: clang version 3.1 (trunk 152167 trunk 152162) After this change: clang version 3.1 (trunk 152167) (llvm/trunk 152162) So it's self-descriptive with an extra parens group. Which is more compatible with version string parsers is probably debatable, but this style was requested. llvm-svn: 152183
* The constant folder's diagnosic mechanism is irrelevant for C; don't botherRichard Smith2012-03-071-4/+0
| | | | | | producing a C-only diagnostic. llvm-svn: 152181
* [driver] Don't try to generate diagnostic information for linker crashes.Chad Rosier2012-03-073-0/+17
| | | | | | rdar://10993648 llvm-svn: 152180
* Silence unused variable warnings.Benjamin Kramer2012-03-071-3/+3
| | | | llvm-svn: 152170
* Refactor Clang sema attribute handling.Michael Han2012-03-0711-250/+202
| | | | | | | | | | | | | | | | | This submission improves Clang sema handling by using Clang tablegen to generate common boilerplate code. As a start, it implements AttributeList enumerator generation and case statements for AttributeList::getKind. A new field "SemaHandler" is introduced in Attr.td and by default set to 1 as most of attributes in Attr.td have semantic checking in Sema. For a small number of attributes that don't appear in Sema, the value is set to 0. Also there are a small number of attributes that only appear in Sema but not in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList. Reviewed by Delesley Hutchins. llvm-svn: 152169
* AST: fix build since r152060Dylan Noblesmith2012-03-072-6/+7
| | | | | | | | | | | | The declarations of the operators no longer matched. The definitions in ASTContext.h had 'throw()' removed, but it was still present in Attr.h. Somehow the buildbots missed this. clang merely warns about a missing 'throw()' specification and suggested a Fix-It adding it back, but gcc 4.5 is not so forgiving and gives an error. llvm-svn: 152167
* [AST] VarDecl::hasDefinition() - Early exit if we find a strong definition.Daniel Dunbar2012-03-061-1/+4
| | | | llvm-svn: 152166
* [AST] FunctionDecl::getBuiltinID() - Eliminate spurious calls to getASTContextDaniel Dunbar2012-03-061-2/+5
| | | | | | -- which is very much not free -- in the common case. llvm-svn: 152165
* Fix horrific CFG bug where '@autoreleasepool' would be put in a dangling ↵Ted Kremenek2012-03-062-0/+27
| | | | | | block in the CFG. llvm-svn: 152163
* Missing period.Chad Rosier2012-03-061-1/+1
| | | | llvm-svn: 152160
* Whitespace.Chad Rosier2012-03-061-1/+1
| | | | llvm-svn: 152159
* Cleanup (style). Thanks to Argyrios for catchingSean Callanan2012-03-061-8/+3
| | | | | | this. llvm-svn: 152158
* commit access verified, revert changeMichael Han2012-03-061-1/+0
| | | | llvm-svn: 152156
* test commit accessMichael Han2012-03-061-0/+1
| | | | llvm-svn: 152155
* CMake: Fix build to add clangEdit to USED_LIBS.NAKAMURA Takumi2012-03-062-1/+8
| | | | llvm-svn: 152154
* [objcmt] Add a triple to test/ARCMT/objcmt-subscripting-literals.mArgyrios Kyrtzidis2012-03-062-2/+2
| | | | llvm-svn: 152151
* Extended the UnknownAnyTy resolver to handleSean Callanan2012-03-062-10/+45
| | | | | | | | blocks with unknown return types. This allows LLDB to call blocks even when their return types aren't provided in the debug information. llvm-svn: 152147
* get rid of an unsued variable warning.Fariborz Jahanian2012-03-061-1/+1
| | | | llvm-svn: 152146
* [driver] What was implemented in r152130 was actually -fno-inline-functions, notChad Rosier2012-03-066-14/+15
| | | | | | | -fno-inline. Part of rdar://10972766 llvm-svn: 152145
* Just use memcpy directly, uninitialized_copy requires an <algorithm> include.Benjamin Kramer2012-03-061-1/+1
| | | | | | Newer libstdc++s don't include it transitively everywhere. llvm-svn: 152142
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-0664-99/+3748
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* Enable default @synthesize by default.Ted Kremenek2012-03-061-1/+1
| | | | llvm-svn: 152140
* Add static analyzer support for new NSArray/NSDictionary/NSNumber literals.Ted Kremenek2012-03-068-41/+282
| | | | llvm-svn: 152139
* And libclang cursor/indexing support for new Objective-C ↵Ted Kremenek2012-03-0611-13/+397
| | | | | | NSArray/NSDictionary/NSNumber literals. llvm-svn: 152138
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-0689-68/+5092
| | | | | | | | | | | | | NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
* Whitespace.Chad Rosier2012-03-062-2/+0
| | | | llvm-svn: 152134
* Minor fix for r152130. Put -fno-inline in f_Group.Chad Rosier2012-03-061-1/+1
| | | | llvm-svn: 152132
* [driver] Add support for -fno-inline.Chad Rosier2012-03-066-3/+34
| | | | | | rdar://10972766 llvm-svn: 152130
* Undo patch for // rdar://10735698Fariborz Jahanian2012-03-065-31/+4
| | | | llvm-svn: 152128
* AST: Move several Type::is...Type() functions to be inline.Daniel Dunbar2012-03-063-53/+67
| | | | | | | | | | | | - These functions are both (a) very commonly called and (b) excellent candidates for CSE in the callers in which they are commonly used. - That isHalfType() is hot makes me sad, but it is trivially when inlined (and a huge waste of time when not!!!). - The extra IsEnumDeclComplete() function is a hack to break the cycle between Type.h and Decl.h, I'm not sure of how to do this more cleanly, but am open to ideas. llvm-svn: 152126
* NamespaceDecl: Call non-virtual method inside virtual method, not the other ↵Benjamin Kramer2012-03-061-10/+10
| | | | | | | | way round. Moves the virtual call out of a hot path during lookup, no other functionality change. llvm-svn: 152124
* objective-c modern translator. Don't ignore unnamed bitfieldsFariborz Jahanian2012-03-062-5/+25
| | | | | | when rewriting. llvm-svn: 152123
* Use newly introduced const-goodness of TinyPtrVector.Argyrios Kyrtzidis2012-03-061-1/+1
| | | | llvm-svn: 152108
* User-defined literals: reject string and character UDLs in all places where theRichard Smith2012-03-0624-40/+245
| | | | | | | | | | grammar requires a string-literal and not a user-defined-string-literal. The two constructs are still represented by the same TokenKind, in order to prevent a combinatorial explosion of different kinds of token. A flag on Token tracks whether a ud-suffix is present, in order to prevent clients from needing to look at the token's spelling. llvm-svn: 152098
* Use TinyPtrVector instead of UsuallyTinyPtrVector.Argyrios Kyrtzidis2012-03-063-9/+3
| | | | | | The latter is just a worse version of the former. llvm-svn: 152096
* Move clang/Basic/UsuallyTinyPtrVector.h to llvm/ADT/UsuallyTinyPtrVector.h.Argyrios Kyrtzidis2012-03-063-140/+2
| | | | | | Depends on llvm commit r152090. llvm-svn: 152091
* [analyzer] add a diagnostic event when entering a call via inlining, within ↵Ted Kremenek2012-03-065-7/+90
| | | | | | the callee, and add an edge. llvm-svn: 152086
OpenPOWER on IntegriCloud