summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add -Wc++11-compat warning for string and character literals followed byRichard Smith2012-03-071-5/+12
| | | | | | | 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-071-2/+11
| | | | | | 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-075-16/+36
| | | | | | | | | | | | | | | | 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
* Make sure we consistently canonicalize types when canonicalizing ↵Eli Friedman2012-03-071-3/+5
| | | | | | TemplateTemplateParmDecls. PR12179. llvm-svn: 152189
* objective-c lldb support: don't perform ivar access control check Fariborz Jahanian2012-03-072-10/+12
| | | | | | 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-072-0/+16
| | | | | | 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-074-131/+22
| | | | | | | | | | | | | | | | | 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] 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-061-0/+10
| | | | | | block in the CFG. llvm-svn: 152163
* 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
* CMake: Fix build to add clangEdit to USED_LIBS.NAKAMURA Takumi2012-03-062-1/+8
| | | | llvm-svn: 152154
* Extended the UnknownAnyTy resolver to handleSean Callanan2012-03-061-10/+34
| | | | | | | | 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
* [driver] What was implemented in r152130 was actually -fno-inline-functions, notChad Rosier2012-03-062-5/+6
| | | | | | | -fno-inline. Part of rdar://10972766 llvm-svn: 152145
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-0623-65/+1834
| | | | | | | | | | | 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-063-31/+128
| | | | llvm-svn: 152139
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-0635-56/+2682
| | | | | | | | | | | | | 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
* [driver] Add support for -fno-inline.Chad Rosier2012-03-062-2/+7
| | | | | | rdar://10972766 llvm-svn: 152130
* Undo patch for // rdar://10735698Fariborz Jahanian2012-03-061-6/+1
| | | | llvm-svn: 152128
* AST: Move several Type::is...Type() functions to be inline.Daniel Dunbar2012-03-061-53/+8
| | | | | | | | | | | | - 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
* objective-c modern translator. Don't ignore unnamed bitfieldsFariborz Jahanian2012-03-061-5/+2
| | | | | | when rewriting. llvm-svn: 152123
* User-defined literals: reject string and character UDLs in all places where theRichard Smith2012-03-0614-35/+138
| | | | | | | | | | 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-061-6/+0
| | | | | | The latter is just a worse version of the former. llvm-svn: 152096
* [analyzer] add a diagnostic event when entering a call via inlining, within ↵Ted Kremenek2012-03-063-5/+38
| | | | | | the callee, and add an edge. llvm-svn: 152086
* [analyzer] 'Looping back to the head of the loop' diagnostics are prunable.Ted Kremenek2012-03-061-0/+1
| | | | llvm-svn: 152083
* [analyzer] Remove now-unused constant. No functionality change.Jordy Rose2012-03-061-2/+0
| | | | llvm-svn: 152080
* [analyzer] Fix unnecessary dyn_cast_or_null. No functionality change.Jordy Rose2012-03-061-2/+2
| | | | llvm-svn: 152078
* Teak CallAndMessageChecker to only warn about uninitialized struct fields in ↵Ted Kremenek2012-03-051-2/+18
| | | | | | | | | | call arguments when the called function is never inlined. Fixes <rdar://problem/10977037>. llvm-svn: 152073
* static_assert: Allow any string-literal as the message, not just a characterRichard Smith2012-03-052-3/+7
| | | | | | | string literal, and adjust the diagnostic code to match. This also causes us to escape any control characters in the message. llvm-svn: 152069
* Teach SimpleSValBuilder that (in the absence of more information) stack ↵Ted Kremenek2012-03-051-0/+18
| | | | | | memory doesn't alias symbolic memory. This is a heuristic/hack, but works well in practice. Fixes <rdar://problem/10978247>. llvm-svn: 152065
* AST/stats: Don't effectively use an out-of-line function to return a staticDaniel Dunbar2012-03-053-12/+8
| | | | | | bool. Ugh. llvm-svn: 152062
* [analyzer] Time the execution (per each TU) with -analyzer-stats.Anna Zaks2012-03-051-2/+18
| | | | llvm-svn: 152059
* If the element type of an initializer list has a destructor, make sure we ↵Sebastian Redl2012-03-052-2/+14
| | | | | | check it. Fixes PR12178. llvm-svn: 152048
* patch to optionally warn for block implementations without explicit Fariborz Jahanian2012-03-051-1/+6
| | | | | | return types that return non-void values. // rdar://10735698 llvm-svn: 152047
* [analyzer] False positive in SelfInit - teach the checker about methodAnna Zaks2012-03-051-10/+35
| | | | | | calls with self as a parameter. llvm-svn: 152039
* [analyzer] Malloc should assume that ownership is transfered whenAnna Zaks2012-03-051-1/+10
| | | | | | calling an ObjC method ending with 'NoCopy'. llvm-svn: 152037
* Avoid double lookup.Benjamin Kramer2012-03-051-3/+5
| | | | llvm-svn: 152033
* Properly handle non-canonical underlying types inPeter Collingbourne2012-03-051-1/+1
| | | | | | | ASTContext::getUnaryTransformType. This can happen if, for example, an enumeration's underlying type is a typedef. llvm-svn: 152031
* Fix a -Wstring-plus-int warning.Nico Weber2012-03-051-1/+1
| | | | | | Patch from Sean Silva <silvas@purdue.edu>! llvm-svn: 152030
* TargetInfo: create less temporary strings.Benjamin Kramer2012-03-051-16/+17
| | | | llvm-svn: 152029
* Fix a small difference in sema and codegen views of what needs to be output.Rafael Espindola2012-03-056-4/+29
| | | | | | | | | | | | In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. llvm-svn: 152024
* Fix a bug in the mangler where in 'namespace std { extern "C" {X;} }', X ↵James Molloy2012-03-051-5/+4
| | | | | | | | would not be seen to be in ::std::. Migrate two other places where the same logic is used to use the helper function that already exists. llvm-svn: 152022
* [arcmt]Argyrios Kyrtzidis2012-03-053-27/+39
| | | | | | | | | -Make sure we don't change to '__weak' a __block variable used as output. -Make sure we don't apply __weak twice. Fixes rdar://10520757&10521362 llvm-svn: 152020
* [preprocessor] Enhance PreprocessingRecord to keep track of locations of ↵Argyrios Kyrtzidis2012-03-054-7/+102
| | | | | | | | | conditional directives. Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns true if a given range intersects with a conditional directive block. llvm-svn: 152018
* [preprocessor] Enhance the preprocessor callbacks:Argyrios Kyrtzidis2012-03-051-27/+29
| | | | | | | | -Add location parameter for the directives callbacks -Skip callbacks if the directive is inside a skipped range. -Make sure the directive callbacks are invoked in source order. llvm-svn: 152017
OpenPOWER on IntegriCloud