summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* C++ status:Richard Smith2013-05-071-19/+18
| | | | | | | | | - fix paper links to point to isocpp.org, where most of the papers are already up - update "SVN" features to "Clang 3.3" to distinguish them from features which we complete after the branch - document use of -std=c++1y to enable c++1y support llvm-svn: 181283
* [analyzer; alternate arrows] provide a diagnostic for entering a loop for ↵Ted Kremenek2013-05-071-20/+90
| | | | | | the first time. llvm-svn: 181282
* DebugInfo: Support imported modules (using directives) within lexical blocks.David Blaikie2013-05-062-7/+16
| | | | llvm-svn: 181272
* [analyzer; alternate arrows] don't increment the path iterator when we just ↵Ted Kremenek2013-05-061-13/+22
| | | | | | | | | deleted the next iterator. This is an optimization. It is possible that by deleting the next edge we will pattern match again at the current spot. llvm-svn: 181256
* Grab-bag of bit-field fixes:John McCall2013-05-0615-24/+147
| | | | | | | | | | | | | | - References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. llvm-svn: 181252
* Add missing initialization for Sema::CurScope. This is important for AST ↵Richard Smith2013-05-061-1/+1
| | | | | | consumers which don't create a Parser. Pointed out by Tom Honermann. llvm-svn: 181251
* Move PragmaCommentHandler to lib/Parse in preparation for calling SemaReid Kleckner2013-05-068-78/+90
| | | | | | | | | | | | | | Summary: No functionality change. The existing tests for this pragma only verify that we can preprocess it. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D751 llvm-svn: 181246
* Modify ASTReaderListener to allow visiting the input files of an AST file.Argyrios Kyrtzidis2013-05-062-8/+68
| | | | | | We can pass such an input-file-visiting ASTReaderListener to ASTReader::readASTFileControlBlock. llvm-svn: 181238
* Have the RecursiveASTVisitor traverse the type source info of an objc class ↵Argyrios Kyrtzidis2013-05-064-5/+17
| | | | | | message. llvm-svn: 181237
* [analyzer] Remove now-unused bindCompoundLiteral helper function.Jordan Rose2013-05-064-53/+0
| | | | | | | | The one user has been changed to use getLValue on the compound literal expression and then use the normal bindLoc to assign a value. No need to special case this in the StoreManager. llvm-svn: 181214
* [analyzer] Handle CXXTemporaryObjectExprs in compound literals.Jordan Rose2013-05-062-20/+59
| | | | | | | | | | | | This occurs because in C++11 the compound literal syntax can trigger a constructor call via list-initialization. That is, "Point{x, y}" and "(Point){x, y}" end up being equivalent. If this occurs, the inner CXXConstructExpr will have already handled the object construction; the CompoundLiteralExpr just needs to propagate that value forwards. <rdar://problem/13804098> llvm-svn: 181213
* Fix representation of compound literals for C++ objects with destructors.Jordan Rose2013-05-064-12/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this compound literal expression (a GNU extension in C++): (AggregateWithDtor){1, 2} resulted in this AST: `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-CXXBindTemporaryExpr [...] 'struct AggregateWithDtor' (CXXTemporary [...]) `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 Note the two CXXBindTemporaryExprs. The InitListExpr is really part of the CompoundLiteralExpr, not an object in its own right. By introducing a new entity initialization kind in Sema specifically for compound literals, we avoid the treatment of the inner InitListExpr as a temporary. `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 llvm-svn: 181212
* Add SystemZ supportUlrich Weigand2013-05-0611-6/+846
| | | | | | | | | | | | | | This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181211
* Allow targets to define minimum alignment for global variablesUlrich Weigand2013-05-066-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new common code feature that allows platform code to request minimum alignment of global symbols. The background for this is that on SystemZ, the most efficient way to load addresses of global symbol is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction provides PC-relative addressing, but only to *even* addresses. For this reason, existing compilers will guarantee that global symbols are always aligned to at least 2. [ Since symbols would otherwise already use a default alignment based on their type, this will usually only affect global objects of character type or character arrays. ] GCC also allows creating symbols without that extra alignment by using explicit "aligned" attributes (which then need to be used on both definition and each use of the symbol). To enable support for this with Clang, this patch adds a TargetInfo::MinGlobalAlign variable that provides a global minimum for the alignment of every global object (unless overridden via explicit alignment attribute), and adds code to respect this setting. Within this patch, no platform actually sets the value to anything but the default 1, resulting in no change in behaviour on any existing target. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181210
* R600: Update GPU variants in -mcpu optionTom Stellard2013-05-062-9/+11
| | | | | | | | We've added the RS880 variant in the LLVM backend to represent an R600 GPU with no vertex cache, so we need to update the GPU mappings for -mcpu. llvm-svn: 181202
* Remove forward slashes from check; should unbreak Windows buildbots.Douglas Gregor2013-05-061-1/+1
| | | | llvm-svn: 181199
* Add llvm_unreachable at end of fully covered switchHans Wennborg2013-05-061-0/+1
| | | | | | To pacify GCC warning about control reaching end of non-void function. llvm-svn: 181197
* Added Mozilla style, cleaned get*Style methods.Alexander Kornienko2013-05-063-25/+43
| | | | | | | | | | | | | | Summary: Patch based on a patch by Ehsan Akhgari. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D750 llvm-svn: 181196
* Don't break comments after includes.Daniel Jasper2013-05-062-1/+4
| | | | | | | | | | LLVM/Clang basically don't use such comments and for Google-style, include-lines are explicitly exempt from the column limit. Also, for most cases, where the column limit is violated, the "better" solution would be to move the comment to before the include, which clang-format cannot do (yet). llvm-svn: 181191
* Change indentation when breaking after a type.Daniel Jasper2013-05-064-36/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format did not indent any declarations/definitions when breaking after the type. With this change, it indents for all declarations but does not indent for function definitions, i.e.: Before: const SomeLongTypeName& some_long_variable_name; typedef SomeLongTypeName SomeLongTypeAlias; const SomeLongReturnType* SomeLongFunctionName(); const SomeLongReturnType* SomeLongFunctionName() { ... } After: const SomeLongTypeName& some_long_variable_name; typedef SomeLongTypeName SomeLongTypeAlias; const SomeLongReturnType* SomeLongFunctionName(); const SomeLongReturnType* SomeLongFunctionName() { ... } While it might seem inconsistent to indent function declarations, but not definitions, there are two reasons for that: - Function declarations are very similar to declarations of function type variables, so there is another side to consistency to consider. - There can be many function declarations on subsequent lines and not indenting can make them harder to identify. Function definitions are already separated by their body and not indenting makes the function name slighly easier to find. llvm-svn: 181187
* Require the containing type to be complete when we seeJohn McCall2013-05-064-19/+112
| | | | | | | | | | | | __alignof__ of a field. This problem can only happen in C++11. Also do some petty optimizations. rdar://13784901 llvm-svn: 181185
* C++1y: support range-based for loops in constant expressions.Richard Smith2013-05-062-0/+93
| | | | llvm-svn: 181184
* Break the class-inheritance ":" to the new line.Daniel Jasper2013-05-062-6/+4
| | | | | | | | | | | | | | | | | | This seems to be more common in LLVM, Google and Chromium. Before: class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC { }; After: class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC { }; llvm-svn: 181183
* Don't put a space before ellipsis.Daniel Jasper2013-05-062-0/+7
| | | | | | Before: template <class ... Ts> void Foo(Ts ... ts) { Foo(ts ...); } After: template <class... Ts> void Foo(Ts... ts) { Foo(ts...); } llvm-svn: 181182
* C++1y: support 'for', 'while', and 'do ... while' in constant expressions.Richard Smith2013-05-064-44/+172
| | | | llvm-svn: 181181
* Fix assert if __extension__ or _Generic is used when initializing a char ↵Richard Smith2013-05-062-5/+12
| | | | | | array from a string literal. llvm-svn: 181174
* C++1y: support for increment and decrement in constant expression evaluation.Richard Smith2013-05-054-49/+305
| | | | llvm-svn: 181173
* Factor out duplication between lvalue-to-rvalue conversions and variableRichard Smith2013-05-053-242/+255
| | | | | | | assignments in constant expressions. No significant functionality changes (slight improvement to potential constant expression checking). llvm-svn: 181170
* Replace 'MultiExprArg()' with 'None'Dmitri Gribenko2013-05-0510-35/+34
| | | | llvm-svn: 181166
* Make all 'is in extern "C"' tests use the lexical context.Rafael Espindola2013-05-056-48/+61
| | | | | | | I was not able to find a case (other than the fix in r181163) where this makes a difference, but it is a more obviously correct API to have. llvm-svn: 181165
* ArrayRef'ize Sema::CheckObjCMethodCallDmitri Gribenko2013-05-053-5/+5
| | | | | | Patch by Robert Wilhelm. llvm-svn: 181164
* Use lexical contexts when checking for conflicting language linkages.Rafael Espindola2013-05-052-2/+10
| | | | | | | This fixes pr14958. I will audit other calls to isExternCContext to see if there are any similar bugs left. llvm-svn: 181163
* Handle parens properly when initializing a char array from a string literal.Richard Smith2013-05-053-3/+29
| | | | llvm-svn: 181159
* ArrayRef'ization of some methods in SemaOverload. Patch by Robert Wilhelm!Richard Smith2013-05-053-123/+102
| | | | llvm-svn: 181158
* Use remove_if to erase parts of a vector. Avoids O(n^2) worst cases.Benjamin Kramer2013-05-051-8/+9
| | | | llvm-svn: 181150
* ArrayRef<T>() -> None cleanupDmitri Gribenko2013-05-051-1/+1
| | | | llvm-svn: 181140
* Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef ↵Dmitri Gribenko2013-05-0523-74/+50
| | | | | | | | constructor from None Patch by Robert Wilhelm. llvm-svn: 181139
* Properly parsing __declspec(safebuffers), though there is no semantic ↵Aaron Ballman2013-05-042-1/+2
| | | | | | hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx llvm-svn: 181123
* Reverting r181004 since it has broken test/Sema/wchar.c.Aaron Ballman2013-05-046-35/+4
| | | | llvm-svn: 181122
* Moved pretty printer test for thread local storage in its own fileEnea Zaffanella2013-05-042-7/+9
| | | | | | and specified the triple. llvm-svn: 181115
* Lex: Fix quadratic behavior when unescaping _Pragma strings.Benjamin Kramer2013-05-041-5/+6
| | | | | | No functionality change. llvm-svn: 181114
* In VarDecl nodes, store the thread storage class specifier as written.Enea Zaffanella2013-05-0410-30/+62
| | | | llvm-svn: 181113
* AArch64: teach Clang about __clear_cache intrinsicTim Northover2013-05-047-2/+83
| | | | | | | libgcc provides a __clear_cache intrinsic on AArch64, much like it does on 32-bit ARM. llvm-svn: 181111
* Tweaks to C++ status: add a link to Faisal's generic lambdas implementation,Richard Smith2013-05-041-3/+4
| | | | | | | and mark "clarifying memory allocation" as done, since it turns out that our optimizations here (such as they are) already conform to the new rules. llvm-svn: 181110
* More colours for C++ status page, and mark relaxed constexpr as partially ↵Richard Smith2013-05-041-4/+5
| | | | | | complete. llvm-svn: 181109
* Implement most of N3638 (return type deduction for normal functions).Richard Smith2013-05-0416-50/+708
| | | | | | | Missing (somewhat ironically) is support for the new deduction rules in lambda functions, plus PCH support for return type patching. llvm-svn: 181108
* Don't build a call expression referring to a function which we're not allowedRichard Smith2013-05-044-19/+40
| | | | | | | | | to use. This makes very little difference right now (other than suppressing follow-on errors in some cases), but will matter more once we support deduced return types (we don't want expressions with undeduced return types in the AST). llvm-svn: 181107
* Say 'decltype(auto)' not 'auto' as appropriate in mismatched-deduction ↵Richard Smith2013-05-043-1/+7
| | | | | | diagnostic. llvm-svn: 181103
* Implement template support for CapturedStmtWei Pan2013-05-048-21/+182
| | | | | | | | - Sema tests added and CodeGen tests are pending Differential Revision: http://llvm-reviews.chandlerc.com/D728 llvm-svn: 181101
* Added a function to check whether a Decl is inSean Callanan2013-05-042-0/+8
| | | | | | | | the list of Decls for a given DeclContext. This is useful for LLDB's implementation of FindExternalLexicalDecls. llvm-svn: 181093
OpenPOWER on IntegriCloud